Skip to content

Commit 3b868b5

Browse files
committed
chore(deps): switch to pnpm
1 parent 53e014d commit 3b868b5

File tree

9 files changed

+5912
-23322
lines changed

9 files changed

+5912
-23322
lines changed

.github/workflows/integration-test.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,43 +22,45 @@ jobs:
2222
shell: bash
2323

2424
steps:
25+
- name: Install pnpm
26+
run: npm install -g pnpm
27+
2528
- name: ⤵️ Check out code from GitHub
2629
uses: actions/checkout@v3
2730

2831
- name: 🏗 Setup node version
2932
uses: actions/setup-node@v3
3033
with:
3134
node-version: 16
32-
cache: 'npm'
35+
cache: 'pnpm'
3336
- run: |
34-
npm i -g npm@7
35-
npm i -g npm-check-updates
37+
pnpm install --frozen-lockfile
3638
3739
- name: 🏗 Setup Angular Project Version ${{ matrix.angular-version }}
3840
run: |
3941
mkdir -p tmp
4042
cd tmp
41-
npx @angular/cli@${{ matrix.angular-version }} new --create-application --skip-install --defaults -g -t -s -S angular${{ matrix.angular-version }}
43+
pnpm dlx @angular/cli@${{ matrix.angular-version }} new --create-application --package-manager=pnpm --skip-install --defaults -g -t -s -S angular${{ matrix.angular-version }}
4244
cd angular${{ matrix.angular-version }}
4345
ncu --target minor -u jasmine-core
44-
npm install
46+
pnpm install
4547
4648
- name: 🏗 Build Library
4749
run: |
48-
npm ci
49-
npm run build
50+
pnpm install --frozen-lockfile
51+
pnpm build
5052
mkdir -p tmp/dist
5153
cd out
52-
npm pack --pack-destination ../tmp/dist
54+
pnpm pack --pack-destination ../tmp/dist
5355
cd ../tmp/dist
5456
echo "LIBRARY=$(find . -mindepth 1 -print -quit)" >> $GITHUB_ENV
5557
5658
- name: 🔗 Link Library into Angular Project Version ${{ matrix.angular-version }}
5759
run: |
5860
cd tmp/angular${{ matrix.angular-version }}
59-
npm install --save ../dist/${{ env.LIBRARY }}
60-
npm install
61-
npx ng version
61+
pnpm install --save ../dist/${{ env.LIBRARY }}
62+
pnpm install
63+
pnpm exec ng version
6264
6365
- name: ✅ Add Linter configuration to angular.json into Angular Project Version ${{ matrix.angular-version }}
6466
run: |
@@ -77,7 +79,7 @@ jobs:
7779
run: |
7880
cd tmp/angular${{ matrix.angular-version }}
7981
set +e
80-
npx ng lint > result.txt
82+
pnpm exec ng lint > result.txt
8183
set -e
8284
cat result.txt
8385
grep -Fx "✖ 5 problems (5 errors, 0 warnings)" result.txt && echo "SUCCESS=1" >> $GITHUB_ENV || echo "SUCCESS=0" >> $GITHUB_ENV

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Install pnpm
13+
run: npm install -g pnpm
14+
1215
- name: ⤵️ Check out code from GitHub
1316
uses: actions/checkout@v3
1417
with:
@@ -19,17 +22,17 @@ jobs:
1922
with:
2023
node-version: 16
2124
registry-url: 'https://registry.npmjs.org'
22-
- run: npm i -g npm@7
25+
cache: 'pnpm'
2326

2427
- name: 🏗 Install dependencies
25-
run: npm ci
28+
run: pnpm install --frozen-lockfile
2629

2730
- name: 🏗 Build
28-
run: npm run build
31+
run: pnpm build
2932

3033
- name: 🚀 Release
3134
env:
3235
GH_TOKEN: ${{ secrets.GH_TOKEN }}
3336
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3437
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35-
run: npx semantic-release
38+
run: pnpm exec semantic-release

.github/workflows/unit-test.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,26 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17+
- name: Install pnpm
18+
run: npm install -g pnpm
19+
1720
- name: ⤵️ Check out code from GitHub
1821
uses: actions/checkout@v3
1922

2023
- name: 🏗 Setup node version
2124
uses: actions/setup-node@v3
2225
with:
2326
node-version: 16
24-
cache: 'npm'
25-
- run: npm i -g npm@7
27+
cache: 'pnpm'
2628

2729
- name: 🏗 Install dependencies
28-
run: npm ci
30+
run: pnpm install --frozen-lockfile
2931

3032
- name: 🏗 Build Library
31-
run: npm run build --if-present
33+
run: pnpm build --if-present
3234

3335
- name: 🧪 Run tests
3436
run: |
35-
npm test
36-
npm run lint
37-
npm run format:check
37+
pnpm test
38+
pnpm lint
39+
pnpm format:check

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# hoist-pattern[]=*
2+
public-hoist-pattern[]=rxjs*

lib/builder/src/builder.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import { Architect } from '@angular-devkit/architect';
44
import { TestingArchitectHost } from '@angular-devkit/architect/testing';
55
import { logging, schema } from '@angular-devkit/core';
66
import { exec } from 'child_process';
7+
import * as path from 'path';
78

89
describe('Lint', () => {
910
let architect: Architect;
1011
let architectHost: TestingArchitectHost;
1112
let logger: logging.Logger;
1213

1314
beforeEach(async () => {
15+
console.log(path.join(process.cwd(), './out'));
1416
const registry = new schema.CoreSchemaRegistry();
1517
registry.addPostTransform(schema.transforms.addUndefinedDefaults);
1618

@@ -22,7 +24,7 @@ describe('Lint', () => {
2224

2325
// This will either take a Node package name, or a path to the directory
2426
// for the package.json file.
25-
await architectHost.addBuilderFromPackage('../../../../out');
27+
await architectHost.addBuilderFromPackage(path.join(process.cwd(), './out'));
2628
// @ts-ignore
2729
console.info('#', Array.from(architectHost._builderMap.keys()));
2830
});

0 commit comments

Comments
 (0)