From cc076d3b2886c02507f69529e03153f04f51b298 Mon Sep 17 00:00:00 2001 From: adamhenson Date: Mon, 30 Dec 2024 19:24:44 -0500 Subject: [PATCH 1/9] feat: npm workspaces over lerna --- packages/ghost-graphql-integration-tests/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/ghost-graphql-integration-tests/package.json b/packages/ghost-graphql-integration-tests/package.json index 718bea7..1cf2712 100644 --- a/packages/ghost-graphql-integration-tests/package.json +++ b/packages/ghost-graphql-integration-tests/package.json @@ -7,7 +7,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "build": "echo build", "test": "jest" }, "devDependencies": { From a904aa6b22e6a0357f55c3fe4e14892d85810353 Mon Sep 17 00:00:00 2001 From: adamhenson Date: Mon, 30 Dec 2024 19:29:31 -0500 Subject: [PATCH 2/9] feat: npm workspaces over lerna --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3a9d51f..5c6ca8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,8 @@ jobs: scope: '@foo-software' - name: Install run: | - npm install --workspaces --include-workspace-root + npm install --workspaces + npm run build --workspaces --if-present - name: Integration Tests run: | cd packages/ghost-graphql-integration-tests From d12a213d78838dba0cab61cf00a7f06fbf8d7ae2 Mon Sep 17 00:00:00 2001 From: adamhenson Date: Mon, 30 Dec 2024 19:33:56 -0500 Subject: [PATCH 3/9] feat: npm workspaces over lerna --- packages/ghost-graphql-ci-tools/package.json | 1 + packages/ghost-graphql-integration-tests/package.json | 1 + packages/ghost-graphql-server/package.json | 1 + packages/ghost-graphql/package.json | 1 + 4 files changed, 4 insertions(+) diff --git a/packages/ghost-graphql-ci-tools/package.json b/packages/ghost-graphql-ci-tools/package.json index d6ca222..cea5df9 100644 --- a/packages/ghost-graphql-ci-tools/package.json +++ b/packages/ghost-graphql-ci-tools/package.json @@ -9,6 +9,7 @@ "scripts": { "build": "tsc", "clean": "rimraf dist", + "postinstall": "echo \"\"", "prepublish": "npm run clean && npm run build" }, "dependencies": { diff --git a/packages/ghost-graphql-integration-tests/package.json b/packages/ghost-graphql-integration-tests/package.json index 1cf2712..c3c5bc3 100644 --- a/packages/ghost-graphql-integration-tests/package.json +++ b/packages/ghost-graphql-integration-tests/package.json @@ -7,6 +7,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { + "postinstall": "echo \"\"", "test": "jest" }, "devDependencies": { diff --git a/packages/ghost-graphql-server/package.json b/packages/ghost-graphql-server/package.json index 33f55d2..e52de4b 100644 --- a/packages/ghost-graphql-server/package.json +++ b/packages/ghost-graphql-server/package.json @@ -25,6 +25,7 @@ "clean": "rimraf dist", "dev": "NODE_ENV=development ts-node-dev --respawn --inspect -- ./src/index.ts | bunyan --color", "ghost-graphql-server": "node dist/bin/ghost-graphql-server.js", + "postinstall": "echo \"\"", "prepublish": "npm run clean && npm run build", "start": "npm run build && node dist | bunyan --color" }, diff --git a/packages/ghost-graphql/package.json b/packages/ghost-graphql/package.json index a3c9013..725db91 100644 --- a/packages/ghost-graphql/package.json +++ b/packages/ghost-graphql/package.json @@ -23,6 +23,7 @@ "build": "tsc", "clean": "rimraf dist", "generate-schema": "node dist/bin/generate-schema.js", + "postinstall": "echo \"\"", "prepublish": "npm run clean && npm run build" }, "peerDependencies": { From 98b0c3fa61196b591dbb6aefb7db1a766b20b82d Mon Sep 17 00:00:00 2001 From: adamhenson Date: Mon, 30 Dec 2024 19:37:17 -0500 Subject: [PATCH 4/9] feat: npm workspaces over lerna --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index a138d06..d9286d3 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ }, "scripts": { "lint": "eslint ./packages/**/src --ext .ts,.tsx --cache --fix", + "postinstall": "echo \"\"", "prettier:all": "prettier --single-quote --write '*.{js,jsx,ts,tsx,json,css,scss,md}'" }, "lint-staged": { From 5d77c9f4295379a747b31fdb712c26e462f55fef Mon Sep 17 00:00:00 2001 From: adamhenson Date: Mon, 30 Dec 2024 19:48:18 -0500 Subject: [PATCH 5/9] feat: npm workspaces over lerna --- package-lock.json | 5 ++++- package.json | 1 - packages/ghost-graphql-ci-tools/package.json | 1 - packages/ghost-graphql-ci-tools/src/bin/publish-packages.ts | 2 +- packages/ghost-graphql-integration-tests/package.json | 1 - packages/ghost-graphql/package.json | 1 - 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index f943da1..a496b73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,6 @@ "packages": { "": { "name": "root", - "hasInstallScript": true, "workspaces": [ "./packages/*" ], @@ -18,6 +17,9 @@ "husky": "^4.2.5", "lint-staged": "^10.4.2", "prettier": "^2.0.5" + }, + "engines": { + "node": ">=16.20.2 <17" } }, "node_modules/@ampproject/remapping": { @@ -11438,6 +11440,7 @@ "packages/ghost-graphql-server": { "name": "@foo-software/ghost-graphql-server", "version": "2.0.17", + "hasInstallScript": true, "dependencies": { "@foo-software/ghost-graphql": "*", "@types/meow": "^5.0.0", diff --git a/package.json b/package.json index d9286d3..a138d06 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ }, "scripts": { "lint": "eslint ./packages/**/src --ext .ts,.tsx --cache --fix", - "postinstall": "echo \"\"", "prettier:all": "prettier --single-quote --write '*.{js,jsx,ts,tsx,json,css,scss,md}'" }, "lint-staged": { diff --git a/packages/ghost-graphql-ci-tools/package.json b/packages/ghost-graphql-ci-tools/package.json index cea5df9..d6ca222 100644 --- a/packages/ghost-graphql-ci-tools/package.json +++ b/packages/ghost-graphql-ci-tools/package.json @@ -9,7 +9,6 @@ "scripts": { "build": "tsc", "clean": "rimraf dist", - "postinstall": "echo \"\"", "prepublish": "npm run clean && npm run build" }, "dependencies": { diff --git a/packages/ghost-graphql-ci-tools/src/bin/publish-packages.ts b/packages/ghost-graphql-ci-tools/src/bin/publish-packages.ts index 6b80800..92a3d58 100644 --- a/packages/ghost-graphql-ci-tools/src/bin/publish-packages.ts +++ b/packages/ghost-graphql-ci-tools/src/bin/publish-packages.ts @@ -7,7 +7,7 @@ const run = async () => { console.log('⌛ version, git commit and push...'); // @TODO - dynamically pull from somewhere (maybe utilize conventional commits) - npm.version({ versionType: 'minor' }); + npm.version({ versionType: 'major' }); git.push(); console.log('✅ version, git commit and push completed'); diff --git a/packages/ghost-graphql-integration-tests/package.json b/packages/ghost-graphql-integration-tests/package.json index c3c5bc3..1cf2712 100644 --- a/packages/ghost-graphql-integration-tests/package.json +++ b/packages/ghost-graphql-integration-tests/package.json @@ -7,7 +7,6 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "postinstall": "echo \"\"", "test": "jest" }, "devDependencies": { diff --git a/packages/ghost-graphql/package.json b/packages/ghost-graphql/package.json index 725db91..a3c9013 100644 --- a/packages/ghost-graphql/package.json +++ b/packages/ghost-graphql/package.json @@ -23,7 +23,6 @@ "build": "tsc", "clean": "rimraf dist", "generate-schema": "node dist/bin/generate-schema.js", - "postinstall": "echo \"\"", "prepublish": "npm run clean && npm run build" }, "peerDependencies": { From 6e6777781a28f1787bf7d4dca4affb17df018bca Mon Sep 17 00:00:00 2001 From: adamhenson Date: Mon, 30 Dec 2024 20:21:26 -0500 Subject: [PATCH 6/9] feat: npm workspaces over lerna --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c6ca8e..b75293c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: - name: Install run: | npm install --workspaces - npm run build --workspaces --if-present + # npm run build --workspaces --if-present - name: Integration Tests run: | cd packages/ghost-graphql-integration-tests From d586d83f4f431082004061349f1f49382e69d81a Mon Sep 17 00:00:00 2001 From: adamhenson Date: Mon, 30 Dec 2024 20:33:43 -0500 Subject: [PATCH 7/9] feat: npm workspaces over lerna --- .github/workflows/test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b75293c..cb59984 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,11 @@ jobs: - name: Install run: | npm install --workspaces - # npm run build --workspaces --if-present + # ensure we build packages synchronously to ensure dependencies are built. + # @TODO - see if it's possible to do this better + # first build the one that consumed by siblings, then just build all + npm run build --workspace="@foo-software/ghost-graphql" + npm run build --workspaces --if-present - name: Integration Tests run: | cd packages/ghost-graphql-integration-tests From e58190e85155e306ba56d0676da65dbbcaea6681 Mon Sep 17 00:00:00 2001 From: adamhenson Date: Mon, 30 Dec 2024 20:37:01 -0500 Subject: [PATCH 8/9] feat: npm workspaces over lerna --- .github/workflows/publish.yml | 4 ++++ .github/workflows/test.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a065ea3..b564848 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,6 +20,10 @@ jobs: - name: Install run: | npm install --workspaces + # build packages synchronously to ensure sibling dependencies are built. + # @TODO - see if it's possible to do this better + # first build the one that consumed by siblings, then just build all + npm run build --workspace="@foo-software/ghost-graphql" npm run build --workspaces --if-present - name: Generate Schema run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb59984..6c9c506 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: - name: Install run: | npm install --workspaces - # ensure we build packages synchronously to ensure dependencies are built. + # build packages synchronously to ensure sibling dependencies are built. # @TODO - see if it's possible to do this better # first build the one that consumed by siblings, then just build all npm run build --workspace="@foo-software/ghost-graphql" From 0e4103e27a5ca6c7f22c016da4b02d31e2a970a8 Mon Sep 17 00:00:00 2001 From: adamhenson Date: Mon, 30 Dec 2024 20:38:40 -0500 Subject: [PATCH 9/9] feat: npm workspaces over lerna --- packages/ghost-graphql-server/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/ghost-graphql-server/package.json b/packages/ghost-graphql-server/package.json index e52de4b..33f55d2 100644 --- a/packages/ghost-graphql-server/package.json +++ b/packages/ghost-graphql-server/package.json @@ -25,7 +25,6 @@ "clean": "rimraf dist", "dev": "NODE_ENV=development ts-node-dev --respawn --inspect -- ./src/index.ts | bunyan --color", "ghost-graphql-server": "node dist/bin/ghost-graphql-server.js", - "postinstall": "echo \"\"", "prepublish": "npm run clean && npm run build", "start": "npm run build && node dist | bunyan --color" },