Skip to content

Commit 84cbd10

Browse files
authored
Release 4.0.0 (#33)
## Release notes * Upgrade to TS5 #32 ### Release dependencies first In case of dependent Phovea/TDP repositories follow [dependency tree](https://wiki.datavisyn.io/phovea/fundamentals/development-process#dependency-hierarchy) from the top: ### 🏁 Finish line * [ ] Inform colleagues and customers about the release * [ ] Celebrate the new release 🥳
2 parents 6b436cd + 5cc3ccd commit 84cbd10

File tree

14 files changed

+4297
-4685
lines changed

14 files changed

+4297
-4685
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

config/eslintrc.template.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ module.exports = ({ tsconfigRootDir }) => ({
5959
],
6060
'max-classes-per-file': 'off',
6161
'no-param-reassign': ['warn', { props: true, ignorePropertyModificationsFor: ['state'] }], // Exclude state as required by redux-toolkit: https://redux-toolkit.js.org/usage/immer-reducers#linting-state-mutations
62+
'cypress/unsafe-to-chain-command': 'off',
6263
'import/no-extraneous-dependencies': 'off',
6364
'import/no-webpack-loader-syntax': 'off', // Disable to allow webpack file-loaders syntax
6465
'import/no-unresolved': 'off', // Disable to allow webpack file-loaders syntax

config/tsconfig.template.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"compilerOptions": {
3-
"module": "ESNext",
3+
"module": "ES2022",
44
"target": "ES2021",
55
"importHelpers": true,
66
"sourceMap": true,
77
"declaration": true,
88
"declarationMap": true,
9-
"moduleResolution": "node16",
9+
"moduleResolution": "bundler",
1010
"jsx": "react",
1111
"allowJs": true,
1212
"experimentalDecorators": true,
@@ -16,5 +16,12 @@
1616
"resolveJsonModule": true,
1717
"allowSyntheticDefaultImports": true,
1818
"preserveWatchOutput": true
19-
}
19+
},
20+
"ts-node": {
21+
"compilerOptions": {
22+
"module": "es2022",
23+
"moduleResolution": "node16",
24+
"sourceMap": false,
25+
}
26+
},
2027
}

