Skip to content

Commit 46c2750

Browse files
authored
update to pnpm6 and minor setup improvements (#30)
* use changelog-github formatter * update to pnpm 6 * require node version with esmodule support * use engine-strict to ensure node version * chore: use toHaveLength to fix lint warning
1 parent 950ec5b commit 46c2750

File tree

8 files changed

+3635
-4101
lines changed

8 files changed

+3635
-4101
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3-
"changelog": "@changesets/cli/changelog",
3+
"changelog": "@changesets/changelog-github",
44
"commit": false,
55
"linked": [],
66
"access": "public",

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: actions/checkout@v2
3232

3333
- name: install pnpm
34-
run: npm i -g pnpm@5
34+
run: npm i -g pnpm@6
3535
- name: set pnpm store-dir
3636
run: pnpm config set store-dir ${{ env.pnpm_store_path }}
3737
- name: pnpm-store
@@ -82,7 +82,7 @@ jobs:
8282
path: ${{ env.pnpm_store_path }}
8383
key: ${{ matrix.os }}-node-v${{ matrix.node }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
8484
- name: install pnpm
85-
run: npm i -g pnpm@5
85+
run: npm i -g pnpm@6
8686
- name: set pnpm store-dir
8787
run: pnpm config set store-dir ${{ env.pnpm_store_path }}
8888
- name: install
@@ -117,7 +117,7 @@ jobs:
117117
path: ${{ env.pnpm_store_path }}
118118
key: ${{ matrix.os }}-node-v${{ matrix.node }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
119119
- name: install pnpm
120-
run: npm i -g pnpm@5
120+
run: npm i -g pnpm@6
121121
- name: set pnpm store-dir
122122
run: pnpm config set store-dir ${{ env.pnpm_store_path }}
123123
- name: install
@@ -150,7 +150,7 @@ jobs:
150150
key: ${{ matrix.os }}-node-v${{ matrix.node }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
151151

152152
- name: install pnpm
153-
run: npm i -g pnpm@5
153+
run: npm i -g pnpm@6
154154
- name: set pnpm store-dir
155155
run: pnpm config set store-dir ${{ env.pnpm_store_path }}
156156
- name: install
@@ -209,7 +209,7 @@ jobs:
209209
path: ${{ env.pnpm_store_path }}
210210
key: ${{ matrix.os }}-node-v${{ matrix.node }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
211211
- name: install pnpm
212-
run: npm i -g pnpm@5
212+
run: npm i -g pnpm@6
213213
- name: set pnpm store-dir
214214
run: pnpm config set store-dir ${{ env.pnpm_store_path }}
215215
- name: install

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
node-version: 14
2727
# install pnpm and try to reuse cache from ci action by using same cache keys
2828
- name: install pnpm
29-
run: npm i -g pnpm@5
29+
run: npm i -g pnpm@6
3030
- name: set pnpm store-dir
3131
run: pnpm config set store-dir ${{ env.pnpm_store_path }}
3232
- name: pnpm-store

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true
File renamed without changes.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
"format:fix": "pnpm format -- --write",
2525
"fixup": "run-s lint:fix format:fix",
2626
"update-deps": "ncu -u",
27-
"release": "pnpm run build && pnpx changeset publish"
27+
"release": "pnpm run build && pnpx --no changeset publish"
2828
},
2929
"devDependencies": {
30+
"@changesets/changelog-github": "^0.3.0",
3031
"@changesets/cli": "^2.15.0",
3132
"@microsoft/api-extractor": "^7.13.2",
3233
"@types/fs-extra": "^9.0.10",
@@ -59,7 +60,7 @@
5960
"npm-check-updates": "^11.3.0",
6061
"npm-run-all": "^4.1.5",
6162
"playwright-core": "^1.10.0",
62-
"pnpm": "^5.18.9",
63+
"pnpm": "^6.0.1",
6364
"prettier": "^2.2.1",
6465
"prettier-plugin-svelte": "^2.2.0",
6566
"rimraf": "^3.0.2",
@@ -87,8 +88,9 @@
8788
]
8889
},
8990
"engines": {
90-
"pnpm": ">=5",
91+
"pnpm": ">=6",
9192
"yarn": "forbidden, use pnpm",
92-
"npm": "forbidden, use pnpm"
93+
"npm": "forbidden, use pnpm",
94+
"node": ">=12.17.0"
9395
}
9496
}

packages/playground/kit-node/__tests__/kit.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('kit-node', () => {
8484

8585
it('should render additional child components', async () => {
8686
let buttons = await page.$$('button');
87-
expect(buttons.length).toBe(1);
87+
expect(buttons).toHaveLength(1);
8888
expect(await getText(buttons[0])).toBe('Clicks: 0');
8989
await updateIndexSvelte((content) =>
9090
content.replace(
@@ -93,7 +93,7 @@ describe('kit-node', () => {
9393
)
9494
);
9595
buttons = await page.$$('button');
96-
expect(buttons.length).toBe(2);
96+
expect(buttons).toHaveLength(2);
9797
expect(await getText(buttons[0])).toBe('Clicks: 0');
9898
expect(await getText(buttons[1])).toBe('Clicks: 0');
9999
await buttons[1].click();
@@ -103,7 +103,7 @@ describe('kit-node', () => {
103103
content.replace('<Counter id="hmr-test-counter"/>\n', '')
104104
);
105105
buttons = await page.$$('button');
106-
expect(buttons.length).toBe(1);
106+
expect(buttons).toHaveLength(1);
107107
expect(await getText(buttons[0])).toBe('Clicks: 0');
108108
});
109109

0 commit comments

Comments
 (0)