Skip to content

Commit 088a95b

Browse files
chore(repo): update to pnpm 9 (#27624)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> This repo uses pnpm v8 ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> This repo uses pnpm v9 ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes # --------- Co-authored-by: “JamesHenry” <[email protected]>
1 parent 51ecd54 commit 088a95b

File tree

7 files changed

+24089
-20824
lines changed

7 files changed

+24089
-20824
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ commands:
4848
- run:
4949
name: Install pnpm package manager (linux)
5050
command: |
51-
npm install --prefix=$HOME/.local -g @pnpm/exe@8
51+
npm install --prefix=$HOME/.local -g @pnpm/exe@9.2.0
5252
- when:
5353
condition:
5454
equal: [<< parameters.os >>, macos]
5555
steps:
5656
- run:
5757
name: Install pnpm package manager (macos)
5858
command: |
59-
npm install -g @pnpm/exe@8
59+
npm install -g @pnpm/exe@9.2.0
6060
- run:
6161
name: Install Dependencies
6262
command: |

.github/workflows/publish.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
139139
build: |-
140140
set -e &&
141-
npm i -g pnpm@8.15.7 --force &&
141+
npm i -g pnpm@9.2.0 --force &&
142142
pnpm --version &&
143143
pnpm install --frozen-lockfile &&
144144
pnpm nx run-many --verbose --target=build-native -- --target=x86_64-unknown-linux-gnu
@@ -147,7 +147,7 @@ jobs:
147147
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
148148
build: |-
149149
set -e &&
150-
npm i -g pnpm@8.15.7 --force &&
150+
npm i -g pnpm@9.2.0 --force &&
151151
pnpm --version &&
152152
pnpm install --frozen-lockfile &&
153153
pnpm nx run-many --verbose --target=build-native -- --target=x86_64-unknown-linux-musl
@@ -165,7 +165,7 @@ jobs:
165165
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
166166
build: |-
167167
set -e &&
168-
npm i -g pnpm@8.15.7 --force &&
168+
npm i -g pnpm@9.2.0 --force &&
169169
pnpm --version &&
170170
pnpm install --frozen-lockfile &&
171171
pnpm nx run-many --verbose --target=build-native -- --target=aarch64-unknown-linux-gnu
@@ -191,7 +191,7 @@ jobs:
191191
build: |-
192192
set -e &&
193193
rustup target add aarch64-unknown-linux-musl &&
194-
npm i -g pnpm@8.15.7 --force &&
194+
npm i -g pnpm@9.2.0 --force &&
195195
pnpm --version &&
196196
pnpm install --frozen-lockfile &&
197197
pnpm nx run-many --verbose --target=build-native -- --target=aarch64-unknown-linux-musl
@@ -318,7 +318,7 @@ jobs:
318318
env
319319
whoami
320320
sudo pkg install -y -f node libnghttp2 www/npm git
321-
sudo npm install --location=global --ignore-scripts pnpm@8.15.7
321+
sudo npm install --location=global --ignore-scripts pnpm@9.2.0
322322
curl https://sh.rustup.rs -sSf --output rustup.sh
323323
sh rustup.sh -y --profile minimal --default-toolchain stable
324324
source "$HOME/.cargo/env"

.nx/workflows/agents.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ launch-templates:
2828
sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev
2929
- name: Install Pnpm
3030
script: |
31-
npm install -g pnpm@8
31+
npm install -g pnpm@9.2.0
3232
3333
- name: Pnpm Install
3434
script: |

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,5 +401,5 @@
401401
]
402402
}
403403
},
404-
"packageManager": "pnpm@8.15.7"
404+
"packageManager": "pnpm@9.6.0"
405405
}

packages/js/babel.ts

+28-26
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,33 @@ module.exports = function (api: any, options: NxWebBabelPresetOptions = {}) {
4545
);
4646
}
4747

48+
const plugins = [
49+
!isNxPackage
50+
? [
51+
require.resolve('@babel/plugin-transform-runtime'),
52+
{
53+
corejs: false,
54+
helpers: true,
55+
regenerator: true,
56+
useESModules: isModern,
57+
absoluteRuntime: dirname(
58+
require.resolve('@babel/runtime/package.json')
59+
),
60+
},
61+
]
62+
: null,
63+
require.resolve('babel-plugin-macros'),
64+
emitDecoratorMetadata
65+
? require.resolve('babel-plugin-transform-typescript-metadata')
66+
: undefined,
67+
// Must use legacy decorators to remain compatible with TypeScript.
68+
[
69+
require.resolve('@babel/plugin-proposal-decorators'),
70+
options.decorators ?? { legacy: true },
71+
],
72+
[require.resolve('@babel/plugin-transform-class-properties'), { loose }],
73+
].filter(Boolean);
74+
4875
return {
4976
presets: [
5077
// Support module/nomodule pattern.
@@ -64,32 +91,7 @@ module.exports = function (api: any, options: NxWebBabelPresetOptions = {}) {
6491
},
6592
],
6693
],
67-
plugins: [
68-
!isNxPackage
69-
? [
70-
require.resolve('@babel/plugin-transform-runtime'),
71-
{
72-
corejs: false,
73-
helpers: true,
74-
regenerator: true,
75-
useESModules: isModern,
76-
absoluteRuntime: dirname(
77-
require.resolve('@babel/runtime/package.json')
78-
),
79-
},
80-
]
81-
: null,
82-
require.resolve('babel-plugin-macros'),
83-
emitDecoratorMetadata
84-
? require.resolve('babel-plugin-transform-typescript-metadata')
85-
: undefined,
86-
// Must use legacy decorators to remain compatible with TypeScript.
87-
[
88-
require.resolve('@babel/plugin-proposal-decorators'),
89-
options.decorators ?? { legacy: true },
90-
],
91-
[require.resolve('@babel/plugin-transform-class-properties'), { loose }],
92-
].filter(Boolean),
94+
plugins,
9395
overrides: [
9496
// Convert `const enum` to `enum`. The former cannot be supported by babel
9597
// but at least we can get it to not error out.

packages/nx/.eslintrc.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,18 @@
100100
"events", // This is coming from @storybook/builder-manager since it uses the browser polyfill
101101
"process", // This is coming from @storybook/builder-manager since it uses the browser polyfill
102102
"prettier", // This is coming from @storybook/builder-manager since it uses the browser polyfill
103-
"util" // This is coming from @storybook/builder-manager since it uses the browser polyfill
103+
"util", // This is coming from @storybook/builder-manager since it uses the browser polyfill
104+
// The native modules are optional and only one of them will ever be installed on a given machine
105+
"@nx/nx-darwin-x64",
106+
"@nx/nx-darwin-arm64",
107+
"@nx/nx-linux-x64-gnu",
108+
"@nx/nx-linux-x64-musl",
109+
"@nx/nx-win32-x64-msvc",
110+
"@nx/nx-linux-arm64-gnu",
111+
"@nx/nx-linux-arm64-musl",
112+
"@nx/nx-linux-arm-gnueabihf",
113+
"@nx/nx-win32-arm64-msvc",
114+
"@nx/nx-freebsd-x64"
104115
]
105116
}
106117
]

0 commit comments

Comments
 (0)