|
11 | 11 | # We special-case @types/fs-extra because the current major (9.x) is broken with @types/node >= 10 |
12 | 12 | # We special-case typescript because it's not semantically versioned |
13 | 13 | # We special-case constructs because we want to stay in control of the minimum compatible version |
14 | | -# We special-case lerna because we have a patch on it that stops applying if Lerna upgrades. Remove this once https://github.com/lerna/lerna/pull/2874 releases. |
15 | 14 | # We special-case graphology-types because the newer version has type definitions that are not compatible with our typescript version. |
16 | 15 | # We special-case @types/prettier because the underlying TS types aren't supported by our TS version anymore since prettier v2.6.1 |
17 | 16 |
|
@@ -41,20 +40,23 @@ jobs: |
41 | 40 | uses: ./.github/actions/setup-corepack-pnpm |
42 | 41 | - name: Install Tools |
43 | 42 | run: |- |
44 | | - npm -g install lerna npm-check-updates@^9.0.0 |
| 43 | + npm -g install npm-check-updates@^9.0.0 |
| 44 | + # Install first so `nx` is available for the package listing below. |
| 45 | + - name: Run "pnpm install" |
| 46 | + run: pnpm install --prefer-offline |
45 | 47 | - name: List Mono-Repo Packages |
46 | 48 | id: list-packages |
47 | 49 | # These need to be ignored from the `ncu` runs! |
48 | 50 | run: |- |
49 | | - echo "list=$(node -p "$(lerna ls --all --json 2>/dev/null).map(item => item.name).join(',')")" >> $GITHUB_OUTPUT |
| 51 | + echo "list=$(pnpm exec nx show projects --json | jq -r 'join(",")')" >> $GITHUB_OUTPUT |
50 | 52 | - name: Run "ncu -u" |
51 | 53 | run: |- |
52 | 54 | # Upgrade dependencies at repository root |
53 | 55 | ncu --upgrade --filter=@types/fs-extra --target=minor |
54 | 56 | ncu --upgrade --filter=typescript --target=patch |
55 | | - ncu --upgrade --reject=@types/node,@types/fs-extra,constructs,typescript,lerna,@types/prettier --target=minor |
| 57 | + ncu --upgrade --reject=@types/node,@types/fs-extra,constructs,typescript,@types/prettier --target=minor |
56 | 58 |
|
57 | | - # This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "pnpm update" to run) |
| 59 | + # Refresh the lockfile after the ncu edits above (necessary for "pnpm update" to run) |
58 | 60 | - name: Run "pnpm install" |
59 | 61 | run: pnpm install --prefer-offline |
60 | 62 |
|
@@ -163,19 +165,22 @@ jobs: |
163 | 165 | uses: ./.github/actions/setup-corepack-pnpm |
164 | 166 | - name: Install Tools |
165 | 167 | run: |- |
166 | | - npm -g install lerna npm-check-updates@^9.0.0 |
| 168 | + npm -g install npm-check-updates@^9.0.0 |
| 169 | + # Install first so `nx` is available for the package listing below. |
| 170 | + - name: Run "pnpm install" |
| 171 | + run: pnpm install --prefer-offline |
167 | 172 | - name: List Mono-Repo Packages |
168 | 173 | id: list-packages |
169 | 174 | # These need to be ignored from the `ncu` runs! |
170 | 175 | run: |- |
171 | | - echo "list=$(node -p "$(lerna ls --all --json 2>/dev/null).map(item => item.name).join(',')")" >> $GITHUB_OUTPUT |
| 176 | + echo "list=$(pnpm exec nx show projects --json | jq -r 'join(",")')" >> $GITHUB_OUTPUT |
172 | 177 | - name: Run "ncu -u" |
173 | 178 | run: |- |
174 | 179 | # Upgrade all the packages |
175 | | - lerna exec --scope='{${{ join(matrix.pr.packages, ',') }}}' ncu -- --upgrade --filter=@types/fs-extra --target=minor |
176 | | - lerna exec --scope='{${{ join(matrix.pr.packages, ',') }}}' ncu -- --upgrade --filter=typescript --target=patch |
177 | | - lerna exec --scope='{${{ join(matrix.pr.packages, ',') }}}' ncu -- --upgrade --reject='@types/node,@types/fs-extra,constructs,typescript,graphology-types,jsii,jsii-pacmak,jsii-rosetta,jsii-docgen,codemaker,${{ steps.list-packages.outputs.list }}' --target=minor |
178 | | - # This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "pnpm update" to run) |
| 180 | + pnpm exec nx exec -p '${{ join(matrix.pr.packages, ',') }}' -- ncu --upgrade --filter=@types/fs-extra --target=minor |
| 181 | + pnpm exec nx exec -p '${{ join(matrix.pr.packages, ',') }}' -- ncu --upgrade --filter=typescript --target=patch |
| 182 | + pnpm exec nx exec -p '${{ join(matrix.pr.packages, ',') }}' -- ncu --upgrade --reject='@types/node,@types/fs-extra,constructs,typescript,graphology-types,jsii,jsii-pacmak,jsii-rosetta,jsii-docgen,codemaker,${{ steps.list-packages.outputs.list }}' --target=minor |
| 183 | + # Refresh the lockfile after the ncu edits above (necessary for "pnpm update" to run) |
179 | 184 | - name: Run "pnpm install" |
180 | 185 | run: pnpm install --prefer-offline |
181 | 186 |
|
@@ -227,17 +232,20 @@ jobs: |
227 | 232 | uses: ./.github/actions/setup-corepack-pnpm |
228 | 233 | - name: Install Tools |
229 | 234 | run: |- |
230 | | - npm -g install lerna npm-check-updates@^9.0.0 |
| 235 | + npm -g install npm-check-updates@^9.0.0 |
| 236 | + # Install first so `nx` is available for the package listing below. |
| 237 | + - name: Run "pnpm install" |
| 238 | + run: pnpm install --prefer-offline |
231 | 239 | - name: List Mono-Repo Packages |
232 | 240 | id: list-packages |
233 | 241 | # These need to be ignored from the `ncu` runs! |
234 | 242 | run: |- |
235 | | - echo "list=$(node -p "$(lerna ls --all --json 2>/dev/null).map(item => item.name).join(',')")" >> $GITHUB_OUTPUT |
| 243 | + echo "list=$(pnpm exec nx show projects --json | jq -r 'join(",")')" >> $GITHUB_OUTPUT |
236 | 244 | - name: Run "ncu -u" |
237 | 245 | run: |- |
238 | 246 | # Upgrade all the packages |
239 | | - lerna exec ncu -- --upgrade --filter='jsii,jsii-pacmak,jsii-rosetta,jsii-docgen,codemaker,constructs' --target=minor |
240 | | - # This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "pnpm update" to run) |
| 247 | + pnpm exec nx exec -- ncu --upgrade --filter='jsii,jsii-pacmak,jsii-rosetta,jsii-docgen,codemaker,constructs' --target=minor |
| 248 | + # Refresh the lockfile after the ncu edits above (necessary for "pnpm update" to run) |
241 | 249 | - name: Run "pnpm install" |
242 | 250 | run: pnpm install --prefer-offline |
243 | 251 |
|
|
0 commit comments