Skip to content

Commit

Permalink
[chore] Migrate to pnpm under wsl2 Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
amivanoff committed Jul 30, 2024
1 parent a34af8c commit 9eba3e3
Show file tree
Hide file tree
Showing 7 changed files with 6,165 additions and 4,912 deletions.
6 changes: 3 additions & 3 deletions .husky/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ command_exists () {
}

# Workaround for Windows 10, Git Bash and Yarn
if command_exists winpty && test -t 1; then
exec < /dev/tty
fi
#if command_exists winpty && test -t 1; then
# exec < /dev/tty
#fi
7 changes: 3 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
npm test
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "Debug Jest Tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeExecutable": "pnpm",
"runtimeArgs": [
//"--inspect-brk",
"test",
Expand All @@ -27,7 +27,7 @@
"name": "vscode-jest-tests",
"type": "node",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeExecutable": "pnpm",
"runtimeArgs": [
//"--inspect-brk",
"test",
Expand Down
5 changes: 4 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ const jestConfig: JestConfigWithTsJest = {
'/node_modules/',
'/src/',
],
transformIgnorePatterns: ['node_modules/(?!(lodash-es)/)'],
transformIgnorePatterns: [
/*'node_modules/(?!(lodash-es)/)',*/ // for yarn
'<rootdir>/node_modules/.pnpm/(?!(lodash-es)@)', // for pnpm
],
collectCoverageFrom: ['./src/**/*.{js,jsx,ts,tsx}'],
coverageProvider: 'v8',
extensionsToTreatAsEsm: ['.ts'],
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
"scripts": {
"clean": "rimraf dist es lib",
"start": "rollup -w",
"build": "yarn clean && rollup -c",
"build-tsc": "yarn tsc --project ./tsconfig-build.json",
"build": "pnpm clean && rollup -c",
"build-tsc": "pnpm tsc --project ./tsconfig-build.json",
"test": "cross-env NODE_ENV=--experimental-vm-modules jest --runInBand",
"test:ci": "cross-env NODE_ENV=--experimental-vm-modules jest --ci --coverage --maxWorkers=2",
"lint": "eslint \"{src,stories,test}**/*.{js,jsx,ts,tsx}\"",
"prepare": "husky && yarn build",
"prepare": "husky && pnpm build && husky install",
"format": "./node_modules/.bin/prettier --write \"{src,stories,test}/**/*.{js,jsx,ts,tsx,json,md}\"",
"lint-staged": "lint-staged"
},
Expand All @@ -66,6 +66,7 @@
"uuid62": ">=1.0.2"
},
"dependencies": {
"@rdfjs/types": "^1.1.0",
"@types/json-schema": "^7.0.15",
"@types/jsonld": "^1.5.15",
"@types/lodash-es": "^4.17.12",
Expand All @@ -85,8 +86,10 @@
},
"devDependencies": {
"@eslint/js": "^9.8.0",
"@jest/globals": "^29.7.0",
"@rollup/plugin-json": "6.1.0",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@types/is-url": "^1.2.32",
"@types/jest": "^29.5.12",
Expand All @@ -103,7 +106,7 @@
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.8.0",
"husky": "^9.1.3",
"husky": "^8.0.0",
"jest": "^29.7.0",
"jest-extended": "^4.0.2",
"jest-watch-typeahead": "^2.2.2",
Expand All @@ -114,7 +117,6 @@
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-esbuild": "^6.1.1",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^29.2.3",
"ts-node": "^10.9.2",
"tslib": "^2.6.3",
Expand Down
Loading

0 comments on commit 9eba3e3

Please sign in to comment.