Skip to content

Commit

Permalink
update pnpm tests commands, attempt to pnpm install and use local esmock
Browse files Browse the repository at this point in the history
  • Loading branch information
bumblehead committed Oct 18, 2024
1 parent b18cff6 commit e20c56c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-pnpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
node-version: [18.x, 20.x, 22.x]
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"test:all": "cd tests && npm run test:all",
"test:all-ci": "cd tests && npm run test:all-ci",
"test": "npm run test:all",
"test-ci-pnpm": "cd tests && cd test-pnpm && pnpm i && npm run test",
"test-ci-pnpm": "cd tests && cd tests-pnpm && pnpm i && npm run test",
"test-ci": "npm run test:install && npm run test:all-ci",
"test-cover": "npm run test:install && c8 npm run test:all",
"lint": "eslint .",
Expand Down
9 changes: 6 additions & 3 deletions tests/tests-pnpm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
"repository": {
"type": "git",
"url": "git+https://github.com/iambumblehead/esmock.git"
},
},
"description": "careful using this and rm -rf. pnpm does not support local file install :|",
"scripts": {
"test-tsimp": "TSIMP_PROJECT=./test/tsconfig.json node --import tsimp/import --test-reporter spec --test 'test/example.test.ts'",
"test-tsx": "TSX_TSCONFIG_PATH=./test/tsconfig.json node --import tsx --test-reporter spec --test 'test/example.test.ts'",
"test-tsnode": "TS_NODE_PROJECT=./test/tsconfig.json node --import ./ts-node.register.mjs --test-reporter spec --test 'test/example.test.ts'",
"test": "npm run test-tsnode"
"node_modules-esmock:rm": "rm -r node_modules/esmock",
"node_modules-esmock:link": "ln -s ../../ node_modules/esmock",
"node_modules-esmock": "npm run node_modules-esmock:rm && npm run node_modules-esmock:link",
"test": "nm run npm node_modules-esmock && run test-tsnode"
},
"dependencies": {
"@nestjs/core": "^10.3.8",
"@nestjs/platform-express": "^10.3.8"
},
"devDependencies": {
"@types/node": "^20.12.7",
"esmock": "file:..",
"ts-node": "^10.9.2",
"tsimp": "^2.0.11",
"tsx": "^4.9.3",
Expand Down

0 comments on commit e20c56c

Please sign in to comment.