Skip to content

Commit

Permalink
Merge pull request #1128 from nlebrun-spotify/upgrade-dependencies
Browse files Browse the repository at this point in the history
Upgrade to typescript 5 and jest 29
  • Loading branch information
javoire authored May 18, 2023
2 parents cfb9c66 + 9528841 commit 6519dca
Show file tree
Hide file tree
Showing 21 changed files with 2,896 additions and 2,617 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
- name: yarn install
run: yarn install --frozen-lockfile
- name: yarn build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
- name: yarn install
run: yarn install --frozen-lockfile
- name: yarn build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 18
- name: yarn install
run: yarn install --frozen-lockfile
- name: yarn build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [14, 16]
node-version: [18]

steps:
- uses: actions/checkout@v2
Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@
],
"devDependencies": {
"@spotify/eslint-config-oss": "^1.0.0",
"@spotify/eslint-plugin": "^13.0.0",
"@spotify/eslint-plugin": "^14.1.6",
"husky": "^8.0.1",
"lerna": "^5.5.2",
"typescript": "^4.5.0"
},
"resolutions": {
"minimist": "^1.2.6",
"ansi-regex": "^4.1.1"
"lerna": "^6.6.2",
"typescript": "^5.0.4"
}
}
8 changes: 4 additions & 4 deletions packages/create-web-scripts-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@
},
"dependencies": {
"chalk": "^4.0.0",
"commander": "^6.1.0",
"commander": "^10.0.1",
"execa": "^5.0.0",
"fs-extra": "^10.0.0",
"fs-extra": "^11.1.1",
"read-pkg-up": "^7.0.1"
},
"devDependencies": {
"@spotify/web-scripts": "^14.1.6",
"@types/fs-extra": "^9.0.13",
"@types/fs-extra": "^11.0.1",
"tempy": "^1.0.1"
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14.17.0"
"node": ">=18"
}
}
2 changes: 1 addition & 1 deletion packages/create-web-scripts-library/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import program from 'commander';
import { program } from 'commander';
import chalk from 'chalk';

import createWebScriptsLibrary from '.';
Expand Down
2 changes: 1 addition & 1 deletion packages/create-web-scripts-library/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import program from 'commander';
import { program } from 'commander';
import chalk from 'chalk';

