Skip to content

Commit

Permalink
Fix test failures when using pnpm and run npm-upgrade on all dependen…
Browse files Browse the repository at this point in the history
…cies (ryansolid#194)

* update test fixtures to match dependencies

this also locks pnpm verisons to be able to use it instead of pnm
changed whitespaces in test fixtures

* update all packages with npm-upgrade

added --bundleConfigAsCjs to rollup arguments
set jsdom as jest test environment
keep windows line endings on some of test files

* let lerna use pnpm
  • Loading branch information
obask authored Jan 9, 2023
1 parent 48df250 commit 6640218
Show file tree
Hide file tree
Showing 95 changed files with 12,889 additions and 22,498 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: 7
- uses: actions/setup-node@v2
with:
node-version: 16
cache: 'pnpm'

- name: Installing deps
run: npm install
run: pnpm install

- name: Building
run: npm run build
run: pnpm run build

- name: Testing & Coverage
run: |
npm run test
npm run test:coverage
pnpm run test
pnpm run test:coverage
- name: Coveralls
uses: coverallsapp/github-action@master
Expand Down
23,978 changes: 4,516 additions & 19,462 deletions package-lock.json

Large diffs are not rendered by default.

37 changes: 18 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"private": true,
"scripts": {
"postinstall": "lerna bootstrap --no-ci",
"clean": "npm run clean:artifacts && npm run clean:packages && npm run clean:root",
"clean": "pnpm run clean:artifacts && pnpm run clean:packages && pnpm run clean:root",
"clean:artifacts": "lerna run clean --parallel",
"clean:packages": "lerna clean --yes",
"clean:root": "rimraf node_modules",
Expand All @@ -21,32 +21,31 @@
"publish:release": "lerna run build && lerna publish",
"report:coverage": "lerna run report:coverage --parallel",
"bootstrap": "lerna bootstrap",
"init": "npm install && npm run bootstrap"
},
"engines": {
"npm": ">=7.0.0"
"init": "pnpm install && pnpm run bootstrap"
},
"devDependencies": {
"@babel/core": "^7.16.5",
"@babel/preset-env": "^7.16.5",
"@babel/preset-typescript": "^7.16.5",
"@rollup/plugin-babel": "5.3.0",
"@rollup/plugin-commonjs": "21.0.1",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "13.1.1",
"@types/jest": "^26.0.22",
"babel-jest": "^26.6.3",
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@rollup/plugin-babel": "6.0.3",
"@rollup/plugin-commonjs": "24.0.0",
"@rollup/plugin-json": "6.0.0",
"@rollup/plugin-node-resolve": "15.0.1",
"@types/jest": "^29.2.5",
"babel-jest": "^29.3.1",
"babel-plugin-tester": "^10.1.0",
"babel-plugin-transform-rename-import": "^2.3.0",
"coveralls": "^3.1.1",
"jest": "~26.6.3",
"jest": "~29.3.1",
"jest-resolve": "^29.3.1",
"jest-ts-webcompat-resolver": "^1.0.0",
"jsdom": "^19.0.0",
"lerna": "^5.0.0",
"jest-environment-jsdom": "^29.3.1",
"jsdom": "^21.0.0",
"lerna": "^6.4.0",
"rimraf": "^3.0.2",
"rollup": "^2.61.1",
"rollup": "^3.9.1",
"rollup-plugin-cleanup": "^3.2.1",
"s-js": "0.4.9",
"typescript": "~4.5.4"
"typescript": "~4.9.4"
}
}
3 changes: 2 additions & 1 deletion packages/babel-plugin-jsx-dom-expressions/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module.exports = {
"moduleDirectories": ["node_modules", "packages"],
"testEnvironment": "jsdom",
"collectCoverageFrom": [
"./index.js"
],
"transform": {
"^.+\\.jsx?$": "babel-jest"
}
}
}
Loading

0 comments on commit 6640218

Please sign in to comment.