config/webpack.config.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -395,22 +395,12 @@ module.exports = (webpackEnv, argv) => {
395395
},
396396
resolve: {
397397
extensions: ['.tsx', '.ts', '.js'],
398-
// This is required to enable TS moduleResolution: node16, as there we have to add .js extensions which are actually .ts files.
399-
extensionAlias: isLegacyModuleResolution ? undefined : {
400-
'.js': ['.tsx', '.ts', '.js'],
401-
'.cjs': ['.cts', '.cjs'],
402-
'.mjs': ['.mts', '.mjs'],
403-
},
404398
// By default, always search for modules in the relative node_modules. However,
405399
// if the package can not be found, fall back to the workspace node_modules. This is
406400
// useful when using the resolveAliases to resolve a package to somewhere else.
407401
modules: ['node_modules', path.join(workspacePath, 'node_modules')],
408402
alias: Object.assign(
409403
{
410-
// Alias to jsx-runtime required as only React@18 has this export, otherwise it fails with "The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified".
411-
// See https://github.com/facebook/react/issues/20235 for details.
412-
'react/jsx-runtime': 'react/jsx-runtime.js',
413-
'react/jsx-dev-runtime': 'react/jsx-dev-runtime.js',
414404
...resolveAliases,
415405
},
416406
// Add aliases for all the workspace repos
@@ -710,7 +700,6 @@ module.exports = (webpackEnv, argv) => {
710700
baseUrl: '.',
711701
sourceMap: true,
712702
skipLibCheck: true,
713-
inlineSourceMap: false,
714703
declarationMap: false,
715704
noEmit: false,
716705
incremental: true,

package.json

Lines changed: 61 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "visyn_scripts",
33
"description": "",
4-
"version": "3.0.1",
4+
"version": "4.0.0",
55
"author": {
66
"name": "datavisyn GmbH",
77
"email": "[email protected]",
@@ -32,112 +32,111 @@
3232
"dist": "npm run lint && npm run test"
3333
},
3434
"dependencies": {
35-
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
36-
"@svgr/webpack": "^5.5.0",
37-
"@swc/core": "1.3.37",
35+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
36+
"@svgr/webpack": "^6.5.1",
37+
"@swc/core": "1.3.58",
3838
"@swc/jest": "~0.2.24",
3939
"@types/jest": "~27.4.1",
40-
"@types/node": "^17.0.24",
40+
"@types/node": "^17.0.45",
4141
"@types/webpack": "^5.28.0",
42-
"@types/yeoman-environment": "2",
43-
"@types/yeoman-generator": "4",
44-
"@typescript-eslint/eslint-plugin": "~5.52.0",
45-
"@typescript-eslint/parser": "~5.52.0",
42+
"@types/yeoman-environment": "2.10.8",
43+
"@types/yeoman-generator": "4.11.4",
44+
"@typescript-eslint/eslint-plugin": "~5.55.0",
45+
"@typescript-eslint/parser": "~5.55.0",
4646
"bluebird": "3",
4747
"browserslist": "^4.18.1",
4848
"chalk": "4",
4949
"child-process-promise": "^2.2.1",
5050
"clean-webpack-plugin": "^4.0.0",
51-
"copy-webpack-plugin": "^10.2.4",
51+
"copy-webpack-plugin": "^11.0.0",
5252
"cross-spawn": "^7.0.3",
53-
"css-loader": "^6.5.1",
54-
"css-minimizer-webpack-plugin": "^3.2.0",
55-
"dotenv": "^10.0.0",
53+
"css-loader": "^6.7.3",
54+
"css-minimizer-webpack-plugin": "^4.2.2",
55+
"dotenv": "^16.0.3",
5656
"dotenv-expand": "^10.0.0",
57-
"dotenv-webpack": "^7.1.0",
58-
"eslint": "^8.3.0",
57+
"dotenv-webpack": "^8.0.1",
58+
"eslint": "^8.36.0",
5959
"eslint-config-airbnb": "^19.0.4",
6060
"eslint-config-airbnb-base": "^15.0.0",
61-
"eslint-config-airbnb-typescript": "^16.1.0",
62-
"eslint-config-prettier": "^8.3.0",
61+
"eslint-config-airbnb-typescript": "^17.0.0",
62+
"eslint-config-prettier": "^8.7.0",
6363
"eslint-config-react-app": "^7.0.1",
6464
"eslint-plugin-chai-friendly": "^0.7.2",
6565
"eslint-plugin-cypress": "^2.12.1",
6666
"eslint-plugin-import": "^2.27.5",
67-
"eslint-plugin-jest": "^25.3.4",
68-
"eslint-plugin-jsx-a11y": "^6.5.1",
69-
"eslint-plugin-prettier": "^4.0.0",
70-
"eslint-plugin-react": "^7.28.0",
71-
"eslint-plugin-react-hooks": "^4.3.0",
72-
"eslint-webpack-plugin": "^3.1.1",
73-
"expose-loader": "^3.1.0",
67+
"eslint-plugin-jest": "^27.2.1",
68+
"eslint-plugin-jsx-a11y": "^6.7.1",
69+
"eslint-plugin-prettier": "^4.2.1",
70+
"eslint-plugin-react": "^7.32.2",
71+
"eslint-plugin-react-hooks": "^4.6.0",
72+
"eslint-webpack-plugin": "^4.0.0",
73+
"expose-loader": "^4.1.0",
7474
"file-loader": "^6.2.0",
75-
"fork-ts-checker-webpack-plugin": "^7.2.6",
76-
"fs-extra": "^10.0.0",
75+
"fork-ts-checker-webpack-plugin": "^8.0.0",
76+
"fs-extra": "^10.1.0",
7777
"get-tsconfig": "^4.4.0",
78-
"glob": "^8.0.3",
79-
"html-loader": "~1.3.2",
78+
"glob": "^8.1.0",
79+
"html-loader": "~4.2.0",
8080
"html-webpack-plugin": "^5.5.0",
8181
"identity-obj-proxy": "^3.0.0",
8282
"ifdef-loader": "^2.3.2",
83-
"imports-loader": "~1.2.0",
83+
"imports-loader": "~4.0.1",
8484
"inquirer": "7",
8585
"jest": "^27.4.3",
8686
"jest-raw-loader": "~1.0.1",
8787
"jest-resolve": "^27.4.2",
8888
"lodash": "^4.17.21",
89-
"mini-css-extract-plugin": "^2.4.5",
89+
"mini-css-extract-plugin": "^2.7.5",
9090
"npm-run-all": "^4.1.5",
91-
"postcss": "^8.4.4",
91+
"postcss": "^8.4.21",
9292
"postcss-flexbugs-fixes": "^5.0.2",
93-
"postcss-loader": "^6.2.1",
93+
"postcss-loader": "^7.1.0",
9494
"postcss-normalize": "^10.0.1",
95-
"postcss-preset-env": "^7.0.1",
96-
"prettier": "^2.5.1",
95+
"postcss-preset-env": "^8.0.1",
96+
"prettier": "^2.8.4",
9797
"raw-loader": "~4.0.2",
9898
"react-dev-utils": "^12.0.1",
99-
"react-refresh": "^0.11.0",
100-
"resolve": "^1.20.0",
101-
"resolve-url-loader": "^4.0.0",
102-
"rimraf": "~3.0.2",
103-
"sass-embedded": "^1.56.2",
104-
"sass-loader": "^12.3.0",
105-
"semver": "^7.3.7",
99+
"react-refresh": "^0.14.0",
100+
"resolve": "^1.22.1",
101+
"resolve-url-loader": "^5.0.0",
102+
"rimraf": "~4.4.0",
103+
"sass-embedded": "^1.59.3",
104+
"sass-loader": "^13.2.0",
105+
"semver": "^7.3.8",
106106
"semver-intersect": "^1.4.0",
107-
"shx": "~0.3.3",
108-
"source-map-loader": "^3.0.0",
107+
"shx": "~0.3.4",
108+
"source-map-loader": "^4.0.1",
109109
"speed-measure-webpack-plugin": "~1.5.0",
110-
"style-loader": "^3.3.1",
110+
"style-loader": "^3.3.2",
111111
"swc-loader": "^0.2.3",
112-
"tailwindcss": "^3.0.2",
113-
"terser-webpack-plugin": "^5.2.5",
114-
"time-analytics-webpack-plugin": "^0.1.19",
112+
"tailwindcss": "^3.2.7",
113+
"terser-webpack-plugin": "^5.3.7",
114+
"time-analytics-webpack-plugin": "^0.1.20",
115115
"ts-jest": "~27.1.3",
116-
"ts-node": "^10.7.0",
117-
"tslib": "~2.3.1",
118-
"typescript": "~4.9.5",
116+
"ts-node": "^10.9.1",
117+
"tslib": "~2.5.0",
118+
"typescript": "~5.0.4",
119119
"url-loader": "~4.1.1",
120-
"util": "^0.12.4",
121-
"webpack": "^5.64.4",
122-
"webpack-bundle-analyzer": "^4.5.0",
123-
"webpack-cli": "^4.9.2",
124-
"webpack-dev-server": "^4.6.0",
120+
"util": "^0.12.5",
121+
"webpack": "^5.76.2",
122+
"webpack-bundle-analyzer": "^4.8.0",
123+
"webpack-cli": "^5.0.1",
124+
"webpack-dev-server": "^4.13.0",
125125
"yamljs": "^0.3.0",
126-
"yargs": "^17.5.1",
126+
"yargs": "^17.7.1",
127127
"yeoman-environment": "2",
128128
"yeoman-generator": "4"
129129
},
130130
"devDependencies": {
131-
"@types/yargs": "^17.0.10",
132-
"cypress": "^11.2.0",
131+
"@types/yargs": "^17.0.22",
133132
"http-server": "^14.1.1",
134133
"jest-dev-server": "^6.1.1"
135134
},
136135
"peerDependencies": {
137-
"@types/react": "^16.9.23",
138-
"@types/react-dom": "^16.9.5",
139-
"react": "^16.13.0",
140-
"react-dom": "^16.13.0"
136+
"@types/react": "^18.0.0",
137+
"@types/react-dom": "^18.0.0",
138+
"react": "^18.0.0",
139+
"react-dom": "^18.0.0"
141140
},
142141
"jest": {
143142
"testPathIgnorePatterns": [

tests/standalone.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('standalone', () => {
8686
// Stop the server afterwards
8787
teardownDevServer();
8888
}
89-
});
90-
});
89+
}, 50000);
90+
}, 50000);
9191
});
9292
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.2.2.cjs
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import * as React from 'react';
2-
import { mount } from 'cypress/react';
32
import { MainApp } from '../../src/app/MainApp';
43

54
describe('Health check for Cypress component test', () => {
65
it('should mount MainApp', () => {
7-
mount(<MainApp />);
6+
cy.mount(<MainApp />);
87
cy.get('div').should('include.text', 'hello world');
98
});
109
});

tests_fixtures/standalone_template/cypress/support/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import './commands';
1919
// Alternatively you can use CommonJS syntax:
2020
// require('./commands')
2121

22-
import { mount } from 'cypress/react';
22+
import { mount } from 'cypress/react18';
2323

2424
// Augment the Cypress namespace to include type definitions for
2525
// your custom command.

tests_fixtures/standalone_template/cypress/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "visyn_scripts/config/tsconfig.template.json",
33
"compilerOptions": {
44
"outDir": "./dist",
5+
"sourceMap": false,
56
"types": [
67
"cypress"
78
]

0 commit comments

Comments
 (0)