export const missingProjectName = () => `
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"access": "public"
},
"engines": {
"node": ">=14.17.0"
"node": ">=18"
}
}
6 changes: 3 additions & 3 deletions packages/eslint-config-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"main": "index.js",
"scripts": {},
"devDependencies": {
"eslint": "^8.10.0",
"eslint": "^8.40.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.29.2",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.2.0"
},
"peerDependencies": {
Expand All @@ -25,6 +25,6 @@
"access": "public"
},
"engines": {
"node": ">=14.17.0"
"node": ">=18"
}
}
8 changes: 4 additions & 4 deletions packages/eslint-config-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"main": "index.js",
"scripts": {},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"eslint": "^8.10.0"
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
"eslint": "^8.40.0"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": ">=5",
Expand All @@ -23,6 +23,6 @@
"access": "public"
},
"engines": {
"node": ">=14.17.0"
"node": ">=18"
}
}
21 changes: 10 additions & 11 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,29 @@
},
"scripts": {},
"dependencies": {
"@spotify/eslint-config-base": "^13.0.1",
"@spotify/eslint-config-react": "^13.0.1",
"@spotify/eslint-config-typescript": "^13.0.1",
"@spotify/eslint-config-base": "^14.1.6",
"@spotify/eslint-config-react": "^14.1.6",
"@spotify/eslint-config-typescript": "^14.1.6",
"@spotify/eslint-plugin": "^14.1.6",
"@spotify/web-scripts-utils": "^14.1.6",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"eslint-config-prettier": "^8.1.0",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-jest": "^27.1.6",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.29.2",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.2.0"
},
"devDependencies": {
"eslint": "^8.10.0"
"eslint": "^8.40.0"
},
"peerDependencies": {
"@spotify/eslint-plugin": ">=8.x",
"eslint": "^8.10.0"
"eslint": ">=8.x"
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14.17.0"
"node": ">=18"
}
}
16 changes: 8 additions & 8 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@
},
"devDependencies": {
"@spotify/web-scripts": "^14.1.6",
"@types/eslint": "^8.4.1",
"@types/jest": "^28.1.4",
"@typescript-eslint/parser": "^5.13.0",
"@typescript-eslint/types": "^5.13.0",
"eslint": "^8.10.0",
"typescript": "^4.5.0"
"@types/eslint": "^8.37.0",
"@types/jest": "^29.5.1",
"@typescript-eslint/parser": "^5.59.6",
"@typescript-eslint/types": "^5.59.6",
"eslint": "^8.40.0",
"typescript": "^5.0.4"
},
"peerDependencies": {
"@typescript-eslint/parser": "^5.13.0",
"eslint": "^8.10.0"
"eslint": ">=8.x"
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14.17.0"
"node": ">=18"
}
}
4 changes: 2 additions & 2 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"main": "index.js",
"scripts": {},
"devDependencies": {
"prettier": "^2.2.1"
"prettier": "^2.8.8"
},
"peerDependencies": {
"prettier": "2.x"
Expand All @@ -19,6 +19,6 @@
"access": "public"
},
"engines": {
"node": ">=14.17.0"
"node": ">=18"
}
}
6 changes: 3 additions & 3 deletions packages/tsconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"test": "true"
},
"devDependencies": {
"typescript": "^4.5.0"
"typescript": "^5.0.4"
},
"peerDependencies": {
"typescript": ">=4 <5"
"typescript": ">=5"
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14.17.0"
"node": ">=18"
}
}
8 changes: 5 additions & 3 deletions packages/web-scripts-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@spotify/web-scripts-utils",
"version": "14.1.6",
"description": "Private package which contains re-used utils within web-scripts projects",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/spotify/web-scripts.git"
Expand All @@ -24,17 +25,18 @@
"prepublishOnly": "yarn run bootstrap && yarn run build"
},
"dependencies": {
"glob": "^8.0.3",
"@types/glob": "8.1.0",
"glob": "8.1.0",
"read-pkg-up": "^7.0.1"
},
"devDependencies": {
"@spotify/tsconfig": "^14.1.6",
"@types/jest": "^28.1.4"
"@types/jest": "^29.5.1"
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=14.17.0"
"node": ">=18"
}
}
14 changes: 8 additions & 6 deletions packages/web-scripts/config/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ module.exports = {
rootDir: path.join(process.cwd(), 'src'),
coverageDirectory: path.join(process.cwd(), 'coverage'),
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/*.d.ts'],
preset: 'ts-jest/presets/js-with-ts',
globals: {
'ts-jest': {
tsconfig: {
allowJs: true,
transform: {
'^.+\\.[tj]sx?$': [
'ts-jest',
{
tsconfig: {
allowJs: true,
},
},
},
],
},
};
34 changes: 16 additions & 18 deletions packages/web-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,32 @@
"prepublishOnly": "yarn run bootstrap && yarn run build"
},
"dependencies": {
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.0.3",
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"@spotify/eslint-config": "^14.1.6",
"@spotify/prettier-config": "^13.0.1",
"@spotify/tsconfig": "^13.0.1",
"@spotify/prettier-config": "^14.1.6",
"@spotify/tsconfig": "^14.1.6",
"@spotify/web-scripts-utils": "^14.1.6",
"@types/cross-spawn": "^6.0.0",
"@types/debug": "^4.1.2",
"@types/jest": "^28.1.4",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"commander": "^6.1.0",
"@types/jest": "^29.5.1",
"@types/react": "^18.2.6",
"commander": "^10.0.1",
"commitizen": "^4.2.6",
"cross-spawn-promise": "^0.10.1",
"cz-conventional-changelog": "^3.3.0",
"debug": "^4.1.1",
"eslint": "^8.10.0",
"jest": "^28.1.2",
"jest-junit": "^14.0.0",
"lint-staged": "^13.0.3",
"prettier": "^2.2.1",
"semantic-release": "^19.0.3",
"ts-jest": "^28.0.5",
"typescript": "^4.5.0"
"eslint": "^8.40.0",
"jest": "^29.5.0",
"jest-junit": "^16.0.0",
"lint-staged": "^13.2.2",
"prettier": "^2.8.8",
"semantic-release": "^21.0.2",
"ts-jest": "^29.1.0",
"typescript": "^5.0.4"
},
"devDependencies": {
"@types/rimraf": "^3.0.0",
"@types/tempy": "^0.3.0",
"object.fromentries": "^2.0.0",
"rimraf": "^3.0.0",
"tempy": "^1.0.1"
Expand All @@ -66,6 +64,6 @@
"access": "public"
},
"engines": {
"node": ">=14.17.0"
"node": ">=18"
}
}
4 changes: 2 additions & 2 deletions packages/web-scripts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import program, { Command } from 'commander';
import { program, Command } from 'commander';
import { SpawnSyncReturns } from 'child_process';

import {
Expand Down Expand Up @@ -285,7 +285,7 @@ function handleSpawnResult(result: SpawnSyncReturns<Buffer>) {
}

function getCommand(args: any[]): Command {
return args[0] as Command;
return args[1] as Command;
}

function getOpts(cmd: Command): { [key: string]: any } {
Expand Down
1 change: 0 additions & 1 deletion packages/web-scripts/src/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ describe.skip('integration tests', () => {
'typescript',
'@types/jest',
'@types/react',
'@types/react-dom',
];

// as of ESLint 6, ESLint plugins need to be locally installed too.
Expand Down
Loading

0 comments on commit 6519dca

Please sign in to comment.