From c48758e8b6e2ff04f63bb529afe8640d0a002ef7 Mon Sep 17 00:00:00 2001 From: Ryan Roemer Date: Tue, 26 Jul 2022 10:49:55 -0700 Subject: [PATCH 1/2] Remove unneeded workspace prefixes --- .npmrc | 1 + examples/js/package.json | 2 +- examples/md/package.json | 2 +- examples/typescript/package.json | 2 +- packages/cli/package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 6 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..2eb073230 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +prefer-workspace-packages=true diff --git a/examples/js/package.json b/examples/js/package.json index babbe9cce..3d95a39c6 100644 --- a/examples/js/package.json +++ b/examples/js/package.json @@ -9,7 +9,7 @@ "dependencies": { "react": "^18.1.0", "react-dom": "^18.1.0", - "spectacle": "workspace:spectacle@*" + "spectacle": "*" }, "devDependencies": { "@babel/core": "^7.17.2", diff --git a/examples/md/package.json b/examples/md/package.json index 6bc585ca4..2cb11d07e 100644 --- a/examples/md/package.json +++ b/examples/md/package.json @@ -7,7 +7,7 @@ "build": "webpack --config ./webpack.config.js" }, "dependencies": { - "spectacle": "workspace:spectacle@*", + "spectacle": "*", "react": "^18.1.0", "react-dom": "^18.1.0" }, diff --git a/examples/typescript/package.json b/examples/typescript/package.json index fd2219189..3f8e1b9fc 100644 --- a/examples/typescript/package.json +++ b/examples/typescript/package.json @@ -7,7 +7,7 @@ "build": "webpack --config ./webpack.config.js" }, "dependencies": { - "spectacle": "workspace:spectacle@*", + "spectacle": "*", "react": "^18.1.0", "react-dom": "^18.1.0" }, diff --git a/packages/cli/package.json b/packages/cli/package.json index c17a9cb3e..06fe9f919 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -27,7 +27,7 @@ }, "peerDependencies": {}, "devDependencies": { - "spectacle": "workspace:spectacle@*", + "spectacle": "*", "@types/node": "^18.0.3", "nodemon": "^2.0.18", "rimraf": "^3.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0ca8ee84f..ec79d9bad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,7 +53,7 @@ importers: react: ^18.1.0 react-dom: ^18.1.0 rimraf: ^3.0.0 - spectacle: workspace:spectacle@* + spectacle: '*' webpack: ^5.68.0 webpack-cli: ^4.10.0 webpack-dev-server: ^4.7.4 @@ -89,7 +89,7 @@ importers: react: ^18.1.0 react-dom: ^18.1.0 rimraf: ^3.0.0 - spectacle: workspace:spectacle@* + spectacle: '*' typescript: ^4.5.2 webpack: ^5.68.0 webpack-cli: ^4.10.0 @@ -130,7 +130,7 @@ importers: react: ^18.1.0 react-dom: ^18.1.0 rimraf: ^3.0.0 - spectacle: workspace:spectacle@* + spectacle: '*' typescript: ^4.5.2 webpack: ^5.68.0 webpack-cli: ^4.10.0 @@ -164,7 +164,7 @@ importers: log-update: 4.0.0 nodemon: ^2.0.18 rimraf: ^3.0.2 - spectacle: workspace:spectacle@* + spectacle: '*' ts-node: ^10.8.1 typescript: '*' dependencies: From 238e25a76c9a72d33947744bb99db09d2a395026 Mon Sep 17 00:00:00 2001 From: Ryan Roemer Date: Tue, 26 Jul 2022 10:58:06 -0700 Subject: [PATCH 2/2] Add bandaid for version --- .github/workflows/release.yml | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6866668ae..2755f1bf2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,6 +45,9 @@ jobs: id: changesets uses: changesets/action@v1 with: + # Note: Our `package.json:scripts.version` currently doesn't have `--fix-lockfile` for + # `pnpm install` because of a PNPM bug of some kind. + # https://github.com/FormidableLabs/spectacle/issues/1156 version: pnpm run version publish: pnpm changeset publish env: diff --git a/package.json b/package.json index 814ed5871..377b124ac 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "build:one-page": "node ./scripts/one-page.js", "build:cli": "pnpm run --filter spectacle-cli build", "changeset": "changeset", - "version": "pnpm changeset version && pnpm install --fix-lockfile" + "version": "pnpm changeset version && pnpm install" }, "devDependencies": { "@babel/core": "^7.17.2",