Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3272aff

Browse files
committedJan 25, 2025··
minor #108 Switch from Yarn to PNPM, close #101 (Kocal)
This PR was merged into the main branch. Discussion ---------- Switch from Yarn to PNPM, close #101 I commited the pnpm lockfile on purpose, I will need it later for #109 and I also want to leverage on the cache Commits ------- d4b277a Switch from Yarn to PNPM, close #101
2 parents fca4524 + d4b277a commit 3272aff

File tree

9 files changed

+7217
-25
lines changed

9 files changed

+7217
-25
lines changed
 

‎.github/workflows/test.yaml

+17-8
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,35 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18+
- uses: pnpm/action-setup@v4
19+
1820
- name: Install Node
1921
uses: actions/setup-node@v4
2022
with:
2123
node-version: ${{ env.NODE_VERSION_LOWEST_SUPPORTED }} # lowest supported version
24+
cache: 'pnpm'
2225

23-
- name: Install Yarn Dependencies
24-
run: yarn install
26+
- name: Install Node.js Dependencies
27+
run: pnpm install
2528

2629
- name: Run Biome
27-
run: yarn run ci
30+
run: pnpm run ci
2831

2932
js-dist-current:
3033
name: Check for un-built JS dist files
3134
runs-on: ubuntu-latest
3235
steps:
3336
- uses: actions/checkout@v4
3437

38+
- uses: pnpm/action-setup@v4
39+
3540
- name: Install Node
3641
uses: actions/setup-node@v4
3742
with:
3843
node-version: ${{ env.NODE_VERSION_LOWEST_SUPPORTED }} # lowest supported version
39-
40-
- run: yarn install && yarn build
44+
cache: 'pnpm'
45+
46+
- run: pnpm install && pnpm run build
4147

4248
- name: Check if js dist files are current
4349
run: |
@@ -60,13 +66,16 @@ jobs:
6066
- name: Checkout
6167
uses: actions/checkout@v4
6268

69+
- uses: pnpm/action-setup@v4
70+
6371
- name: Node ${{matrix.node-versions}}
6472
uses: actions/setup-node@v4
6573
with:
6674
node-version: ${{matrix.node-versions}}
75+
cache: 'pnpm'
6776

68-
- name: Install Yarn Dependencies
69-
run: yarn install
77+
- name: Install Node.js Dependencies
78+
run: pnpm install
7079

7180
- name: Tests
72-
run: yarn test
81+
run: pnpm run test

‎.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
node_modules
2-
yarn.lock
3-
yarn-error.log

‎.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* [CI] Check for un-built JS dist files by @Kocal in https://github.com/symfony/stimulus-bridge/pull/96
1818
* Replace ESLint and Prettier by Biome.js by @Kocal in https://github.com/symfony/stimulus-bridge/pull/95
1919
* Migrate from [Rollup](https://rollupjs.org/) to [Rolldown](https://rolldown.rs/) by @Kocal in https://github.com/symfony/stimulus-bridge/pull/99
20+
* Migrate from [Yarn](https://yarnpkg.com/) to [pnpm](https://pnpm.io/) by @Kocal in https://github.com/symfony/stimulus-bridge/pull/108
2021

2122
## 3.3.3
2223

‎README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Symfony Flex recipe that will set up everything for you. Finish by
2222
running Encore:
2323

2424
```sh
25-
yarn encore dev --watch
25+
npm encore dev --watch
2626
```
2727

2828
If you already had Encore installed (and so the recipe did not run), you
@@ -34,7 +34,7 @@ The Webpack Encore recipe usually handles setting up everything you need.
3434
But you can also do it manually. First, install the bridge:
3535

3636
```sh
37-
yarn add @symfony/stimulus-bridge @hotwired/stimulus --dev
37+
npm add @symfony/stimulus-bridge @hotwired/stimulus --dev
3838
```
3939

4040
Next, create an `assets/controllers.json` file: Flex will update
@@ -77,7 +77,7 @@ export const app = startStimulusApp(require.context(
7777
That's it! Now run Encore:
7878

7979
```sh
80-
yarn encore watch
80+
npm encore watch
8181
```
8282

8383
## Usage: Installing UX Packages
@@ -297,9 +297,3 @@ Uncaught (in promise) TypeError: class constructors must be invoked with 'new'
297297
The error is caused when an ES5 class tries to "extend" an ES6 class. If the target is not correctly set,
298298
TypeScript will transpile the controller to old ES5 code. But Stimulus 3 uses pure ES6 classes.
299299
This causes an incompatibility, hence the need to target ES6 explicitly.
300-
301-
## Run tests
302-
303-
```sh
304-
yarn test
305-
```

‎dist/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Application } from "@hotwired/stimulus";
22
import symfonyControllers from "./webpack/loader!@symfony/stimulus-bridge/controllers.json";
33

4-
//#region node_modules/@hotwired/stimulus-webpack-helpers/dist/stimulus-webpack-helpers.js
4+
//#region node_modules/.pnpm/@hotwired+stimulus-webpack-helpers@1.0.1_@hotwired+stimulus@3.2.2/node_modules/@hotwired/stimulus-webpack-helpers/dist/stimulus-webpack-helpers.js
55
function definitionsFromContext(context) {
66
return context.keys().map((key) => definitionForModuleWithContextAndKey(context, key)).filter((value) => value);
77
}

‎dist/webpack/lazy-controller-loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const loader_utils = __toESM(require("loader-utils"));
2626
const schema_utils = __toESM(require("schema-utils"));
2727
const node_vm = __toESM(require("node:vm"));
2828

29-
//#region node_modules/acorn/dist/acorn.mjs
29+
//#region node_modules/.pnpm/acorn@8.14.0/node_modules/acorn/dist/acorn.mjs
3030
var astralIdentifierCodes = [
3131
509,
3232
0,

‎package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
"engines": {
1010
"node": "^18.12.0 || ^20.0.0 || >=22.0"
1111
},
12+
"packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0",
1213
"scripts": {
13-
"build": "yarn rolldown -c",
14-
"test": "yarn run webpack --config test/webpack.config.js && yarn run jest",
14+
"build": "rolldown -c",
15+
"test": "webpack --config test/webpack.config.js && jest",
1516
"check": "biome check",
1617
"ci": "biome ci"
1718
},
@@ -51,6 +52,5 @@
5152
"dist/",
5253
"controllers.json",
5354
"lazy-controller-loader.js"
54-
],
55-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
55+
]
5656
}
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Please sign in to comment.