Skip to content

Commit 96ccdff

Browse files
committed
chore: Set up pnpm
1 parent e1686f6 commit 96ccdff

File tree

13 files changed

+3524
-5546
lines changed

13 files changed

+3524
-5546
lines changed

.github/workflows/node.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ jobs:
2323
uses: actions/setup-node@v1
2424
with:
2525
node-version: ${{ matrix.node-version }}
26-
- run: yarn install
27-
- run: yarn run ci-test
26+
- run: pnpm install
27+
- run: pnpm ci-test

examples/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"scripts": {
1717
"generate": "ohm generateBundles --withTypes 'src/*.ohm'",
18-
"pretest": "yarn generate",
18+
"pretest": "pnpm generate",
1919
"test": "ava"
2020
},
2121
"ava": {

examples/typescript/yarn.lock

Lines changed: 0 additions & 1996 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
"examples/typescript"
1515
],
1616
"scripts": {
17-
"build": "yarn workspace ohm-js run build",
18-
"ci-test": "yarn build && yarn lint && yarn test",
17+
"build": "pnpm -r build",
18+
"ci-test": "pnpm build && pnpm lint && pnpm test",
1919
"format": "prettier --write . && eslint --fix .",
2020
"lint": "eslint .",
21-
"test": "yarn workspaces run test"
21+
"test": "pnpm -r test"
2222
},
2323
"devDependencies": {
2424
"eslint": "^7.31.0",

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"scripts": {
1919
"build:tests": "tsc --target es2020 --module es2020 --moduleResolution node --allowSyntheticDefaultImports src/helpers/generateTypes.test.ts",
20-
"test": "yarn build:tests && ava"
20+
"test": "pnpm build:tests && ava"
2121
},
2222
"bin": {
2323
"ohm": "index.js"

packages/lang-python/yarn.lock

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/ohm-js/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,24 @@
4949
"scripts": {
5050
"prebootstrap": "bash scripts/prebootstrap",
5151
"bootstrap": "bash scripts/bootstrap --test || (echo 'Bootstrap failed.' && mv -v dist/ohm-grammar.js.old dist/ohm-grammar.js && mv -v dist/built-in-rules.js.old dist/built-in-rules.js && mv -v dist/operations-and-attributes.js.old dist/operations-and-attributes.js)",
52-
"build": "yarn build:debug && yarn build:min",
52+
"build": "pnpm build:debug && pnpm build:min",
5353
"build:min": "terser dist/ohm.js --mangle --compress -o dist/ohm.min.js",
54-
"build:debug": "yarn build:cjs && node scripts/generate-types.js",
54+
"build:debug": "pnpm build:cjs && node scripts/generate-types.js",
5555
"build:cjs": "rollup -c rollup.config.js",
5656
"clean": "rm -f dist/ohm.js dist/ohm.min.js",
5757
"lint": "eslint . --ignore-path ../.eslintignore",
5858
"format": "prettier . --write --ignore-path ../.prettierignore --config ../.prettierrc && eslint . --ignore-path ../.eslintignore --fix",
5959
"test": "ava && node test/_test-doc.js",
6060
"test-watch": "ava --watch",
61-
"pre-commit": "yarn run lint && yarn run build && yarn run test",
61+
"pre-commit": "pnpm lint && pnpm build && pnpm test",
6262
"prebuild": "node scripts/prebuild.js",
6363
"prepublishOnly": "bash scripts/prepublishOnly",
64-
"prepack": "cp ../../README.md . && yarn build",
64+
"prepack": "cp ../../README.md . && pnpm build",
6565
"postpack": "rm README.md",
6666
"postpublish": "echo '👉 Now go to https://github.com/harc/ohm/releases and create a release.'",
6767
"unsafe-bootstrap": "bash scripts/bootstrap",
6868
"update-contributors": "bash scripts/update-contributors",
69-
"watch": "yarn build:cjs --watch"
69+
"watch": "pnpm build:cjs --watch"
7070
},
7171
"license": "MIT",
7272
"author": "Alex Warth <alexwarth@gmail.com> (http://tinlizzie.org/~awarth)",

packages/ohm-js/scripts/bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fi
2929

3030
# Run the tests if one of the files changed and the `--test` argument is set.
3131
if [ "$CHANGED" == "true" ] && [ "$1" == "--test" ]; then
32-
yarn test --silent
32+
pnpm test --silent
3333
fi
3434

3535
echo 'Bootstrap complete.'

packages/ohm-js/test/test-examples.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function runExample(relativePath, cb) {
7575
});
7676
}
7777

78-
// Executes `yarn build` if any of the files in src/ are older than the browserified bundle.
78+
// Executes `pnpm build` if any of the files in src/ are older than the browserified bundle.
7979
function rebuildIfModified() {
8080
// Get a sorted list of last-modified times for every file in the 'src' dir.
8181
var srcEntries = walkSync.entries(path.join(__dirname, '../src'));
@@ -90,7 +90,7 @@ function rebuildIfModified() {
9090
var bundleDate = fs.statSync(path.join(__dirname, '../dist/ohm.js')).mtime;
9191

9292
if (bundleDate < srcDate) {
93-
var p = exec('yarn build');
93+
var p = exec('pnpm build');
9494
p.stdout.on('data', function () {
9595
/* ignore */
9696
});

packages/packaging-tests/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
"name": "packaging-tests",
33
"version": "1.0.0",
44
"private": true,
5-
"dependencies": {},
65
"scripts": {
76
"build": "webpack && rollup -c",
87
"generate": "ohm generateBundles --withTypes src/greeting.ohm && ohm generateBundles --esm src/greeting-esm.ohm",
9-
"pretest": "yarn generate && yarn build",
8+
"pretest": "pnpm generate && pnpm build",
109
"test:bundles": "node dist/main.js && node dist/main-rollup.js",
1110
"test:ts-cjs": "ts-node test/test-ts.ts",
1211
"test:ts-esm": "ts-node --project tsconfig.esm.json test/test-ts.ts",
13-
"test:ts": "yarn test:ts-cjs && yarn test:ts-esm && ts-node test/test-typings.ts",
14-
"test": "uvu test --ignore '\\.ts' && yarn test:ts && yarn test:bundles",
15-
"test:watch": "watchlist . -- yarn test"
12+
"test:ts": "pnpm test:ts-cjs && pnpm test:ts-esm && ts-node test/test-typings.ts",
13+
"test": "uvu test --ignore '\\.ts' && pnpm test:ts && pnpm test:bundles",
14+
"test:watch": "watchlist . -- pnpm test"
1615
},
1716
"devDependencies": {
1817
"@ohm-js/cli": "^1.1.0",

0 commit comments

Comments
 (0)