From 9255a00914137af3cee3deb2778217cbc9404ffc Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 24 Oct 2022 23:15:53 -0500 Subject: [PATCH 001/258] Start upgrading to Jest 28 --- code/addons/docs/package.json | 2 +- .../storyshots/storyshots-core/package.json | 4 +- code/frameworks/angular/package.json | 2 +- code/jest.config.js | 2 +- code/package.json | 13 +- code/yarn.lock | 652 ++++------------ scripts/package.json | 13 +- scripts/yarn.lock | 734 +++++++++++------- 8 files changed, 614 insertions(+), 808 deletions(-) diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index a2cb9357fef3..84d09da3e6f3 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -50,7 +50,7 @@ }, "dependencies": { "@babel/plugin-transform-react-jsx": "^7.12.12", - "@jest/transform": "^26.6.2", + "@jest/transform": "^28.0.0", "@mdx-js/react": "^2.1.5", "@storybook/addons": "7.0.0-alpha.42", "@storybook/api": "7.0.0-alpha.42", diff --git a/code/addons/storyshots/storyshots-core/package.json b/code/addons/storyshots/storyshots-core/package.json index 07fad5938868..77b34a945c89 100644 --- a/code/addons/storyshots/storyshots-core/package.json +++ b/code/addons/storyshots/storyshots-core/package.json @@ -37,7 +37,7 @@ "storybook": "yarn sb dev -p 6006" }, "dependencies": { - "@jest/transform": "^26.6.2", + "@jest/transform": "^28.0.0", "@storybook/addons": "7.0.0-alpha.42", "@storybook/babel-plugin-require-context-hook": "1.0.1", "@storybook/client-api": "7.0.0-alpha.42", @@ -53,7 +53,7 @@ "global": "^4.4.0", "jest-specific-snapshot": "^4.0.0", "preact-render-to-string": "^5.1.19", - "pretty-format": "^26.6.2", + "pretty-format": "^28.0.0", "react-test-renderer": "^16.8.0 || ^17.0.0 || ^18.0.0", "read-pkg-up": "^7.0.1", "ts-dedent": "^2.0.0" diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index 721ad5e0f4b1..b5506aedec05 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -79,7 +79,7 @@ "@nrwl/workspace": "14.6.1", "@types/tmp": "^0.2.3", "cross-spawn": "^7.0.3", - "jest": "^27.5.1", + "jest": "^28.0.0", "jest-preset-angular": "^12.0.0", "jest-specific-snapshot": "^5.0.0", "tmp": "^0.2.1", diff --git a/code/jest.config.js b/code/jest.config.js index 0e444db10997..b49aae1cf69f 100644 --- a/code/jest.config.js +++ b/code/jest.config.js @@ -84,7 +84,7 @@ module.exports = { coverageDirectory: 'coverage', setupFilesAfterEnv: ['./jest.init.ts'], coverageReporters: ['lcov'], - testEnvironment: 'jest-environment-jsdom-thirteen', + testEnvironment: 'jest-environment-jsdom', setupFiles: ['raf/polyfill'], testURL: 'http://localhost', modulePathIgnorePatterns: [ diff --git a/code/package.json b/code/package.json index bfb1237ba9c1..4b552642677a 100644 --- a/code/package.json +++ b/code/package.json @@ -241,7 +241,7 @@ "@types/escodegen": "^0.0.6", "@types/express": "^4.17.11", "@types/fs-extra": "^9.0.6", - "@types/jest": "^26.0.16", + "@types/jest": "^28.0.0", "@types/js-yaml": "^3.12.6", "@types/lodash": "^4.14.167", "@types/node": "^16.0.0", @@ -260,7 +260,7 @@ "@vitejs/plugin-react": "^2.1.0", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^10.1.0", - "babel-jest": "^26.6.3", + "babel-jest": "^28.0.0", "babel-loader": "^8.2.5", "babel-plugin-add-react-displayname": "^0.0.5", "babel-plugin-dynamic-import-node": "^2.3.3", @@ -292,12 +292,11 @@ "global": "^4.4.0", "http-server": "^0.12.3", "husky": "^4.3.7", - "jest": "^26.6.3", - "jest-environment-jsdom": "^26.6.2", - "jest-environment-jsdom-thirteen": "^1.0.1", + "jest": "^28.0.0", + "jest-environment-jsdom": "^28.0.0", "jest-enzyme": "^7.1.2", "jest-image-snapshot": "^4.3.0", - "jest-jasmine2": "^26.6.3", + "jest-jasmine2": "^28.0.0", "jest-junit": "^13.0.0", "jest-os-detection": "^1.3.1", "jest-raw-loader": "^1.0.1", @@ -334,7 +333,7 @@ "terser-webpack-plugin": "^5.3.1", "trash": "^7.0.0", "ts-dedent": "^2.0.0", - "ts-jest": "^26.4.4", + "ts-jest": "^28.0.0", "ts-node": "^10.4.0", "tsup": "^6.2.2", "typescript": "~4.6.3", diff --git a/code/yarn.lock b/code/yarn.lock index 38cfc693714b..cf359857d31c 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -440,7 +440,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.5, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.0, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.12.9, @babel/core@npm:^7.13.16, @babel/core@npm:^7.17.2, @babel/core@npm:^7.17.5, @babel/core@npm:^7.18.13, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.2, @babel/core@npm:^7.7.5, @babel/core@npm:^7.8.0": +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.5, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.0, @babel/core@npm:^7.12.10, @babel/core@npm:^7.12.3, @babel/core@npm:^7.12.9, @babel/core@npm:^7.13.16, @babel/core@npm:^7.17.2, @babel/core@npm:^7.17.5, @babel/core@npm:^7.18.13, @babel/core@npm:^7.3.4, @babel/core@npm:^7.7.2, @babel/core@npm:^7.7.5": version: 7.19.3 resolution: "@babel/core@npm:7.19.3" dependencies: @@ -2972,35 +2972,36 @@ __metadata: languageName: node linkType: hard -"@jest/core@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/core@npm:27.5.1" +"@jest/core@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/core@npm:28.1.3" dependencies: - "@jest/console": ^27.5.1 - "@jest/reporters": ^27.5.1 - "@jest/test-result": ^27.5.1 - "@jest/transform": ^27.5.1 - "@jest/types": ^27.5.1 + "@jest/console": ^28.1.3 + "@jest/reporters": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/transform": ^28.1.3 + "@jest/types": ^28.1.3 "@types/node": "*" ansi-escapes: ^4.2.1 chalk: ^4.0.0 - emittery: ^0.8.1 + ci-info: ^3.2.0 exit: ^0.1.2 graceful-fs: ^4.2.9 - jest-changed-files: ^27.5.1 - jest-config: ^27.5.1 - jest-haste-map: ^27.5.1 - jest-message-util: ^27.5.1 - jest-regex-util: ^27.5.1 - jest-resolve: ^27.5.1 - jest-resolve-dependencies: ^27.5.1 - jest-runner: ^27.5.1 - jest-runtime: ^27.5.1 - jest-snapshot: ^27.5.1 - jest-util: ^27.5.1 - jest-validate: ^27.5.1 - jest-watcher: ^27.5.1 + jest-changed-files: ^28.1.3 + jest-config: ^28.1.3 + jest-haste-map: ^28.1.3 + jest-message-util: ^28.1.3 + jest-regex-util: ^28.0.2 + jest-resolve: ^28.1.3 + jest-resolve-dependencies: ^28.1.3 + jest-runner: ^28.1.3 + jest-runtime: ^28.1.3 + jest-snapshot: ^28.1.3 + jest-util: ^28.1.3 + jest-validate: ^28.1.3 + jest-watcher: ^28.1.3 micromatch: ^4.0.4 + pretty-format: ^28.1.3 rimraf: ^3.0.0 slash: ^3.0.0 strip-ansi: ^6.0.0 @@ -3009,7 +3010,7 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: 8c858fe99cec9eabde8c894d4313171b923e1d4b8f66884b1fa1b7a0123db9f94b797f77d888a2b57d4832e7e46cd67aa1e2f227f1544643478de021c4b84db2 + checksum: eac1ac262303344cccace0cef9cee57298a90aa376e649f46110e8e950bb2b36579b9dc273b1f958fa9dca2c0c152b8b3107faf5ecb76a1e8109fdf9cbe4e600 languageName: node linkType: hard @@ -3037,18 +3038,6 @@ __metadata: languageName: node linkType: hard -"@jest/environment@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/environment@npm:27.5.1" - dependencies: - "@jest/fake-timers": ^27.5.1 - "@jest/types": ^27.5.1 - "@types/node": "*" - jest-mock: ^27.5.1 - checksum: 50e40b4f0a351a83f21af03c5cffd9f061729aee8f73131dbb32b39838c575a89d313e946ded91c08e16cf58ff470d74d6b3a48f664cec5c70a946aff45310b3 - languageName: node - linkType: hard - "@jest/environment@npm:^28.1.3": version: 28.1.3 resolution: "@jest/environment@npm:28.1.3" @@ -3114,20 +3103,6 @@ __metadata: languageName: node linkType: hard -"@jest/fake-timers@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/fake-timers@npm:27.5.1" - dependencies: - "@jest/types": ^27.5.1 - "@sinonjs/fake-timers": ^8.0.1 - "@types/node": "*" - jest-message-util: ^27.5.1 - jest-mock: ^27.5.1 - jest-util: ^27.5.1 - checksum: df6113d11f572219ac61d3946b6cc1aaa8632e3afed9ff959bdb46e122e7cc5b5a16451a88d5fca7cc8daa66333adde3cf70d96c936f3d8406276f6e6e2cbacd - languageName: node - linkType: hard - "@jest/fake-timers@npm:^28.1.3": version: 28.1.3 resolution: "@jest/fake-timers@npm:28.1.3" @@ -3153,17 +3128,6 @@ __metadata: languageName: node linkType: hard -"@jest/globals@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/globals@npm:27.5.1" - dependencies: - "@jest/environment": ^27.5.1 - "@jest/types": ^27.5.1 - expect: ^27.5.1 - checksum: b7309297f13b02bf748782772ab2054bbd11f10eb13e9b4660b33acb8c2c4bc7ee07aa1175045feb27ce3a6916b2d3982a3c5350ea1f9c2c3852334942077471 - languageName: node - linkType: hard - "@jest/globals@npm:^28.1.3": version: 28.1.3 resolution: "@jest/globals@npm:28.1.3" @@ -3249,41 +3213,41 @@ __metadata: languageName: node linkType: hard -"@jest/reporters@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/reporters@npm:27.5.1" +"@jest/reporters@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/reporters@npm:28.1.3" dependencies: "@bcoe/v8-coverage": ^0.2.3 - "@jest/console": ^27.5.1 - "@jest/test-result": ^27.5.1 - "@jest/transform": ^27.5.1 - "@jest/types": ^27.5.1 + "@jest/console": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/transform": ^28.1.3 + "@jest/types": ^28.1.3 + "@jridgewell/trace-mapping": ^0.3.13 "@types/node": "*" chalk: ^4.0.0 collect-v8-coverage: ^1.0.0 exit: ^0.1.2 - glob: ^7.1.2 + glob: ^7.1.3 graceful-fs: ^4.2.9 istanbul-lib-coverage: ^3.0.0 istanbul-lib-instrument: ^5.1.0 istanbul-lib-report: ^3.0.0 istanbul-lib-source-maps: ^4.0.0 istanbul-reports: ^3.1.3 - jest-haste-map: ^27.5.1 - jest-resolve: ^27.5.1 - jest-util: ^27.5.1 - jest-worker: ^27.5.1 + jest-message-util: ^28.1.3 + jest-util: ^28.1.3 + jest-worker: ^28.1.3 slash: ^3.0.0 - source-map: ^0.6.0 string-length: ^4.0.1 + strip-ansi: ^6.0.0 terminal-link: ^2.0.0 - v8-to-istanbul: ^8.1.0 + v8-to-istanbul: ^9.0.1 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: node-notifier: optional: true - checksum: fd66b17ca8af0464759d12525cfd84ae87403132da61f18ee76a2f07ecd64427797f7ad6e56d338ffa9f956cce153444edf1e5775093e9be2903aaf4d0e049bc + checksum: c54f989d8b2bca758a4740826042329399d7c4e1a47a67ccefede05db0a9f414fcb1f30ec3ce7b6c4f58843383fd3d24b0cc9e6d9390f90ba6a3edaf9f9c093c languageName: node linkType: hard @@ -3327,17 +3291,6 @@ __metadata: languageName: node linkType: hard -"@jest/source-map@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/source-map@npm:27.5.1" - dependencies: - callsites: ^3.0.0 - graceful-fs: ^4.2.9 - source-map: ^0.6.0 - checksum: 7d9937675ba4cb2f27635b13be0f86588d18cf3b2d5442e818e702ea87afa5048c5f8892c749857fd7dd884fd6e14f799851ec9af61940813a690c6d5a70979e - languageName: node - linkType: hard - "@jest/source-map@npm:^28.1.2": version: 28.1.2 resolution: "@jest/source-map@npm:28.1.2" @@ -3421,19 +3374,7 @@ __metadata: languageName: node linkType: hard -"@jest/test-sequencer@npm:^27.5.1": - version: 27.5.1 - resolution: "@jest/test-sequencer@npm:27.5.1" - dependencies: - "@jest/test-result": ^27.5.1 - graceful-fs: ^4.2.9 - jest-haste-map: ^27.5.1 - jest-runtime: ^27.5.1 - checksum: f43ecfc5b4c736c7f6e8521c13ef7b447ad29f96732675776be69b2631eb76019793a02ad58e69baf7ffbce1cc8d5b62ca30294091c4ad3acbdce6c12b73d049 - languageName: node - linkType: hard - -"@jest/test-sequencer@npm:^28.1.1": +"@jest/test-sequencer@npm:^28.1.1, @jest/test-sequencer@npm:^28.1.3": version: 28.1.3 resolution: "@jest/test-sequencer@npm:28.1.3" dependencies: @@ -3515,7 +3456,7 @@ __metadata: languageName: node linkType: hard -"@jest/transform@npm:^28.1.1, @jest/transform@npm:^28.1.3": +"@jest/transform@npm:^28.0.0, @jest/transform@npm:^28.1.1, @jest/transform@npm:^28.1.3": version: 28.1.3 resolution: "@jest/transform@npm:28.1.3" dependencies: @@ -6248,15 +6189,6 @@ __metadata: languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^8.0.1": - version: 8.1.0 - resolution: "@sinonjs/fake-timers@npm:8.1.0" - dependencies: - "@sinonjs/commons": ^1.7.0 - checksum: d6b795f9ddaf044daf184c151555ca557ccd23636f2ee3d2f76a9d128329f81fc1aac412f6f67239ab92cb9390aad9955b71df93cf4bd442c68b1f341e381ab6 - languageName: node - linkType: hard - "@sinonjs/fake-timers@npm:^9.1.2": version: 9.1.2 resolution: "@sinonjs/fake-timers@npm:9.1.2" @@ -6396,7 +6328,7 @@ __metadata: dependencies: "@babel/core": ^7.12.10 "@babel/plugin-transform-react-jsx": ^7.12.12 - "@jest/transform": ^26.6.2 + "@jest/transform": ^28.0.0 "@mdx-js/react": ^2.1.5 "@storybook/addons": 7.0.0-alpha.42 "@storybook/api": 7.0.0-alpha.42 @@ -6653,7 +6585,7 @@ __metadata: "@angular/core": ^13.3.6 "@angular/platform-browser-dynamic": ^13.3.6 "@emotion/jest": ^11.8.0 - "@jest/transform": ^26.6.2 + "@jest/transform": ^28.0.0 "@storybook/addon-docs": 7.0.0-alpha.42 "@storybook/addons": 7.0.0-alpha.42 "@storybook/angular": 7.0.0-alpha.42 @@ -6679,7 +6611,7 @@ __metadata: jest-specific-snapshot: ^4.0.0 jest-vue-preprocessor: ^1.7.1 preact-render-to-string: ^5.1.19 - pretty-format: ^26.6.2 + pretty-format: ^28.0.0 react-test-renderer: ^16 read-pkg-up: ^7.0.1 rxjs: ^6.6.3 @@ -6904,7 +6836,7 @@ __metadata: cross-spawn: ^7.0.3 find-up: ^5.0.0 global: ^4.4.0 - jest: ^27.5.1 + jest: ^28.0.0 jest-preset-angular: ^12.0.0 jest-specific-snapshot: ^5.0.0 react: ^16.14.0 @@ -8357,7 +8289,7 @@ __metadata: "@types/escodegen": ^0.0.6 "@types/express": ^4.17.11 "@types/fs-extra": ^9.0.6 - "@types/jest": ^26.0.16 + "@types/jest": ^28.0.0 "@types/js-yaml": ^3.12.6 "@types/lodash": ^4.14.167 "@types/node": ^16.0.0 @@ -8376,7 +8308,7 @@ __metadata: "@vitejs/plugin-react": ^2.1.0 babel-core: ^7.0.0-bridge.0 babel-eslint: ^10.1.0 - babel-jest: ^26.6.3 + babel-jest: ^28.0.0 babel-loader: ^8.2.5 babel-plugin-add-react-displayname: ^0.0.5 babel-plugin-dynamic-import-node: ^2.3.3 @@ -8408,12 +8340,11 @@ __metadata: global: ^4.4.0 http-server: ^0.12.3 husky: ^4.3.7 - jest: ^26.6.3 - jest-environment-jsdom: ^26.6.2 - jest-environment-jsdom-thirteen: ^1.0.1 + jest: ^28.0.0 + jest-environment-jsdom: ^28.0.0 jest-enzyme: ^7.1.2 jest-image-snapshot: ^4.3.0 - jest-jasmine2: ^26.6.3 + jest-jasmine2: ^28.0.0 jest-junit: ^13.0.0 jest-os-detection: ^1.3.1 jest-raw-loader: ^1.0.1 @@ -8451,7 +8382,7 @@ __metadata: terser-webpack-plugin: ^5.3.1 trash: ^7.0.0 ts-dedent: ^2.0.0 - ts-jest: ^26.4.4 + ts-jest: ^28.0.0 ts-loader: ^9.2.8 ts-node: ^10.4.0 tsup: ^6.2.2 @@ -9686,6 +9617,16 @@ __metadata: languageName: node linkType: hard +"@types/jest@npm:^28.0.0": + version: 28.1.8 + resolution: "@types/jest@npm:28.1.8" + dependencies: + expect: ^28.0.0 + pretty-format: ^28.0.0 + checksum: e69912b4285bd3a0545521425e76cdee669d89c4918b2126157c084bf496da1d0cf007366d47b99a9c7076e6567e16917b28c2790a19a6e72a80570c359e4de1 + languageName: node + linkType: hard + "@types/js-yaml@npm:^3.12.6": version: 3.12.7 resolution: "@types/js-yaml@npm:3.12.7" @@ -11224,7 +11165,7 @@ __metadata: languageName: node linkType: hard -"acorn-globals@npm:^4.1.0, acorn-globals@npm:^4.3.0, acorn-globals@npm:^4.3.2": +"acorn-globals@npm:^4.1.0, acorn-globals@npm:^4.3.2": version: 4.3.4 resolution: "acorn-globals@npm:4.3.4" dependencies: @@ -11303,7 +11244,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^6.0.1, acorn@npm:^6.0.4": +"acorn@npm:^6.0.1": version: 6.4.2 resolution: "acorn@npm:6.4.2" bin: @@ -12395,25 +12336,7 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^27.5.1": - version: 27.5.1 - resolution: "babel-jest@npm:27.5.1" - dependencies: - "@jest/transform": ^27.5.1 - "@jest/types": ^27.5.1 - "@types/babel__core": ^7.1.14 - babel-plugin-istanbul: ^6.1.1 - babel-preset-jest: ^27.5.1 - chalk: ^4.0.0 - graceful-fs: ^4.2.9 - slash: ^3.0.0 - peerDependencies: - "@babel/core": ^7.8.0 - checksum: 3ec8fdabba150431e430ab98d31ba62a1e0bc0fb2fd8d9236cb7dffda740de99c0b04f24da54ff0b5814dce9f81ff0c35a61add53c0734775996a11a7ba38318 - languageName: node - linkType: hard - -"babel-jest@npm:^28.1.1": +"babel-jest@npm:^28.0.0, babel-jest@npm:^28.1.1, babel-jest@npm:^28.1.3": version: 28.1.3 resolution: "babel-jest@npm:28.1.3" dependencies: @@ -12556,18 +12479,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-jest-hoist@npm:^27.5.1": - version: 27.5.1 - resolution: "babel-plugin-jest-hoist@npm:27.5.1" - dependencies: - "@babel/template": ^7.3.3 - "@babel/types": ^7.3.3 - "@types/babel__core": ^7.0.0 - "@types/babel__traverse": ^7.0.6 - checksum: 2f08ebde32d9d2bffff75524bda44812995b3fcab6cbf259e1db52561b6c8d829f4688db77ef277054a362c9a61826e121a2a4853b0bf93d077ebb3b69685f8e - languageName: node - linkType: hard - "babel-plugin-jest-hoist@npm:^28.1.3": version: 28.1.3 resolution: "babel-plugin-jest-hoist@npm:28.1.3" @@ -12737,18 +12648,6 @@ __metadata: languageName: node linkType: hard -"babel-preset-jest@npm:^27.5.1": - version: 27.5.1 - resolution: "babel-preset-jest@npm:27.5.1" - dependencies: - babel-plugin-jest-hoist: ^27.5.1 - babel-preset-current-node-syntax: ^1.0.0 - peerDependencies: - "@babel/core": ^7.0.0 - checksum: fc2f7fd03d8cddb36e0a07a94f1bb1826f7d7dae1f3519ed170c7a5e56c863aecbdb3fd2b034674a53210088478f000318b06415bad511bcf203c5729e5dd079 - languageName: node - linkType: hard - "babel-preset-jest@npm:^28.1.3": version: 28.1.3 resolution: "babel-preset-jest@npm:28.1.3" @@ -15969,7 +15868,7 @@ __metadata: languageName: node linkType: hard -"cssom@npm:0.3.x, cssom@npm:>= 0.3.2 < 0.4.0, cssom@npm:^0.3.4, cssom@npm:~0.3.6": +"cssom@npm:0.3.x, cssom@npm:>= 0.3.2 < 0.4.0, cssom@npm:~0.3.6": version: 0.3.8 resolution: "cssom@npm:0.3.8" checksum: d74017b209440822f9e24d8782d6d2e808a8fdd58fa626a783337222fe1c87a518ba944d4c88499031b4786e68772c99dfae616638d71906fe9f203aeaf14411 @@ -15990,7 +15889,7 @@ __metadata: languageName: node linkType: hard -"cssstyle@npm:^1.0.0, cssstyle@npm:^1.1.1": +"cssstyle@npm:^1.0.0": version: 1.4.0 resolution: "cssstyle@npm:1.4.0" dependencies: @@ -17835,13 +17734,6 @@ __metadata: languageName: node linkType: hard -"emittery@npm:^0.8.1": - version: 0.8.1 - resolution: "emittery@npm:0.8.1" - checksum: 1302868b6e258909964339f28569b97658d75c1030271024ac2f50f84957eab6a6a04278861a9c1d47131b9dfb50f25a5d017750d1c99cd86763e19a93b838bf - languageName: node - linkType: hard - "emoji-regex@npm:^7.0.1": version: 7.0.3 resolution: "emoji-regex@npm:7.0.3" @@ -18639,7 +18531,7 @@ __metadata: languageName: node linkType: hard -"escodegen@npm:^1.11.0, escodegen@npm:^1.11.1, escodegen@npm:^1.9.1": +"escodegen@npm:^1.11.1, escodegen@npm:^1.9.1": version: 1.14.3 resolution: "escodegen@npm:1.14.3" dependencies: @@ -19496,7 +19388,7 @@ __metadata: languageName: node linkType: hard -"expect@npm:^28.1.3": +"expect@npm:^28.0.0, expect@npm:^28.1.3": version: 28.1.3 resolution: "expect@npm:28.1.3" dependencies: @@ -24144,45 +24036,17 @@ __metadata: languageName: node linkType: hard -"jest-changed-files@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-changed-files@npm:27.5.1" +"jest-changed-files@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-changed-files@npm:28.1.3" dependencies: - "@jest/types": ^27.5.1 execa: ^5.0.0 - throat: ^6.0.1 - checksum: ee2e663da669a1f8a1452626c71b9691a34cc6789bbf6cb04ef4430a63301db806039e93dd5c9cc6c0caa3d3f250ff18ed51e058fc3533a71f73e24f41b5d1bd - languageName: node - linkType: hard - -"jest-circus@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-circus@npm:27.5.1" - dependencies: - "@jest/environment": ^27.5.1 - "@jest/test-result": ^27.5.1 - "@jest/types": ^27.5.1 - "@types/node": "*" - chalk: ^4.0.0 - co: ^4.6.0 - dedent: ^0.7.0 - expect: ^27.5.1 - is-generator-fn: ^2.0.0 - jest-each: ^27.5.1 - jest-matcher-utils: ^27.5.1 - jest-message-util: ^27.5.1 - jest-runtime: ^27.5.1 - jest-snapshot: ^27.5.1 - jest-util: ^27.5.1 - pretty-format: ^27.5.1 - slash: ^3.0.0 - stack-utils: ^2.0.3 - throat: ^6.0.1 - checksum: 195b88ff6c74a1ad0f2386bea25700e884f32e05be9211bc197b960e7553a952ab38aff9aafb057c6a92eaa85bde2804e01244278a477b80a99e11f890ee15d9 + p-limit: ^3.1.0 + checksum: fec92f6348456c3157ac74abcfe8b341d7d8ddbb51efc1bc7d76b9e613c6a0b1bf627b505b5f49ec4d7829885a6cf2615920eeeda7f55bc0aed4695cf02e1085 languageName: node linkType: hard -"jest-circus@npm:^28.1.1": +"jest-circus@npm:^28.1.1, jest-circus@npm:^28.1.3": version: 28.1.3 resolution: "jest-circus@npm:28.1.3" dependencies: @@ -24232,22 +24096,22 @@ __metadata: languageName: node linkType: hard -"jest-cli@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-cli@npm:27.5.1" +"jest-cli@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-cli@npm:28.1.3" dependencies: - "@jest/core": ^27.5.1 - "@jest/test-result": ^27.5.1 - "@jest/types": ^27.5.1 + "@jest/core": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/types": ^28.1.3 chalk: ^4.0.0 exit: ^0.1.2 graceful-fs: ^4.2.9 import-local: ^3.0.2 - jest-config: ^27.5.1 - jest-util: ^27.5.1 - jest-validate: ^27.5.1 + jest-config: ^28.1.3 + jest-util: ^28.1.3 + jest-validate: ^28.1.3 prompts: ^2.0.1 - yargs: ^16.2.0 + yargs: ^17.3.1 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: @@ -24255,7 +24119,7 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: 45abaafbe1a01ea4c48953c85d42c961b6e33ef5847e10642713cde97761611b0af56d5a0dcb82abf19c500c6e9b680222a7f953b437e5760ba584521b74f9ea + checksum: 7d47b89785fd6cf7c21560fcf09280bfb80057e3e7f85d4da2828d780a6ff81a1a41611e55eb3831564530edc3060159d23fd20d60d6640161d4652233c0c6a3 languageName: node linkType: hard @@ -24328,40 +24192,41 @@ __metadata: languageName: node linkType: hard -"jest-config@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-config@npm:27.5.1" +"jest-config@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-config@npm:28.1.3" dependencies: - "@babel/core": ^7.8.0 - "@jest/test-sequencer": ^27.5.1 - "@jest/types": ^27.5.1 - babel-jest: ^27.5.1 + "@babel/core": ^7.11.6 + "@jest/test-sequencer": ^28.1.3 + "@jest/types": ^28.1.3 + babel-jest: ^28.1.3 chalk: ^4.0.0 ci-info: ^3.2.0 deepmerge: ^4.2.2 - glob: ^7.1.1 + glob: ^7.1.3 graceful-fs: ^4.2.9 - jest-circus: ^27.5.1 - jest-environment-jsdom: ^27.5.1 - jest-environment-node: ^27.5.1 - jest-get-type: ^27.5.1 - jest-jasmine2: ^27.5.1 - jest-regex-util: ^27.5.1 - jest-resolve: ^27.5.1 - jest-runner: ^27.5.1 - jest-util: ^27.5.1 - jest-validate: ^27.5.1 + jest-circus: ^28.1.3 + jest-environment-node: ^28.1.3 + jest-get-type: ^28.0.2 + jest-regex-util: ^28.0.2 + jest-resolve: ^28.1.3 + jest-runner: ^28.1.3 + jest-util: ^28.1.3 + jest-validate: ^28.1.3 micromatch: ^4.0.4 parse-json: ^5.2.0 - pretty-format: ^27.5.1 + pretty-format: ^28.1.3 slash: ^3.0.0 strip-json-comments: ^3.1.1 peerDependencies: + "@types/node": "*" ts-node: ">=9.0.0" peerDependenciesMeta: + "@types/node": + optional: true ts-node: optional: true - checksum: 28867b165f0e25b711a2ade5f261a1b1606b476704ff68a50688eaf3b9c853f69542645cc7e0dab38079ed74e3acc99e38628faf736c1739e44fc869c62c6051 + checksum: d5c160e22036f14aaf2e48a72d69d31aa4f499be204e8d97e88b06f913dc93c0f55d3bb9deef8519481365349db91e1803353fe62e7ceba439cd650083a0a0e4 languageName: node linkType: hard @@ -24422,15 +24287,6 @@ __metadata: languageName: node linkType: hard -"jest-docblock@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-docblock@npm:27.5.1" - dependencies: - detect-newline: ^3.0.0 - checksum: 0ce3661a9152497b3a766996eda42edeab51f676fa57ec414a0168fef2a9b1784d056879281c22bca2875c9e63d41327cac0749a8c6e205330e13fcfe0e40316 - languageName: node - linkType: hard - "jest-docblock@npm:^28.1.1": version: 28.1.1 resolution: "jest-docblock@npm:28.1.1" @@ -24453,19 +24309,6 @@ __metadata: languageName: node linkType: hard -"jest-each@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-each@npm:27.5.1" - dependencies: - "@jest/types": ^27.5.1 - chalk: ^4.0.0 - jest-get-type: ^27.5.1 - jest-util: ^27.5.1 - pretty-format: ^27.5.1 - checksum: e382f677e69c15aa906ec0ae2d3d944aa948ce338b2bbcb480b76c16eb12cc2141d78edda48c510363e3b2c507cc2140569c3a163c64ffa34e14cc6a8b37fb81 - languageName: node - linkType: hard - "jest-each@npm:^28.1.3": version: 28.1.3 resolution: "jest-each@npm:28.1.3" @@ -24492,17 +24335,6 @@ __metadata: languageName: node linkType: hard -"jest-environment-jsdom-thirteen@npm:^1.0.1": - version: 1.0.1 - resolution: "jest-environment-jsdom-thirteen@npm:1.0.1" - dependencies: - jest-mock: ^24.0.0 - jest-util: ^24.0.0 - jsdom: ^13.0.0 - checksum: bd067dcdf9c8ac019911abaf7db8f98dd554a65b0c33317e8b8143bf9f413ce3fb3d4c1ac0e3c62fbe187c4b7e3e3bad6bee2103a22eb53b663451b4f92ebc64 - languageName: node - linkType: hard - "jest-environment-jsdom@npm:^24.0.0": version: 24.9.0 resolution: "jest-environment-jsdom@npm:24.9.0" @@ -24532,21 +24364,6 @@ __metadata: languageName: node linkType: hard -"jest-environment-jsdom@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-environment-jsdom@npm:27.5.1" - dependencies: - "@jest/environment": ^27.5.1 - "@jest/fake-timers": ^27.5.1 - "@jest/types": ^27.5.1 - "@types/node": "*" - jest-mock: ^27.5.1 - jest-util: ^27.5.1 - jsdom: ^16.6.0 - checksum: ea759ffa43e96d773983a4172c32c1a3774907723564a30a001c8a85d22d9ed82f6c45329a514152744e8916379c1c4cf9e527297ecfa1e8a4cc4888141b38fd - languageName: node - linkType: hard - "jest-environment-jsdom@npm:^28.0.0": version: 28.1.3 resolution: "jest-environment-jsdom@npm:28.1.3" @@ -24577,20 +24394,6 @@ __metadata: languageName: node linkType: hard -"jest-environment-node@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-environment-node@npm:27.5.1" - dependencies: - "@jest/environment": ^27.5.1 - "@jest/fake-timers": ^27.5.1 - "@jest/types": ^27.5.1 - "@types/node": "*" - jest-mock: ^27.5.1 - jest-util: ^27.5.1 - checksum: 3bbc31545436c6bb4a18841241e62036382a7261b9bb8cdc2823ec942a8a3053f98219b3ec2a4a7920bfba347602c16dd16767d9fece915134aee2e30091165c - languageName: node - linkType: hard - "jest-environment-node@npm:^28.1.1, jest-environment-node@npm:^28.1.3": version: 28.1.3 resolution: "jest-environment-node@npm:28.1.3" @@ -24787,28 +24590,28 @@ __metadata: languageName: node linkType: hard -"jest-jasmine2@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-jasmine2@npm:27.5.1" +"jest-jasmine2@npm:^28.0.0": + version: 28.1.3 + resolution: "jest-jasmine2@npm:28.1.3" dependencies: - "@jest/environment": ^27.5.1 - "@jest/source-map": ^27.5.1 - "@jest/test-result": ^27.5.1 - "@jest/types": ^27.5.1 + "@jest/environment": ^28.1.3 + "@jest/expect": ^28.1.3 + "@jest/source-map": ^28.1.2 + "@jest/test-result": ^28.1.3 + "@jest/types": ^28.1.3 "@types/node": "*" chalk: ^4.0.0 co: ^4.6.0 - expect: ^27.5.1 is-generator-fn: ^2.0.0 - jest-each: ^27.5.1 - jest-matcher-utils: ^27.5.1 - jest-message-util: ^27.5.1 - jest-runtime: ^27.5.1 - jest-snapshot: ^27.5.1 - jest-util: ^27.5.1 - pretty-format: ^27.5.1 - throat: ^6.0.1 - checksum: 028172d5d65abf7e8da89c30894112efdd18007a934f30b89e3f35def3764824a9680917996d5e551caa2087589a372a2539777d5554fa3bae6c7e36afec6d4c + jest-each: ^28.1.3 + jest-matcher-utils: ^28.1.3 + jest-message-util: ^28.1.3 + jest-runtime: ^28.1.3 + jest-snapshot: ^28.1.3 + jest-util: ^28.1.3 + p-limit: ^3.1.0 + pretty-format: ^28.1.3 + checksum: ebc28398279c3e9de0025d3d41bf03f47ead61c5486aaa55fa632ecdc7e83b14c7a454b0284360d04f127d6c9332c54a93a7d20b64fc479624584642cee11b68 languageName: node linkType: hard @@ -24834,16 +24637,6 @@ __metadata: languageName: node linkType: hard -"jest-leak-detector@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-leak-detector@npm:27.5.1" - dependencies: - jest-get-type: ^27.5.1 - pretty-format: ^27.5.1 - checksum: 33ec88ab7d76931ae0a03b18186234114e42a4e9fae748f8a197f7f85b884c2e92ea692c06704b8a469ac26b9c6411a7a1bbc8d34580ed56672a7f6be2681aee - languageName: node - linkType: hard - "jest-leak-detector@npm:^28.1.3": version: 28.1.3 resolution: "jest-leak-detector@npm:28.1.3" @@ -24986,7 +24779,7 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^24.0.0, jest-mock@npm:^24.9.0": +"jest-mock@npm:^24.9.0": version: 24.9.0 resolution: "jest-mock@npm:24.9.0" dependencies: @@ -25005,7 +24798,7 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^27.0.6, jest-mock@npm:^27.3.0, jest-mock@npm:^27.5.1": +"jest-mock@npm:^27.0.6, jest-mock@npm:^27.3.0": version: 27.5.1 resolution: "jest-mock@npm:27.5.1" dependencies: @@ -25128,14 +24921,13 @@ __metadata: languageName: node linkType: hard -"jest-resolve-dependencies@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-resolve-dependencies@npm:27.5.1" +"jest-resolve-dependencies@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-resolve-dependencies@npm:28.1.3" dependencies: - "@jest/types": ^27.5.1 - jest-regex-util: ^27.5.1 - jest-snapshot: ^27.5.1 - checksum: 06ba847f9386b0c198bb033a2041fac141dec443ae3c60acdc3426c1844aa4c942770f8f272a1f54686979894e389bc7774d4123bb3a0fbfabe02b7deef9ef62 + jest-regex-util: ^28.0.2 + jest-snapshot: ^28.1.3 + checksum: 534f5f1a204c00858e909ba4f66cbf7f3fcb0b787399ae803c66f2fb344eac1d0f3e802c579ca110a54a1271ec3b4eb7095ef14d56ffeae2b88da0e6ca6cd8a0 languageName: node linkType: hard @@ -25172,24 +24964,6 @@ __metadata: languageName: node linkType: hard -"jest-resolve@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-resolve@npm:27.5.1" - dependencies: - "@jest/types": ^27.5.1 - chalk: ^4.0.0 - graceful-fs: ^4.2.9 - jest-haste-map: ^27.5.1 - jest-pnp-resolver: ^1.2.2 - jest-util: ^27.5.1 - jest-validate: ^27.5.1 - resolve: ^1.20.0 - resolve.exports: ^1.1.0 - slash: ^3.0.0 - checksum: 5f9577e424346881964683f22472bd12bd9cfd70e49cb1800ccd31f2e88b0985ed353ca5cc7fb02de9093be2c733ab32de526c99a1192455ddb167afe916efd1 - languageName: node - linkType: hard - "jest-resolve@npm:^28.1.1, jest-resolve@npm:^28.1.3": version: 28.1.3 resolution: "jest-resolve@npm:28.1.3" @@ -25235,36 +25009,7 @@ __metadata: languageName: node linkType: hard -"jest-runner@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-runner@npm:27.5.1" - dependencies: - "@jest/console": ^27.5.1 - "@jest/environment": ^27.5.1 - "@jest/test-result": ^27.5.1 - "@jest/transform": ^27.5.1 - "@jest/types": ^27.5.1 - "@types/node": "*" - chalk: ^4.0.0 - emittery: ^0.8.1 - graceful-fs: ^4.2.9 - jest-docblock: ^27.5.1 - jest-environment-jsdom: ^27.5.1 - jest-environment-node: ^27.5.1 - jest-haste-map: ^27.5.1 - jest-leak-detector: ^27.5.1 - jest-message-util: ^27.5.1 - jest-resolve: ^27.5.1 - jest-runtime: ^27.5.1 - jest-util: ^27.5.1 - jest-worker: ^27.5.1 - source-map-support: ^0.5.6 - throat: ^6.0.1 - checksum: b79962003c641eaabe4fa8855ee2127009c48f929dfca67f7fbdbc3fe84ea827964d5cbfcfd791405448011014172ea8c4faffe3669a148824ef4fac37838fe8 - languageName: node - linkType: hard - -"jest-runner@npm:^28.1.1": +"jest-runner@npm:^28.1.1, jest-runner@npm:^28.1.3": version: 28.1.3 resolution: "jest-runner@npm:28.1.3" dependencies: @@ -25330,36 +25075,6 @@ __metadata: languageName: node linkType: hard -"jest-runtime@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-runtime@npm:27.5.1" - dependencies: - "@jest/environment": ^27.5.1 - "@jest/fake-timers": ^27.5.1 - "@jest/globals": ^27.5.1 - "@jest/source-map": ^27.5.1 - "@jest/test-result": ^27.5.1 - "@jest/transform": ^27.5.1 - "@jest/types": ^27.5.1 - chalk: ^4.0.0 - cjs-module-lexer: ^1.0.0 - collect-v8-coverage: ^1.0.0 - execa: ^5.0.0 - glob: ^7.1.3 - graceful-fs: ^4.2.9 - jest-haste-map: ^27.5.1 - jest-message-util: ^27.5.1 - jest-mock: ^27.5.1 - jest-regex-util: ^27.5.1 - jest-resolve: ^27.5.1 - jest-snapshot: ^27.5.1 - jest-util: ^27.5.1 - slash: ^3.0.0 - strip-bom: ^4.0.0 - checksum: 22ec24f4b928bdbdb7415ae7470ef523a6379812b8d0500d4d2f2124107d3af2c8fb99842352e320e79a47508a017dd5ab4b713270ad04ba9144c1961672ce29 - languageName: node - linkType: hard - "jest-runtime@npm:^28.1.3": version: 28.1.3 resolution: "jest-runtime@npm:28.1.3" @@ -25450,7 +25165,7 @@ __metadata: languageName: node linkType: hard -"jest-snapshot@npm:^27.0.2, jest-snapshot@npm:^27.5.1": +"jest-snapshot@npm:^27.0.2": version: 27.5.1 resolution: "jest-snapshot@npm:27.5.1" dependencies: @@ -25547,7 +25262,7 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^24.0.0, jest-util@npm:^24.9.0": +"jest-util@npm:^24.9.0": version: 24.9.0 resolution: "jest-util@npm:24.9.0" dependencies: @@ -25637,20 +25352,6 @@ __metadata: languageName: node linkType: hard -"jest-validate@npm:^27.5.1": - version: 27.5.1 - resolution: "jest-validate@npm:27.5.1" - dependencies: - "@jest/types": ^27.5.1 - camelcase: ^6.2.0 - chalk: ^4.0.0 - jest-get-type: ^27.5.1 - leven: ^3.1.0 - pretty-format: ^27.5.1 - checksum: ac5aa45b3ce798e450eda33764fa6d8c75f8794f92005e596928a78847b6013c5a6198ca2c2b4097a9315befb3868d12a52fbe7e6945cc85f81cb824d87c5c59 - languageName: node - linkType: hard - "jest-validate@npm:^28.1.1, jest-validate@npm:^28.1.3": version: 28.1.3 resolution: "jest-validate@npm:28.1.3" @@ -25712,7 +25413,7 @@ __metadata: languageName: node linkType: hard -"jest-watcher@npm:^27.0.0, jest-watcher@npm:^27.5.1": +"jest-watcher@npm:^27.0.0": version: 27.5.1 resolution: "jest-watcher@npm:27.5.1" dependencies: @@ -25799,13 +25500,14 @@ __metadata: languageName: node linkType: hard -"jest@npm:^27.5.1": - version: 27.5.1 - resolution: "jest@npm:27.5.1" +"jest@npm:^28.0.0": + version: 28.1.3 + resolution: "jest@npm:28.1.3" dependencies: - "@jest/core": ^27.5.1 + "@jest/core": ^28.1.3 + "@jest/types": ^28.1.3 import-local: ^3.0.2 - jest-cli: ^27.5.1 + jest-cli: ^28.1.3 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: @@ -25813,7 +25515,7 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: c013d07e911e423612756bc42d376e578b8721d847db38d94344f9cdf8fdaa0241b0a5c2fe1aad7b7758d415e0b9517c1098312f0d03760f123958d5b6cf5597 + checksum: 2423e06159976c026be8899fc6a6e4a0c314a4d8020edbfa51b70b7e30a2ddc8629401872483cc9d9c8939eaee494cbe777ed48b522920a51e01640c7ec8370f languageName: node linkType: hard @@ -26024,41 +25726,7 @@ __metadata: languageName: node linkType: hard -"jsdom@npm:^13.0.0": - version: 13.2.0 - resolution: "jsdom@npm:13.2.0" - dependencies: - abab: ^2.0.0 - acorn: ^6.0.4 - acorn-globals: ^4.3.0 - array-equal: ^1.0.0 - cssom: ^0.3.4 - cssstyle: ^1.1.1 - data-urls: ^1.1.0 - domexception: ^1.0.1 - escodegen: ^1.11.0 - html-encoding-sniffer: ^1.0.2 - nwsapi: ^2.0.9 - parse5: 5.1.0 - pn: ^1.1.0 - request: ^2.88.0 - request-promise-native: ^1.0.5 - saxes: ^3.1.5 - symbol-tree: ^3.2.2 - tough-cookie: ^2.5.0 - w3c-hr-time: ^1.0.1 - w3c-xmlserializer: ^1.0.1 - webidl-conversions: ^4.0.2 - whatwg-encoding: ^1.0.5 - whatwg-mimetype: ^2.3.0 - whatwg-url: ^7.0.0 - ws: ^6.1.2 - xml-name-validator: ^3.0.0 - checksum: e4bd3120f5c1077f6ace1ac2e069a104f48ff4df6507097b6740990c783ecec6017122dd9904f2500805d8003932020d32c9f922b21c3009864dfb70fbeac6bf - languageName: node - linkType: hard - -"jsdom@npm:^16.4.0, jsdom@npm:^16.6.0": +"jsdom@npm:^16.4.0": version: 16.7.0 resolution: "jsdom@npm:16.7.0" dependencies: @@ -30593,7 +30261,7 @@ __metadata: languageName: node linkType: hard -"nwsapi@npm:^2.0.7, nwsapi@npm:^2.0.9, nwsapi@npm:^2.2.0": +"nwsapi@npm:^2.0.7, nwsapi@npm:^2.2.0": version: 2.2.2 resolution: "nwsapi@npm:2.2.2" checksum: f7c4fedb0dc0786204ee99f440e9827d6e01a0c0322e93b5c9a9a382dd0bd9650d98ca3d1967a77554e3ec1f9a46a20cfea80a41fb00e91c5101c53d8b2c9aed @@ -35676,7 +35344,7 @@ __metadata: languageName: node linkType: hard -"saxes@npm:^3.1.5, saxes@npm:^3.1.9": +"saxes@npm:^3.1.9": version: 3.1.11 resolution: "saxes@npm:3.1.11" dependencies: @@ -38204,13 +37872,6 @@ __metadata: languageName: node linkType: hard -"throat@npm:^6.0.1": - version: 6.0.1 - resolution: "throat@npm:6.0.1" - checksum: 60a42d762a35d21ac71abd9eb4026b665fbbbf6ddd7bcbdcacc3c3b20f7b99f41939afedf9fe3273611f1b7c003ee98ac4dc94aa5edd1a6dc2a49985ad2545e1 - languageName: node - linkType: hard - "throttle-debounce@npm:^3.0.1": version: 3.0.1 resolution: "throttle-debounce@npm:3.0.1" @@ -38508,7 +38169,7 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:^2.3.3, tough-cookie@npm:^2.3.4, tough-cookie@npm:^2.5.0, tough-cookie@npm:~2.5.0": +"tough-cookie@npm:^2.3.3, tough-cookie@npm:^2.3.4, tough-cookie@npm:~2.5.0": version: 2.5.0 resolution: "tough-cookie@npm:2.5.0" dependencies: @@ -40017,18 +39678,7 @@ __metadata: languageName: node linkType: hard -"v8-to-istanbul@npm:^8.1.0": - version: 8.1.1 - resolution: "v8-to-istanbul@npm:8.1.1" - dependencies: - "@types/istanbul-lib-coverage": ^2.0.1 - convert-source-map: ^1.6.0 - source-map: ^0.7.3 - checksum: c3c99c4aa1ffffb098cc85c0c13c21871e6cbb9a83537d4e0650aa61589c347b2add787ceac68b8ea7fa1b7f446e9059d8e374cd7e7ab13b170a6caf8ad29c30 - languageName: node - linkType: hard - -"v8-to-istanbul@npm:^9.0.0": +"v8-to-istanbul@npm:^9.0.0, v8-to-istanbul@npm:^9.0.1": version: 9.0.1 resolution: "v8-to-istanbul@npm:9.0.1" dependencies: @@ -40525,7 +40175,7 @@ __metadata: languageName: node linkType: hard -"w3c-xmlserializer@npm:^1.0.1, w3c-xmlserializer@npm:^1.1.2": +"w3c-xmlserializer@npm:^1.1.2": version: 1.1.2 resolution: "w3c-xmlserializer@npm:1.1.2" dependencies: @@ -41367,7 +41017,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^6.1.0, ws@npm:^6.1.2": +"ws@npm:^6.1.0": version: 6.2.2 resolution: "ws@npm:6.2.2" dependencies: @@ -41690,7 +41340,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.2.1, yargs@npm:^17.4.0": +"yargs@npm:^17.2.1, yargs@npm:^17.3.1, yargs@npm:^17.4.0": version: 17.6.0 resolution: "yargs@npm:17.6.0" dependencies: diff --git a/scripts/package.json b/scripts/package.json index af2e463602cd..ce9e67339d85 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -57,7 +57,7 @@ "@compodoc/compodoc": "^1.1.18", "@emotion/babel-plugin": "^11.10.2", "@emotion/jest": "^11.10.0", - "@jest/globals": "^26.6.2", + "@jest/globals": "^28.0.0", "@linear/sdk": "^1.21.0", "@nrwl/cli": "14.6.1", "@nrwl/nx-cloud": "14.6.0", @@ -78,7 +78,7 @@ "@types/escodegen": "^0.0.6", "@types/express": "^4.17.11", "@types/fs-extra": "^9.0.6", - "@types/jest": "^26.0.16", + "@types/jest": "^28.0.0", "@types/js-yaml": "^3.12.6", "@types/node": "^16.0.0", "@types/node-cleanup": "^2.1.1", @@ -94,7 +94,7 @@ "@typescript-eslint/parser": "^5.15.0", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^10.1.0", - "babel-jest": "^26.6.3", + "babel-jest": "^28.0.0", "babel-loader": "^8.2.5", "babel-plugin-add-react-displayname": "^0.0.5", "babel-plugin-dynamic-import-node": "^2.3.3", @@ -123,9 +123,8 @@ "glob": "^7.1.6", "http-server": "^0.12.3", "husky": "^4.3.7", - "jest": "^26.6.3", - "jest-environment-jsdom": "^26.6.2", - "jest-environment-jsdom-thirteen": "^1.0.1", + "jest": "^28.0.0", + "jest-environment-jsdom": "^28.0.0", "jest-enzyme": "^7.1.2", "jest-image-snapshot": "^4.3.0", "jest-jasmine2": "^26.6.3", @@ -168,7 +167,7 @@ "tempy": "^1.0.0", "trash": "^7.0.0", "ts-dedent": "^2.0.0", - "ts-jest": "^26.4.4", + "ts-jest": "^28.0.0", "ts-node": "^10.4.0", "tsup": "^6.2.2", "typescript": "~4.6.3", diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 2023797dd75b..cd4096d0197b 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -113,7 +113,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.17.5, @babel/core@npm:^7.7.5": +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.17.5": version: 7.19.3 resolution: "@babel/core@npm:7.19.3" dependencies: @@ -2001,39 +2001,45 @@ __metadata: languageName: node linkType: hard -"@jest/core@npm:^26.6.3": - version: 26.6.3 - resolution: "@jest/core@npm:26.6.3" +"@jest/core@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/core@npm:28.1.3" dependencies: - "@jest/console": ^26.6.2 - "@jest/reporters": ^26.6.2 - "@jest/test-result": ^26.6.2 - "@jest/transform": ^26.6.2 - "@jest/types": ^26.6.2 + "@jest/console": ^28.1.3 + "@jest/reporters": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/transform": ^28.1.3 + "@jest/types": ^28.1.3 "@types/node": "*" ansi-escapes: ^4.2.1 chalk: ^4.0.0 + ci-info: ^3.2.0 exit: ^0.1.2 - graceful-fs: ^4.2.4 - jest-changed-files: ^26.6.2 - jest-config: ^26.6.3 - jest-haste-map: ^26.6.2 - jest-message-util: ^26.6.2 - jest-regex-util: ^26.0.0 - jest-resolve: ^26.6.2 - jest-resolve-dependencies: ^26.6.3 - jest-runner: ^26.6.3 - jest-runtime: ^26.6.3 - jest-snapshot: ^26.6.2 - jest-util: ^26.6.2 - jest-validate: ^26.6.2 - jest-watcher: ^26.6.2 - micromatch: ^4.0.2 - p-each-series: ^2.1.0 + graceful-fs: ^4.2.9 + jest-changed-files: ^28.1.3 + jest-config: ^28.1.3 + jest-haste-map: ^28.1.3 + jest-message-util: ^28.1.3 + jest-regex-util: ^28.0.2 + jest-resolve: ^28.1.3 + jest-resolve-dependencies: ^28.1.3 + jest-runner: ^28.1.3 + jest-runtime: ^28.1.3 + jest-snapshot: ^28.1.3 + jest-util: ^28.1.3 + jest-validate: ^28.1.3 + jest-watcher: ^28.1.3 + micromatch: ^4.0.4 + pretty-format: ^28.1.3 rimraf: ^3.0.0 slash: ^3.0.0 strip-ansi: ^6.0.0 - checksum: 3a4816997f1e206e0dfc6ad236f53b8a554a9b705aa78a62bc754697b8adf8314187a5ac8cfbd31ee6a38feec1412dc17c85cefe39e6d9e21f5e7e2697452e7e + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + checksum: eac1ac262303344cccace0cef9cee57298a90aa376e649f46110e8e950bb2b36579b9dc273b1f958fa9dca2c0c152b8b3107faf5ecb76a1e8109fdf9cbe4e600 languageName: node linkType: hard @@ -2151,7 +2157,7 @@ __metadata: languageName: node linkType: hard -"@jest/globals@npm:^28.1.3": +"@jest/globals@npm:^28.0.0, @jest/globals@npm:^28.1.3": version: 28.1.3 resolution: "@jest/globals@npm:28.1.3" dependencies: @@ -2200,39 +2206,41 @@ __metadata: languageName: node linkType: hard -"@jest/reporters@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/reporters@npm:26.6.2" +"@jest/reporters@npm:^28.1.3": + version: 28.1.3 + resolution: "@jest/reporters@npm:28.1.3" dependencies: "@bcoe/v8-coverage": ^0.2.3 - "@jest/console": ^26.6.2 - "@jest/test-result": ^26.6.2 - "@jest/transform": ^26.6.2 - "@jest/types": ^26.6.2 + "@jest/console": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/transform": ^28.1.3 + "@jest/types": ^28.1.3 + "@jridgewell/trace-mapping": ^0.3.13 + "@types/node": "*" chalk: ^4.0.0 collect-v8-coverage: ^1.0.0 exit: ^0.1.2 - glob: ^7.1.2 - graceful-fs: ^4.2.4 + glob: ^7.1.3 + graceful-fs: ^4.2.9 istanbul-lib-coverage: ^3.0.0 - istanbul-lib-instrument: ^4.0.3 + istanbul-lib-instrument: ^5.1.0 istanbul-lib-report: ^3.0.0 istanbul-lib-source-maps: ^4.0.0 - istanbul-reports: ^3.0.2 - jest-haste-map: ^26.6.2 - jest-resolve: ^26.6.2 - jest-util: ^26.6.2 - jest-worker: ^26.6.2 - node-notifier: ^8.0.0 + istanbul-reports: ^3.1.3 + jest-message-util: ^28.1.3 + jest-util: ^28.1.3 + jest-worker: ^28.1.3 slash: ^3.0.0 - source-map: ^0.6.0 string-length: ^4.0.1 + strip-ansi: ^6.0.0 terminal-link: ^2.0.0 - v8-to-istanbul: ^7.0.0 - dependenciesMeta: + v8-to-istanbul: ^9.0.1 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: node-notifier: optional: true - checksum: 311f8c467fc2e810ca884cd9ef032c6c58a88c4c54b41a7c85ae6da5a27b3d4c7042938f62611cf19a336a0d487976b348b8f3414cced2802b815d81bf7c1d5f + checksum: c54f989d8b2bca758a4740826042329399d7c4e1a47a67ccefede05db0a9f414fcb1f30ec3ce7b6c4f58843383fd3d24b0cc9e6d9390f90ba6a3edaf9f9c093c languageName: node linkType: hard @@ -2359,7 +2367,7 @@ __metadata: languageName: node linkType: hard -"@jest/test-sequencer@npm:^28.1.1": +"@jest/test-sequencer@npm:^28.1.1, @jest/test-sequencer@npm:^28.1.3": version: 28.1.3 resolution: "@jest/test-sequencer@npm:28.1.3" dependencies: @@ -3343,7 +3351,7 @@ __metadata: "@compodoc/compodoc": ^1.1.18 "@emotion/babel-plugin": ^11.10.2 "@emotion/jest": ^11.10.0 - "@jest/globals": ^26.6.2 + "@jest/globals": ^28.0.0 "@linear/sdk": ^1.21.0 "@nrwl/cli": 14.6.1 "@nrwl/nx-cloud": 14.6.0 @@ -3364,7 +3372,7 @@ __metadata: "@types/escodegen": ^0.0.6 "@types/express": ^4.17.11 "@types/fs-extra": ^9.0.6 - "@types/jest": ^26.0.16 + "@types/jest": ^28.0.0 "@types/js-yaml": ^3.12.6 "@types/lodash": ^4 "@types/node": ^16.0.0 @@ -3381,7 +3389,7 @@ __metadata: "@typescript-eslint/parser": ^5.15.0 babel-core: ^7.0.0-bridge.0 babel-eslint: ^10.1.0 - babel-jest: ^26.6.3 + babel-jest: ^28.0.0 babel-loader: ^8.2.5 babel-plugin-add-react-displayname: ^0.0.5 babel-plugin-dynamic-import-node: ^2.3.3 @@ -3410,9 +3418,8 @@ __metadata: glob: ^7.1.6 http-server: ^0.12.3 husky: ^4.3.7 - jest: ^26.6.3 - jest-environment-jsdom: ^26.6.2 - jest-environment-jsdom-thirteen: ^1.0.1 + jest: ^28.0.0 + jest-environment-jsdom: ^28.0.0 jest-enzyme: ^7.1.2 jest-image-snapshot: ^4.3.0 jest-jasmine2: ^26.6.3 @@ -3456,7 +3463,7 @@ __metadata: tempy: ^1.0.0 trash: ^7.0.0 ts-dedent: ^2.0.0 - ts-jest: ^26.4.4 + ts-jest: ^28.0.0 ts-loader: ^9.2.8 ts-node: ^10.4.0 tsup: ^6.2.2 @@ -3880,13 +3887,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^26.0.16": - version: 26.0.24 - resolution: "@types/jest@npm:26.0.24" +"@types/jest@npm:^28.0.0": + version: 28.1.8 + resolution: "@types/jest@npm:28.1.8" dependencies: - jest-diff: ^26.0.0 - pretty-format: ^26.0.0 - checksum: 1085ac96af43566518daf3aca60cb7881bfe2ffe1f5343738933e386ebf909095fde15273c3e99c685854dfc833b05b156fb5daf68707c0daa1c0c0db13a665b + expect: ^28.0.0 + pretty-format: ^28.0.0 + checksum: e69912b4285bd3a0545521425e76cdee669d89c4918b2126157c084bf496da1d0cf007366d47b99a9c7076e6567e16917b28c2790a19a6e72a80570c359e4de1 languageName: node linkType: hard @@ -3897,6 +3904,17 @@ __metadata: languageName: node linkType: hard +"@types/jsdom@npm:^16.2.4": + version: 16.2.15 + resolution: "@types/jsdom@npm:16.2.15" + dependencies: + "@types/node": "*" + "@types/parse5": ^6.0.3 + "@types/tough-cookie": "*" + checksum: d4ea8dc4568ba5cf37c3c246be360d45758d47ff056ca1321e23f5ff680dc63177ec78f9a82218d2f3c936ca458ea056c05ff37a2c5abca28410bd0120763ea7 + languageName: node + linkType: hard + "@types/json-schema@npm:^7.0.5, @types/json-schema@npm:^7.0.9": version: 7.0.11 resolution: "@types/json-schema@npm:7.0.11" @@ -4000,6 +4018,13 @@ __metadata: languageName: node linkType: hard +"@types/parse5@npm:^6.0.3": + version: 6.0.3 + resolution: "@types/parse5@npm:6.0.3" + checksum: a7c7ef6625974b74b93c1105953003a2291897e453369efcadc569b907de2784d61d4e6905de3ef959fa07f3278f41ed0c22ead0173776023fc43b6ed31042d0 + languageName: node + linkType: hard + "@types/prettier@npm:^2.0.0, @types/prettier@npm:^2.1.5": version: 2.7.1 resolution: "@types/prettier@npm:2.7.1" @@ -4132,6 +4157,13 @@ __metadata: languageName: node linkType: hard +"@types/tough-cookie@npm:*": + version: 4.0.2 + resolution: "@types/tough-cookie@npm:4.0.2" + checksum: 38d01fc79a9a87166253b8c548bb401599424c57a818bea1b47a68be6dcd37fc3bff381f978354e00221f284937d5066bb92d58bf79952f9d21deb934e8ec9a7 + languageName: node + linkType: hard + "@types/unist@npm:*, @types/unist@npm:^2.0.0, @types/unist@npm:^2.0.2": version: 2.0.6 resolution: "@types/unist@npm:2.0.6" @@ -4445,7 +4477,7 @@ __metadata: languageName: node linkType: hard -"abab@npm:^2.0.0, abab@npm:^2.0.3, abab@npm:^2.0.5": +"abab@npm:^2.0.0, abab@npm:^2.0.3, abab@npm:^2.0.5, abab@npm:^2.0.6": version: 2.0.6 resolution: "abab@npm:2.0.6" checksum: 0b245c3c3ea2598fe0025abf7cc7bb507b06949d51e8edae5d12c1b847a0a0c09639abcb94788332b4e2044ac4491c1e8f571b51c7826fd4b0bda1685ad4a278 @@ -4514,7 +4546,7 @@ __metadata: languageName: node linkType: hard -"acorn-globals@npm:^4.1.0, acorn-globals@npm:^4.3.0, acorn-globals@npm:^4.3.2": +"acorn-globals@npm:^4.1.0, acorn-globals@npm:^4.3.2": version: 4.3.4 resolution: "acorn-globals@npm:4.3.4" dependencies: @@ -4584,7 +4616,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^6.0.1, acorn@npm:^6.0.4": +"acorn@npm:^6.0.1": version: 6.4.2 resolution: "acorn@npm:6.4.2" bin: @@ -4611,6 +4643,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.5.0": + version: 8.8.1 + resolution: "acorn@npm:8.8.1" + bin: + acorn: bin/acorn + checksum: 9fd00e3373ecd6c7e8f6adfb3216f5bc9ac050e6fc4ef932f03dbd1d45ccc08289ae16fc9eec10c5de8f1ca65b5f70c02635e1e9015d109dae96fdede340abf5 + languageName: node + linkType: hard + "address@npm:^1.0.1": version: 1.2.1 resolution: "address@npm:1.2.1" @@ -5325,7 +5366,7 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^28.1.1": +"babel-jest@npm:^28.0.0, babel-jest@npm:^28.1.1, babel-jest@npm:^28.1.3": version: 28.1.3 resolution: "babel-jest@npm:28.1.3" dependencies: @@ -5855,7 +5896,7 @@ __metadata: languageName: node linkType: hard -"buffer-from@npm:1.x, buffer-from@npm:^1.0.0": +"buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" checksum: 124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 @@ -6854,7 +6895,7 @@ __metadata: languageName: node linkType: hard -"cssom@npm:0.3.x, cssom@npm:>= 0.3.2 < 0.4.0, cssom@npm:^0.3.4, cssom@npm:~0.3.6": +"cssom@npm:0.3.x, cssom@npm:>= 0.3.2 < 0.4.0, cssom@npm:~0.3.6": version: 0.3.8 resolution: "cssom@npm:0.3.8" checksum: d74017b209440822f9e24d8782d6d2e808a8fdd58fa626a783337222fe1c87a518ba944d4c88499031b4786e68772c99dfae616638d71906fe9f203aeaf14411 @@ -6868,7 +6909,14 @@ __metadata: languageName: node linkType: hard -"cssstyle@npm:^1.0.0, cssstyle@npm:^1.1.1": +"cssom@npm:^0.5.0": + version: 0.5.0 + resolution: "cssom@npm:0.5.0" + checksum: 8c4121c243baf0678c65dcac29b201ff0067dfecf978de9d5c83b2ff127a8fdefd2bfd54577f5ad8c80ed7d2c8b489ae01c82023545d010c4ecb87683fb403dd + languageName: node + linkType: hard + +"cssstyle@npm:^1.0.0": version: 1.4.0 resolution: "cssstyle@npm:1.4.0" dependencies: @@ -7009,6 +7057,17 @@ __metadata: languageName: node linkType: hard +"data-urls@npm:^3.0.1": + version: 3.0.2 + resolution: "data-urls@npm:3.0.2" + dependencies: + abab: ^2.0.6 + whatwg-mimetype: ^3.0.0 + whatwg-url: ^11.0.0 + checksum: 051c3aaaf3e961904f136aab095fcf6dff4db23a7fc759dd8ba7b3e6ba03fc07ef608086caad8ab910d864bd3b5e57d0d2f544725653d77c96a2c971567045f4 + languageName: node + linkType: hard + "dayjs@npm:1.10.4": version: 1.10.4 resolution: "dayjs@npm:1.10.4" @@ -7078,6 +7137,13 @@ __metadata: languageName: node linkType: hard +"decimal.js@npm:^10.3.1": + version: 10.4.2 + resolution: "decimal.js@npm:10.4.2" + checksum: 2f50de33c9c9fcd4c7ffd74cd02edecadeaa4d954e14ef721ee1d381d293c9237b1a90f54198b91f06fd5d3bb8b97079bba54fbc9ccd205d9e6bc8ffa82f6202 + languageName: node + linkType: hard + "decode-uri-component@npm:^0.2.0": version: 0.2.0 resolution: "decode-uri-component@npm:0.2.0" @@ -7450,6 +7516,15 @@ __metadata: languageName: node linkType: hard +"domexception@npm:^4.0.0": + version: 4.0.0 + resolution: "domexception@npm:4.0.0" + dependencies: + webidl-conversions: ^7.0.0 + checksum: 774277cd9d4df033f852196e3c0077a34dbd15a96baa4d166e0e47138a80f4c0bdf0d94e4703e6ff5883cec56bb821a6fff84402d8a498e31de7c87eb932a294 + languageName: node + linkType: hard + "domhandler@npm:^2.3.0": version: 2.4.2 resolution: "domhandler@npm:2.4.2" @@ -8279,7 +8354,7 @@ __metadata: languageName: node linkType: hard -"escodegen@npm:^1.11.0, escodegen@npm:^1.11.1, escodegen@npm:^1.9.1": +"escodegen@npm:^1.11.1, escodegen@npm:^1.9.1": version: 1.14.3 resolution: "escodegen@npm:1.14.3" dependencies: @@ -8835,7 +8910,7 @@ __metadata: languageName: node linkType: hard -"execa@npm:^4.0.0, execa@npm:^4.0.2, execa@npm:^4.1.0": +"execa@npm:^4.0.2, execa@npm:^4.1.0": version: 4.1.0 resolution: "execa@npm:4.1.0" dependencies: @@ -8914,7 +8989,7 @@ __metadata: languageName: node linkType: hard -"expect@npm:^28.1.3": +"expect@npm:^28.0.0, expect@npm:^28.1.3": version: 28.1.3 resolution: "expect@npm:28.1.3" dependencies: @@ -9476,6 +9551,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:^4.0.0": + version: 4.0.0 + resolution: "form-data@npm:4.0.0" + dependencies: + asynckit: ^0.4.0 + combined-stream: ^1.0.8 + mime-types: ^2.1.12 + checksum: cb6f3ac49180be03ff07ba3ff125f9eba2ff0b277fb33c7fc47569fc5e616882c5b1c69b9904c4c4187e97dd0419dd03b134174756f296dec62041e6527e2c6e + languageName: node + linkType: hard + "form-data@npm:~2.3.2": version: 2.3.3 resolution: "form-data@npm:2.3.3" @@ -10052,13 +10138,6 @@ __metadata: languageName: node linkType: hard -"growly@npm:^1.3.0": - version: 1.3.0 - resolution: "growly@npm:1.3.0" - checksum: 3043bd5c064e87f89e8c9b66894ed09fd882c7fa645621a543b45b72f040c7241e25061207a858ab191be2fbdac34795ff57c2a40962b154a6b2908a5e509252 - languageName: node - linkType: hard - "handlebars@npm:4.7.7, handlebars@npm:^4.7.7": version: 4.7.7 resolution: "handlebars@npm:4.7.7" @@ -10278,6 +10357,15 @@ __metadata: languageName: node linkType: hard +"html-encoding-sniffer@npm:^3.0.0": + version: 3.0.0 + resolution: "html-encoding-sniffer@npm:3.0.0" + dependencies: + whatwg-encoding: ^2.0.0 + checksum: b17b3b0fb5d061d8eb15121c3b0b536376c3e295ecaf09ba48dd69c6b6c957839db124fe1e2b3f11329753a4ee01aa7dedf63b7677999e86da17fbbdd82c5386 + languageName: node + linkType: hard + "html-entities@npm:^2.3.2": version: 2.3.3 resolution: "html-entities@npm:2.3.3" @@ -10615,7 +10703,7 @@ __metadata: languageName: node linkType: hard -"iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3": +"iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" dependencies: @@ -11393,18 +11481,6 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-instrument@npm:^4.0.3": - version: 4.0.3 - resolution: "istanbul-lib-instrument@npm:4.0.3" - dependencies: - "@babel/core": ^7.7.5 - "@istanbuljs/schema": ^0.1.2 - istanbul-lib-coverage: ^3.0.0 - semver: ^6.3.0 - checksum: 7f1005566a912e33e847576b2c1072d48a7c556810a54d912f3e2f0bd966171e68b30c40b0c1ce6ee9b8864de422d0c10e2d0dfd2d25b48723950cc78cd437c2 - languageName: node - linkType: hard - "istanbul-lib-instrument@npm:^5.0.4, istanbul-lib-instrument@npm:^5.1.0": version: 5.2.0 resolution: "istanbul-lib-instrument@npm:5.2.0" @@ -11440,7 +11516,7 @@ __metadata: languageName: node linkType: hard -"istanbul-reports@npm:^3.0.2, istanbul-reports@npm:^3.1.3": +"istanbul-reports@npm:^3.1.3": version: 3.1.5 resolution: "istanbul-reports@npm:3.1.5" dependencies: @@ -11464,18 +11540,17 @@ __metadata: languageName: node linkType: hard -"jest-changed-files@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-changed-files@npm:26.6.2" +"jest-changed-files@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-changed-files@npm:28.1.3" dependencies: - "@jest/types": ^26.6.2 - execa: ^4.0.0 - throat: ^5.0.0 - checksum: 6b679ba45c3fe08f659b59e2c22b6b773436e498aa57e62694ea1f185ed3d4e439bc1831dedca3df7b28d1562eec31ae9d79c65c8caea1dd5e620419da20013d + execa: ^5.0.0 + p-limit: ^3.1.0 + checksum: fec92f6348456c3157ac74abcfe8b341d7d8ddbb51efc1bc7d76b9e613c6a0b1bf627b505b5f49ec4d7829885a6cf2615920eeeda7f55bc0aed4695cf02e1085 languageName: node linkType: hard -"jest-circus@npm:^28.1.1": +"jest-circus@npm:^28.1.1, jest-circus@npm:^28.1.3": version: 28.1.3 resolution: "jest-circus@npm:28.1.3" dependencies: @@ -11502,26 +11577,30 @@ __metadata: languageName: node linkType: hard -"jest-cli@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-cli@npm:26.6.3" +"jest-cli@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-cli@npm:28.1.3" dependencies: - "@jest/core": ^26.6.3 - "@jest/test-result": ^26.6.2 - "@jest/types": ^26.6.2 + "@jest/core": ^28.1.3 + "@jest/test-result": ^28.1.3 + "@jest/types": ^28.1.3 chalk: ^4.0.0 exit: ^0.1.2 - graceful-fs: ^4.2.4 + graceful-fs: ^4.2.9 import-local: ^3.0.2 - is-ci: ^2.0.0 - jest-config: ^26.6.3 - jest-util: ^26.6.2 - jest-validate: ^26.6.2 + jest-config: ^28.1.3 + jest-util: ^28.1.3 + jest-validate: ^28.1.3 prompts: ^2.0.1 - yargs: ^15.4.1 + yargs: ^17.3.1 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true bin: jest: bin/jest.js - checksum: 3f62c26b300549115bcfc0393d7d49467d414d200bb211a8843fd48d0296ddbfc5e6fe808c64ad2039127657b662e3ba3db44166341bd5db2d089bf09cf82a2c + checksum: 7d47b89785fd6cf7c21560fcf09280bfb80057e3e7f85d4da2828d780a6ff81a1a41611e55eb3831564530edc3060159d23fd20d60d6640161d4652233c0c6a3 languageName: node linkType: hard @@ -11594,7 +11673,45 @@ __metadata: languageName: node linkType: hard -"jest-diff@npm:^26.0.0, jest-diff@npm:^26.6.2": +"jest-config@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-config@npm:28.1.3" + dependencies: + "@babel/core": ^7.11.6 + "@jest/test-sequencer": ^28.1.3 + "@jest/types": ^28.1.3 + babel-jest: ^28.1.3 + chalk: ^4.0.0 + ci-info: ^3.2.0 + deepmerge: ^4.2.2 + glob: ^7.1.3 + graceful-fs: ^4.2.9 + jest-circus: ^28.1.3 + jest-environment-node: ^28.1.3 + jest-get-type: ^28.0.2 + jest-regex-util: ^28.0.2 + jest-resolve: ^28.1.3 + jest-runner: ^28.1.3 + jest-util: ^28.1.3 + jest-validate: ^28.1.3 + micromatch: ^4.0.4 + parse-json: ^5.2.0 + pretty-format: ^28.1.3 + slash: ^3.0.0 + strip-json-comments: ^3.1.1 + peerDependencies: + "@types/node": "*" + ts-node: ">=9.0.0" + peerDependenciesMeta: + "@types/node": + optional: true + ts-node: + optional: true + checksum: d5c160e22036f14aaf2e48a72d69d31aa4f499be204e8d97e88b06f913dc93c0f55d3bb9deef8519481365349db91e1803353fe62e7ceba439cd650083a0a0e4 + languageName: node + linkType: hard + +"jest-diff@npm:^26.6.2": version: 26.6.2 resolution: "jest-diff@npm:26.6.2" dependencies: @@ -11687,17 +11804,6 @@ __metadata: languageName: node linkType: hard -"jest-environment-jsdom-thirteen@npm:^1.0.1": - version: 1.0.1 - resolution: "jest-environment-jsdom-thirteen@npm:1.0.1" - dependencies: - jest-mock: ^24.0.0 - jest-util: ^24.0.0 - jsdom: ^13.0.0 - checksum: bd067dcdf9c8ac019911abaf7db8f98dd554a65b0c33317e8b8143bf9f413ce3fb3d4c1ac0e3c62fbe187c4b7e3e3bad6bee2103a22eb53b663451b4f92ebc64 - languageName: node - linkType: hard - "jest-environment-jsdom@npm:^24.0.0": version: 24.9.0 resolution: "jest-environment-jsdom@npm:24.9.0" @@ -11727,6 +11833,22 @@ __metadata: languageName: node linkType: hard +"jest-environment-jsdom@npm:^28.0.0": + version: 28.1.3 + resolution: "jest-environment-jsdom@npm:28.1.3" + dependencies: + "@jest/environment": ^28.1.3 + "@jest/fake-timers": ^28.1.3 + "@jest/types": ^28.1.3 + "@types/jsdom": ^16.2.4 + "@types/node": "*" + jest-mock: ^28.1.3 + jest-util: ^28.1.3 + jsdom: ^19.0.0 + checksum: f3239dc01f33ae613eff6f3bad61b5c7709385085a85904e44d6457c38aa5e4500792da475bfd7918b1aaff7a6c1febbb5b6e9974f7e08bcc273b7f5242ac95d + languageName: node + linkType: hard + "jest-environment-node@npm:^26.6.2": version: 26.6.2 resolution: "jest-environment-node@npm:26.6.2" @@ -12058,7 +12180,7 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^24.0.0, jest-mock@npm:^24.9.0": +"jest-mock@npm:^24.9.0": version: 24.9.0 resolution: "jest-mock@npm:24.9.0" dependencies: @@ -12151,14 +12273,13 @@ __metadata: languageName: node linkType: hard -"jest-resolve-dependencies@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-resolve-dependencies@npm:26.6.3" +"jest-resolve-dependencies@npm:^28.1.3": + version: 28.1.3 + resolution: "jest-resolve-dependencies@npm:28.1.3" dependencies: - "@jest/types": ^26.6.2 - jest-regex-util: ^26.0.0 - jest-snapshot: ^26.6.2 - checksum: d8a9392354d7775e2e7234e854069a1e0d21ea616b8de162562b57d77e296b8259952d03f10e2a3031a2369657d5950a807391455dadbafb3f4523804a2585d6 + jest-regex-util: ^28.0.2 + jest-snapshot: ^28.1.3 + checksum: 534f5f1a204c00858e909ba4f66cbf7f3fcb0b787399ae803c66f2fb344eac1d0f3e802c579ca110a54a1271ec3b4eb7095ef14d56ffeae2b88da0e6ca6cd8a0 languageName: node linkType: hard @@ -12240,7 +12361,7 @@ __metadata: languageName: node linkType: hard -"jest-runner@npm:^28.1.1": +"jest-runner@npm:^28.1.1, jest-runner@npm:^28.1.3": version: 28.1.3 resolution: "jest-runner@npm:28.1.3" dependencies: @@ -12431,7 +12552,7 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^24.0.0, jest-util@npm:^24.9.0": +"jest-util@npm:^24.9.0": version: 24.9.0 resolution: "jest-util@npm:24.9.0" dependencies: @@ -12451,7 +12572,7 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^26.1.0, jest-util@npm:^26.6.2": +"jest-util@npm:^26.6.2": version: 26.6.2 resolution: "jest-util@npm:26.6.2" dependencies: @@ -12479,7 +12600,7 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^28.1.1, jest-util@npm:^28.1.3": +"jest-util@npm:^28.0.0, jest-util@npm:^28.1.1, jest-util@npm:^28.1.3": version: 28.1.3 resolution: "jest-util@npm:28.1.3" dependencies: @@ -12552,21 +12673,6 @@ __metadata: languageName: node linkType: hard -"jest-watcher@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-watcher@npm:26.6.2" - dependencies: - "@jest/test-result": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - ansi-escapes: ^4.2.1 - chalk: ^4.0.0 - jest-util: ^26.6.2 - string-length: ^4.0.1 - checksum: 3a0caf17f3d586ec7099a576757336e6ba5ac6f2449e66aa1416214b32188970b1fa10f83e1aef58254a30a55a6698cbbb16aa5187c8023516d8bea8833aee12 - languageName: node - linkType: hard - "jest-watcher@npm:^27.0.0": version: 27.5.1 resolution: "jest-watcher@npm:27.5.1" @@ -12630,16 +12736,22 @@ __metadata: languageName: node linkType: hard -"jest@npm:^26.6.3": - version: 26.6.3 - resolution: "jest@npm:26.6.3" +"jest@npm:^28.0.0": + version: 28.1.3 + resolution: "jest@npm:28.1.3" dependencies: - "@jest/core": ^26.6.3 + "@jest/core": ^28.1.3 + "@jest/types": ^28.1.3 import-local: ^3.0.2 - jest-cli: ^26.6.3 + jest-cli: ^28.1.3 + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true bin: jest: bin/jest.js - checksum: 4469f5c426f5b00855e2264dc4fce5ab16c0fab31d2dc6fc829d769ca7ec84a9c74763f7c1d281d085ad55897927a08df2b4778b0df899a66188ff0722e17d29 + checksum: 2423e06159976c026be8899fc6a6e4a0c314a4d8020edbfa51b70b7e30a2ddc8629401872483cc9d9c8939eaee494cbe777ed48b522920a51e01640c7ec8370f languageName: node linkType: hard @@ -12780,40 +12892,6 @@ __metadata: languageName: node linkType: hard -"jsdom@npm:^13.0.0": - version: 13.2.0 - resolution: "jsdom@npm:13.2.0" - dependencies: - abab: ^2.0.0 - acorn: ^6.0.4 - acorn-globals: ^4.3.0 - array-equal: ^1.0.0 - cssom: ^0.3.4 - cssstyle: ^1.1.1 - data-urls: ^1.1.0 - domexception: ^1.0.1 - escodegen: ^1.11.0 - html-encoding-sniffer: ^1.0.2 - nwsapi: ^2.0.9 - parse5: 5.1.0 - pn: ^1.1.0 - request: ^2.88.0 - request-promise-native: ^1.0.5 - saxes: ^3.1.5 - symbol-tree: ^3.2.2 - tough-cookie: ^2.5.0 - w3c-hr-time: ^1.0.1 - w3c-xmlserializer: ^1.0.1 - webidl-conversions: ^4.0.2 - whatwg-encoding: ^1.0.5 - whatwg-mimetype: ^2.3.0 - whatwg-url: ^7.0.0 - ws: ^6.1.2 - xml-name-validator: ^3.0.0 - checksum: e4bd3120f5c1077f6ace1ac2e069a104f48ff4df6507097b6740990c783ecec6017122dd9904f2500805d8003932020d32c9f922b21c3009864dfb70fbeac6bf - languageName: node - linkType: hard - "jsdom@npm:^16.4.0": version: 16.7.0 resolution: "jsdom@npm:16.7.0" @@ -12854,6 +12932,46 @@ __metadata: languageName: node linkType: hard +"jsdom@npm:^19.0.0": + version: 19.0.0 + resolution: "jsdom@npm:19.0.0" + dependencies: + abab: ^2.0.5 + acorn: ^8.5.0 + acorn-globals: ^6.0.0 + cssom: ^0.5.0 + cssstyle: ^2.3.0 + data-urls: ^3.0.1 + decimal.js: ^10.3.1 + domexception: ^4.0.0 + escodegen: ^2.0.0 + form-data: ^4.0.0 + html-encoding-sniffer: ^3.0.0 + http-proxy-agent: ^5.0.0 + https-proxy-agent: ^5.0.0 + is-potential-custom-element-name: ^1.0.1 + nwsapi: ^2.2.0 + parse5: 6.0.1 + saxes: ^5.0.1 + symbol-tree: ^3.2.4 + tough-cookie: ^4.0.0 + w3c-hr-time: ^1.0.2 + w3c-xmlserializer: ^3.0.0 + webidl-conversions: ^7.0.0 + whatwg-encoding: ^2.0.0 + whatwg-mimetype: ^3.0.0 + whatwg-url: ^10.0.0 + ws: ^8.2.3 + xml-name-validator: ^4.0.0 + peerDependencies: + canvas: ^2.5.0 + peerDependenciesMeta: + canvas: + optional: true + checksum: c39c71aa64df60f2b609adfc61fa4406c1a710da3278c730b0093181d1d09c1e6ba5551e32d78259a21800e10c2984c571777d6f7080249a5d21287be4f17bd9 + languageName: node + linkType: hard + "jsesc@npm:^2.5.1": version: 2.5.2 resolution: "jsesc@npm:2.5.2" @@ -12921,15 +13039,6 @@ __metadata: languageName: node linkType: hard -"json5@npm:2.x, json5@npm:^2.0.0, json5@npm:^2.1.0, json5@npm:^2.1.2, json5@npm:^2.2.0, json5@npm:^2.2.1": - version: 2.2.1 - resolution: "json5@npm:2.2.1" - bin: - json5: lib/cli.js - checksum: a7174bc4e146613750a04a8a7fe2bc4ab6f4cad20486f8d7026cc4546b3ee1dc3762fc5e7377557ae99414745aac782486e409f31c363084a455e05cb495ce7a - languageName: node - linkType: hard - "json5@npm:^1.0.1": version: 1.0.1 resolution: "json5@npm:1.0.1" @@ -12941,6 +13050,15 @@ __metadata: languageName: node linkType: hard +"json5@npm:^2.0.0, json5@npm:^2.1.0, json5@npm:^2.1.2, json5@npm:^2.2.0, json5@npm:^2.2.1": + version: 2.2.1 + resolution: "json5@npm:2.2.1" + bin: + json5: lib/cli.js + checksum: a7174bc4e146613750a04a8a7fe2bc4ab6f4cad20486f8d7026cc4546b3ee1dc3762fc5e7377557ae99414745aac782486e409f31c363084a455e05cb495ce7a + languageName: node + linkType: hard + "jsonc-parser@npm:3.0.0": version: 3.0.0 resolution: "jsonc-parser@npm:3.0.0" @@ -13608,7 +13726,7 @@ __metadata: languageName: node linkType: hard -"lodash.memoize@npm:^4.1.2": +"lodash.memoize@npm:4.x, lodash.memoize@npm:^4.1.2": version: 4.1.2 resolution: "lodash.memoize@npm:4.1.2" checksum: c8713e51eccc650422716a14cece1809cfe34bc5ab5e242b7f8b4e2241c2483697b971a604252807689b9dd69bfe3a98852e19a5b89d506b000b4187a1285df8 @@ -13657,7 +13775,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:4.x, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.7.0": +"lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.7.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c @@ -14343,15 +14461,6 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:1.x, mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": - version: 1.0.4 - resolution: "mkdirp@npm:1.0.4" - bin: - mkdirp: bin/cmd.js - checksum: 46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf - languageName: node - linkType: hard - "mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.4, mkdirp@npm:^0.5.6, mkdirp@npm:~0.5.1": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" @@ -14363,6 +14472,15 @@ __metadata: languageName: node linkType: hard +"mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": + version: 1.0.4 + resolution: "mkdirp@npm:1.0.4" + bin: + mkdirp: bin/cmd.js + checksum: 46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf + languageName: node + linkType: hard + "mocha-list-tests@npm:^1.0.5": version: 1.1.0 resolution: "mocha-list-tests@npm:1.1.0" @@ -14694,20 +14812,6 @@ __metadata: languageName: node linkType: hard -"node-notifier@npm:^8.0.0": - version: 8.0.2 - resolution: "node-notifier@npm:8.0.2" - dependencies: - growly: ^1.3.0 - is-wsl: ^2.2.0 - semver: ^7.3.2 - shellwords: ^0.1.1 - uuid: ^8.3.0 - which: ^2.0.2 - checksum: 8df8618628c14ef26214a376dbde425264b92ae5e5944d21807f41e3d2ed3ff29f6c5aba089f4a5f22328b2157aa874e93f2304a2134b1ee59508cedf7e889bb - languageName: node - linkType: hard - "node-releases@npm:^2.0.6": version: 2.0.6 resolution: "node-releases@npm:2.0.6" @@ -14825,7 +14929,7 @@ __metadata: languageName: node linkType: hard -"nwsapi@npm:^2.0.7, nwsapi@npm:^2.0.9, nwsapi@npm:^2.2.0": +"nwsapi@npm:^2.0.7, nwsapi@npm:^2.2.0": version: 2.2.2 resolution: "nwsapi@npm:2.2.2" checksum: f7c4fedb0dc0786204ee99f440e9827d6e01a0c0322e93b5c9a9a382dd0bd9650d98ca3d1967a77554e3ec1f9a46a20cfea80a41fb00e91c5101c53d8b2c9aed @@ -15172,13 +15276,6 @@ __metadata: languageName: node linkType: hard -"p-each-series@npm:^2.1.0": - version: 2.2.0 - resolution: "p-each-series@npm:2.2.0" - checksum: 32a7cce1312bf70f99079db2ff070fc3ee2ed6efe0fa0444616fa38f79730ad09b461d009127d25254c4c865c40b6664e2c656b1a7b2c4781756d9173c974269 - languageName: node - linkType: hard - "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -15745,7 +15842,7 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^26.0.0, pretty-format@npm:^26.6.2": +"pretty-format@npm:^26.6.2": version: 26.6.2 resolution: "pretty-format@npm:26.6.2" dependencies: @@ -15768,7 +15865,7 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^28.1.1, pretty-format@npm:^28.1.3": +"pretty-format@npm:^28.0.0, pretty-format@npm:^28.1.1, pretty-format@npm:^28.1.3": version: 28.1.3 resolution: "pretty-format@npm:28.1.3" dependencies: @@ -17259,7 +17356,7 @@ __metadata: languageName: node linkType: hard -"saxes@npm:^3.1.5, saxes@npm:^3.1.9": +"saxes@npm:^3.1.9": version: 3.1.11 resolution: "saxes@npm:3.1.11" dependencies: @@ -17547,13 +17644,6 @@ __metadata: languageName: node linkType: hard -"shellwords@npm:^0.1.1": - version: 0.1.1 - resolution: "shellwords@npm:0.1.1" - checksum: 7d66b28927e0b524b71b2e185651fcd88a70473a077dd230fbf86188380e948ffb36cea00832d78fc13c93cd15f6f52286fb05f2746b7580623ca1ec619eb004 - languageName: node - linkType: hard - "shx@npm:^0.3.2": version: 0.3.4 resolution: "shx@npm:0.3.4" @@ -17816,13 +17906,6 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.7.3": - version: 0.7.4 - resolution: "source-map@npm:0.7.4" - checksum: dc0cf3768fe23c345ea8760487f8c97ef6fca8a73c83cd7c9bf2fde8bc2c34adb9c0824d6feb14bc4f9e37fb522e18af621543f1289038a66ac7586da29aa7dc - languageName: node - linkType: hard - "source-map@npm:~0.1.30": version: 0.1.43 resolution: "source-map@npm:0.1.43" @@ -18664,7 +18747,7 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:^2.3.3, tough-cookie@npm:^2.3.4, tough-cookie@npm:^2.5.0, tough-cookie@npm:~2.5.0": +"tough-cookie@npm:^2.3.3, tough-cookie@npm:^2.3.4, tough-cookie@npm:~2.5.0": version: 2.5.0 resolution: "tough-cookie@npm:2.5.0" dependencies: @@ -18725,6 +18808,15 @@ __metadata: languageName: node linkType: hard +"tr46@npm:^3.0.0": + version: 3.0.0 + resolution: "tr46@npm:3.0.0" + dependencies: + punycode: ^2.1.1 + checksum: cdc47cad3a9d0b6cb293e39ccb1066695ae6fdd39b9e4f351b010835a1f8b4f3a6dc3a55e896b421371187f22b48d7dac1b693de4f6551bdef7b6ab6735dfe3b + languageName: node + linkType: hard + "tr46@npm:~0.0.3": version: 0.0.3 resolution: "tr46@npm:0.0.3" @@ -18806,26 +18898,36 @@ __metadata: languageName: node linkType: hard -"ts-jest@npm:^26.4.4": - version: 26.5.6 - resolution: "ts-jest@npm:26.5.6" +"ts-jest@npm:^28.0.0": + version: 28.0.8 + resolution: "ts-jest@npm:28.0.8" dependencies: bs-logger: 0.x - buffer-from: 1.x fast-json-stable-stringify: 2.x - jest-util: ^26.1.0 - json5: 2.x - lodash: 4.x + jest-util: ^28.0.0 + json5: ^2.2.1 + lodash.memoize: 4.x make-error: 1.x - mkdirp: 1.x semver: 7.x - yargs-parser: 20.x + yargs-parser: ^21.0.1 peerDependencies: - jest: ">=26 <27" - typescript: ">=3.8 <5.0" + "@babel/core": ">=7.0.0-beta.0 <8" + "@jest/types": ^28.0.0 + babel-jest: ^28.0.0 + jest: ^28.0.0 + typescript: ">=4.3" + peerDependenciesMeta: + "@babel/core": + optional: true + "@jest/types": + optional: true + babel-jest: + optional: true + esbuild: + optional: true bin: ts-jest: cli.js - checksum: f86db9a8489409549c61c007c37f6f745b7e1b2c88af5118b3fdff729cf897d97f20eb11af1ae9cdbeb709d942c945a49272555ba5c1d274ab382e46566fbbdb + checksum: 4f6d7c8dbf6deaf56f4490ae819071077e8ed30c1a3c87c7d2e21b3103e6d12aaa53d2776cb5c947bac3f3a05cd9f8dea2aedc4c6550c14fbf639c1368a0fbc9 languageName: node linkType: hard @@ -19599,7 +19701,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^8.0.0, uuid@npm:^8.3.0, uuid@npm:^8.3.2": +"uuid@npm:^8.0.0, uuid@npm:^8.3.2": version: 8.3.2 resolution: "uuid@npm:8.3.2" bin: @@ -19622,18 +19724,7 @@ __metadata: languageName: node linkType: hard -"v8-to-istanbul@npm:^7.0.0": - version: 7.1.2 - resolution: "v8-to-istanbul@npm:7.1.2" - dependencies: - "@types/istanbul-lib-coverage": ^2.0.1 - convert-source-map: ^1.6.0 - source-map: ^0.7.3 - checksum: a901917e3e321e2c74a9582cbe6652ff2b983040a683c924ce98fbccdfe249cbcb34d7d7913a13a7e4eee9bed3a51c7181b09103f4405d92f4ebac1cc40dc005 - languageName: node - linkType: hard - -"v8-to-istanbul@npm:^9.0.0": +"v8-to-istanbul@npm:^9.0.0, v8-to-istanbul@npm:^9.0.1": version: 9.0.1 resolution: "v8-to-istanbul@npm:9.0.1" dependencies: @@ -19854,7 +19945,7 @@ __metadata: languageName: node linkType: hard -"w3c-xmlserializer@npm:^1.0.1, w3c-xmlserializer@npm:^1.1.2": +"w3c-xmlserializer@npm:^1.1.2": version: 1.1.2 resolution: "w3c-xmlserializer@npm:1.1.2" dependencies: @@ -19874,6 +19965,15 @@ __metadata: languageName: node linkType: hard +"w3c-xmlserializer@npm:^3.0.0": + version: 3.0.0 + resolution: "w3c-xmlserializer@npm:3.0.0" + dependencies: + xml-name-validator: ^4.0.0 + checksum: 8c455303ee2aec813f8688f4a1618b78d2fd90156a233c8ef60b853418a6b23f00fe86b680f7584f48d1c2348ee0677ad43be6fb6fcc032130cfda4de8c7188e + languageName: node + linkType: hard + "wait-on@npm:^5.2.1": version: 5.3.0 resolution: "wait-on@npm:5.3.0" @@ -19942,6 +20042,13 @@ __metadata: languageName: node linkType: hard +"webidl-conversions@npm:^7.0.0": + version: 7.0.0 + resolution: "webidl-conversions@npm:7.0.0" + checksum: 228d8cb6d270c23b0720cb2d95c579202db3aaf8f633b4e9dd94ec2000a04e7e6e43b76a94509cdb30479bd00ae253ab2371a2da9f81446cc313f89a4213a2c4 + languageName: node + linkType: hard + "websocket-driver@npm:>=0.5.1": version: 0.7.4 resolution: "websocket-driver@npm:0.7.4" @@ -19969,6 +20076,15 @@ __metadata: languageName: node linkType: hard +"whatwg-encoding@npm:^2.0.0": + version: 2.0.0 + resolution: "whatwg-encoding@npm:2.0.0" + dependencies: + iconv-lite: 0.6.3 + checksum: 91b90a49f312dc751496fd23a7e68981e62f33afe938b97281ad766235c4872fc4e66319f925c5e9001502b3040dd25a33b02a9c693b73a4cbbfdc4ad10c3e3e + languageName: node + linkType: hard + "whatwg-mimetype@npm:^2.1.0, whatwg-mimetype@npm:^2.2.0, whatwg-mimetype@npm:^2.3.0": version: 2.3.0 resolution: "whatwg-mimetype@npm:2.3.0" @@ -19976,6 +20092,33 @@ __metadata: languageName: node linkType: hard +"whatwg-mimetype@npm:^3.0.0": + version: 3.0.0 + resolution: "whatwg-mimetype@npm:3.0.0" + checksum: 323895a1cda29a5fb0b9ca82831d2c316309fede0365047c4c323073e3239067a304a09a1f4b123b9532641ab604203f33a1403b5ca6a62ef405bcd7a204080f + languageName: node + linkType: hard + +"whatwg-url@npm:^10.0.0": + version: 10.0.0 + resolution: "whatwg-url@npm:10.0.0" + dependencies: + tr46: ^3.0.0 + webidl-conversions: ^7.0.0 + checksum: 57f295913cbad3b8f7843168f30dde5ff0a875cbcf80f9cceb96276e296ba925f0455b2bfd55b6829eb3d770c6ebcac48abcc182826decb748c139dbe85d92e8 + languageName: node + linkType: hard + +"whatwg-url@npm:^11.0.0": + version: 11.0.0 + resolution: "whatwg-url@npm:11.0.0" + dependencies: + tr46: ^3.0.0 + webidl-conversions: ^7.0.0 + checksum: f7ec264976d7c725e0696fcaf9ebe056e14422eacbf92fdbb4462034609cba7d0c85ffa1aab05e9309d42969bcf04632ba5ed3f3882c516d7b093053315bf4c1 + languageName: node + linkType: hard + "whatwg-url@npm:^5.0.0": version: 5.0.0 resolution: "whatwg-url@npm:5.0.0" @@ -20225,7 +20368,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^6.1.0, ws@npm:^6.1.2": +"ws@npm:^6.1.0": version: 6.2.2 resolution: "ws@npm:6.2.2" dependencies: @@ -20249,6 +20392,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:^8.2.3": + version: 8.10.0 + resolution: "ws@npm:8.10.0" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: db88d92897c7547ca5b24c91eca8e401788bac96c5a7935d647766481ec27fbc020947149ff820156cb1a574477e7f042962e0561cf58257e4e8be8e095534a3 + languageName: node + linkType: hard + "xdg-basedir@npm:^4.0.0": version: 4.0.0 resolution: "xdg-basedir@npm:4.0.0" @@ -20275,6 +20433,13 @@ __metadata: languageName: node linkType: hard +"xml-name-validator@npm:^4.0.0": + version: 4.0.0 + resolution: "xml-name-validator@npm:4.0.0" + checksum: c1bfa219d64e56fee265b2bd31b2fcecefc063ee802da1e73bad1f21d7afd89b943c9e2c97af2942f60b1ad46f915a4c81e00039c7d398b53cf410e29d3c30bd + languageName: node + linkType: hard + "xml@npm:^1.0.1": version: 1.0.1 resolution: "xml@npm:1.0.1" @@ -20340,13 +20505,6 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:20.x": - version: 20.2.9 - resolution: "yargs-parser@npm:20.2.9" - checksum: 0685a8e58bbfb57fab6aefe03c6da904a59769bd803a722bb098bd5b0f29d274a1357762c7258fb487512811b8063fb5d2824a3415a0a4540598335b3b086c72 - languageName: node - linkType: hard - "yargs-parser@npm:21.0.1": version: 21.0.1 resolution: "yargs-parser@npm:21.0.1" @@ -20354,7 +20512,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:>=21.0.1, yargs-parser@npm:^21.0.0": +"yargs-parser@npm:>=21.0.1, yargs-parser@npm:^21.0.0, yargs-parser@npm:^21.0.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 @@ -20390,7 +20548,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.4.0": +"yargs@npm:^17.3.1, yargs@npm:^17.4.0": version: 17.6.0 resolution: "yargs@npm:17.6.0" dependencies: From 22bcdd0d8932992b77e21e1a94143d3b5b26d905 Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 24 Oct 2022 23:23:14 -0500 Subject: [PATCH 002/258] Fix some of the Angular tests --- .../src/builders/build-storybook/index.spec.ts | 2 +- .../src/builders/start-storybook/index.spec.ts | 2 +- .../angular/src/builders/utils/run-compodoc.spec.ts | 2 ++ .../src/client/angular-beta/RendererFactory.test.ts | 12 +++++++----- .../src/client/angular-beta/StorybookModule.ts | 12 +++++++++++- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/code/frameworks/angular/src/builders/build-storybook/index.spec.ts b/code/frameworks/angular/src/builders/build-storybook/index.spec.ts index 6703244616da..7e6e2b729c02 100644 --- a/code/frameworks/angular/src/builders/build-storybook/index.spec.ts +++ b/code/frameworks/angular/src/builders/build-storybook/index.spec.ts @@ -4,7 +4,7 @@ import { schema } from '@angular-devkit/core'; import * as path from 'path'; const buildStandaloneMock = jest.fn(); -jest.doMock('@storybook/angular/standalone', () => buildStandaloneMock); +jest.doMock('@storybook/core-server/standalone', () => buildStandaloneMock); jest.doMock('find-up', () => ({ sync: () => './storybook/tsconfig.ts' })); const cpSpawnMock = { diff --git a/code/frameworks/angular/src/builders/start-storybook/index.spec.ts b/code/frameworks/angular/src/builders/start-storybook/index.spec.ts index 381024a46399..081926793439 100644 --- a/code/frameworks/angular/src/builders/start-storybook/index.spec.ts +++ b/code/frameworks/angular/src/builders/start-storybook/index.spec.ts @@ -4,7 +4,7 @@ import { schema } from '@angular-devkit/core'; import * as path from 'path'; const buildStandaloneMock = jest.fn(); -jest.doMock('@storybook/angular/standalone', () => buildStandaloneMock); +jest.doMock('@storybook/core-server/standalone', () => buildStandaloneMock); jest.doMock('find-up', () => ({ sync: () => './storybook/tsconfig.ts' })); const cpSpawnMock = { diff --git a/code/frameworks/angular/src/builders/utils/run-compodoc.spec.ts b/code/frameworks/angular/src/builders/utils/run-compodoc.spec.ts index 900bc6a7669f..06d0f37a5223 100644 --- a/code/frameworks/angular/src/builders/utils/run-compodoc.spec.ts +++ b/code/frameworks/angular/src/builders/utils/run-compodoc.spec.ts @@ -51,6 +51,7 @@ describe('runCompodoc', () => { ['compodoc', '-p', 'path/to/tsconfig.json', '-d', 'path/to/project'], { cwd: 'path/to/project', + shell: true, } ); }); @@ -74,6 +75,7 @@ describe('runCompodoc', () => { ['compodoc', '-d', 'path/to/project', '-p', 'path/to/tsconfig.stories.json'], { cwd: 'path/to/project', + shell: true, } ); }); diff --git a/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts b/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts index 0129a09f68a2..a50a8c5ff80c 100644 --- a/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts +++ b/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts @@ -18,8 +18,8 @@ describe('RendererFactory', () => { beforeEach(async () => { rendererFactory = new RendererFactory(); document.body.innerHTML = - '
'; - rootTargetDOMNode = global.document.getElementById('root'); + '
'; + rootTargetDOMNode = global.document.getElementById('storybook-root'); rootDocstargetDOMNode = global.document.getElementById('root-docs'); (platformBrowserDynamic as any).mockImplementation(platformBrowserDynamicTesting); jest.spyOn(console, 'log').mockImplementation(() => {}); @@ -301,14 +301,16 @@ describe('RendererFactory', () => { }); it('should reset root HTML', async () => { - global.document.getElementById('root').appendChild(global.document.createElement('👾')); + global.document + .getElementById('storybook-root') + .appendChild(global.document.createElement('👾')); - expect(global.document.getElementById('root').innerHTML).toContain('Canvas 🖼'); + expect(global.document.getElementById('storybook-root').innerHTML).toContain('Canvas 🖼'); const render = await rendererFactory.getRendererInstance( 'my-story-in-docs', rootDocstargetDOMNode ); - expect(global.document.getElementById('root').innerHTML).toBe(''); + expect(global.document.getElementById('storybook-root').innerHTML).toBe(''); }); }); diff --git a/code/frameworks/angular/src/client/angular-beta/StorybookModule.ts b/code/frameworks/angular/src/client/angular-beta/StorybookModule.ts index 7bc401b66c54..5403a3ecbea0 100644 --- a/code/frameworks/angular/src/client/angular-beta/StorybookModule.ts +++ b/code/frameworks/angular/src/client/angular-beta/StorybookModule.ts @@ -7,6 +7,7 @@ import { storyPropsProvider } from './StorybookProvider'; import { isComponentAlreadyDeclaredInModules } from './utils/NgModulesAnalyzer'; import { isDeclarable, isStandaloneComponent } from './utils/NgComponentAnalyzer'; import { createStorybookWrapperComponent } from './StorybookWrapperComponent'; +import { computesTemplateFromComponent } from './ComputesTemplateFromComponent'; export const getStorybookModuleMetadata = ( { @@ -21,7 +22,12 @@ export const getStorybookModuleMetadata = ( storyProps$: Subject ): NgModule => { const { props, styles, moduleMetadata = {} } = storyFnAngular; - const { template } = storyFnAngular; + let { template } = storyFnAngular; + + const hasTemplate = !hasNoTemplate(template); + if (!hasTemplate && component) { + template = computesTemplateFromComponent(component, props, ''); + } /** * Create a component that wraps generated template and gives it props @@ -68,3 +74,7 @@ export const createStorybookModule = (ngModule: NgModule): Type => { class StorybookModule {} return StorybookModule; }; + +function hasNoTemplate(template: string | null | undefined): template is undefined { + return template === null || template === undefined; +} From abfcee6f5e6758509ff9cdbf2d917d363ceb2739 Mon Sep 17 00:00:00 2001 From: Bryan <49354825+bryanjtc@users.noreply.github.com> Date: Mon, 31 Oct 2022 14:57:29 -0500 Subject: [PATCH 003/258] chore: Bundle channel-websocket with tsup --- code/lib/channel-websocket/package.json | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/code/lib/channel-websocket/package.json b/code/lib/channel-websocket/package.json index bda5fc4a30bb..afbf97e23560 100644 --- a/code/lib/channel-websocket/package.json +++ b/code/lib/channel-websocket/package.json @@ -20,9 +20,17 @@ }, "license": "MIT", "sideEffects": false, - "main": "dist/cjs/index.js", - "module": "dist/esm/index.js", - "types": "dist/types/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", "files": [ "dist/**/*", "README.md", @@ -31,7 +39,7 @@ ], "scripts": { "check": "../../../scripts/node_modules/.bin/tsc --noEmit", - "prep": "node ../../../scripts/prepare.js" + "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { "@storybook/channels": "7.0.0-alpha.46", @@ -45,5 +53,10 @@ "publishConfig": { "access": "public" }, + "bundler": { + "entries": [ + "./src/index.ts" + ] + }, "gitHead": "c64b5be851ed2affac56e1daaac3f453fbe6f230" } From 2c509cb2f743187fd1315a076822b20f38f55478 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 1 Nov 2022 03:08:53 -0500 Subject: [PATCH 004/258] More Angular test fixes and others --- code/frameworks/angular/jest.config.js | 2 +- code/frameworks/angular/setup-jest.ts | 8 + .../builders/build-storybook/index.spec.ts | 34 +++-- .../builders/start-storybook/index.spec.ts | 30 +++- .../doc-button/compodoc-posix.snapshot | 140 +++++++++--------- .../doc-button/compodoc-undefined.snapshot | 112 +++++++------- code/jest.config.js | 6 +- code/jest.init.ts | 7 + code/lib/api/package.json | 2 +- code/lib/core-server/package.json | 2 +- .../src/utils/StoryIndexGenerator.test.ts | 9 +- .../lib/core-server/src/withTelemetry.test.ts | 31 ++-- .../src/PreviewWeb.integration.test.ts | 5 +- code/lib/preview-web/src/PreviewWeb.test.ts | 5 +- code/renderers/react/package.json | 2 +- code/yarn.lock | 10 +- 16 files changed, 221 insertions(+), 184 deletions(-) diff --git a/code/frameworks/angular/jest.config.js b/code/frameworks/angular/jest.config.js index 687a16f155b2..c98df845e713 100644 --- a/code/frameworks/angular/jest.config.js +++ b/code/frameworks/angular/jest.config.js @@ -1,5 +1,5 @@ module.exports = { preset: 'jest-preset-angular', setupFilesAfterEnv: ['/setup-jest.ts'], - transformIgnorePatterns: ['^.+\\.js$'], + transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid)'], }; diff --git a/code/frameworks/angular/setup-jest.ts b/code/frameworks/angular/setup-jest.ts index 3caa91649606..06e753a2e78e 100644 --- a/code/frameworks/angular/setup-jest.ts +++ b/code/frameworks/angular/setup-jest.ts @@ -1,4 +1,12 @@ // eslint-disable-next-line import/no-extraneous-dependencies import 'jest-preset-angular/setup-jest'; +import { webcrypto } from 'node:crypto'; + +Object.defineProperty(window, 'crypto', { + get() { + return webcrypto; + }, +}); + global.EventSource = class {} as any; diff --git a/code/frameworks/angular/src/builders/build-storybook/index.spec.ts b/code/frameworks/angular/src/builders/build-storybook/index.spec.ts index 7e6e2b729c02..e408b36d4ac8 100644 --- a/code/frameworks/angular/src/builders/build-storybook/index.spec.ts +++ b/code/frameworks/angular/src/builders/build-storybook/index.spec.ts @@ -3,8 +3,13 @@ import { TestingArchitectHost } from '@angular-devkit/architect/testing'; import { schema } from '@angular-devkit/core'; import * as path from 'path'; -const buildStandaloneMock = jest.fn(); -jest.doMock('@storybook/core-server/standalone', () => buildStandaloneMock); +const buildDevStandaloneMock = jest.fn(); +const buildStaticStandaloneMock = jest.fn(); +const buildMock = { + buildDevStandalone: buildDevStandaloneMock, + buildStaticStandalone: buildStaticStandaloneMock, +}; +jest.doMock('@storybook/core-server', () => buildMock); jest.doMock('find-up', () => ({ sync: () => './storybook/tsconfig.ts' })); const cpSpawnMock = { @@ -50,7 +55,7 @@ describe('Build Storybook Builder', () => { }); beforeEach(() => { - buildStandaloneMock.mockImplementation((_options: unknown) => Promise.resolve()); + buildStaticStandaloneMock.mockImplementation((_options: unknown) => Promise.resolve()); cpSpawnMock.spawn.mockImplementation(() => ({ stdout: { on: () => {} }, stderr: { on: () => {} }, @@ -74,14 +79,16 @@ describe('Build Storybook Builder', () => { expect(output.success).toBeTruthy(); expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); - expect(buildStandaloneMock).toHaveBeenCalledWith({ + expect(buildStaticStandaloneMock).toHaveBeenCalledWith({ angularBrowserTarget: 'angular-cli:build-2', angularBuilderContext: expect.any(Object), angularBuilderOptions: {}, configDir: '.storybook', + docs: undefined, loglevel: undefined, quiet: false, outputDir: 'storybook-static', + packageJson: expect.any(Object), mode: 'static', tsConfig: './storybook/tsconfig.ts', webpackStatsJson: false, @@ -100,14 +107,16 @@ describe('Build Storybook Builder', () => { expect(output.success).toBeTruthy(); expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); - expect(buildStandaloneMock).toHaveBeenCalledWith({ + expect(buildStaticStandaloneMock).toHaveBeenCalledWith({ angularBrowserTarget: null, angularBuilderContext: expect.any(Object), angularBuilderOptions: {}, configDir: '.storybook', + docs: undefined, loglevel: undefined, quiet: false, outputDir: 'storybook-static', + packageJson: expect.any(Object), mode: 'static', tsConfig: 'path/to/tsConfig.json', webpackStatsJson: false, @@ -127,14 +136,16 @@ describe('Build Storybook Builder', () => { expect(output.success).toBeTruthy(); expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); - expect(buildStandaloneMock).toHaveBeenCalledWith({ + expect(buildStaticStandaloneMock).toHaveBeenCalledWith({ angularBrowserTarget: null, angularBuilderContext: expect.any(Object), angularBuilderOptions: {}, configDir: '.storybook', + docs: undefined, loglevel: undefined, quiet: false, outputDir: 'storybook-static', + packageJson: expect.any(Object), mode: 'static', tsConfig: 'path/to/tsConfig.json', webpackStatsJson: true, @@ -142,7 +153,7 @@ describe('Build Storybook Builder', () => { }); it('should throw error', async () => { - buildStandaloneMock.mockRejectedValue(true); + buildStaticStandaloneMock.mockRejectedValue(true); const run = await architect.scheduleBuilder('@storybook/angular:start-storybook', { browserTarget: 'angular-cli:build-2', @@ -177,16 +188,19 @@ describe('Build Storybook Builder', () => { ['compodoc', '-p', './storybook/tsconfig.ts', '-d', '', '-e', 'json'], { cwd: '', + shell: true, } ); - expect(buildStandaloneMock).toHaveBeenCalledWith({ + expect(buildStaticStandaloneMock).toHaveBeenCalledWith({ angularBrowserTarget: 'angular-cli:build-2', angularBuilderContext: expect.any(Object), angularBuilderOptions: {}, configDir: '.storybook', + docs: undefined, loglevel: undefined, quiet: false, outputDir: 'storybook-static', + packageJson: expect.any(Object), mode: 'static', tsConfig: './storybook/tsconfig.ts', webpackStatsJson: false, @@ -206,14 +220,16 @@ describe('Build Storybook Builder', () => { expect(output.success).toBeTruthy(); expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); - expect(buildStandaloneMock).toHaveBeenCalledWith({ + expect(buildStaticStandaloneMock).toHaveBeenCalledWith({ angularBrowserTarget: null, angularBuilderContext: expect.any(Object), angularBuilderOptions: { styles: ['style.scss'] }, configDir: '.storybook', + docs: undefined, loglevel: undefined, quiet: false, outputDir: 'storybook-static', + packageJson: expect.any(Object), mode: 'static', tsConfig: 'path/to/tsConfig.json', webpackStatsJson: false, diff --git a/code/frameworks/angular/src/builders/start-storybook/index.spec.ts b/code/frameworks/angular/src/builders/start-storybook/index.spec.ts index 081926793439..e6aa5f0df051 100644 --- a/code/frameworks/angular/src/builders/start-storybook/index.spec.ts +++ b/code/frameworks/angular/src/builders/start-storybook/index.spec.ts @@ -3,8 +3,13 @@ import { TestingArchitectHost } from '@angular-devkit/architect/testing'; import { schema } from '@angular-devkit/core'; import * as path from 'path'; -const buildStandaloneMock = jest.fn(); -jest.doMock('@storybook/core-server/standalone', () => buildStandaloneMock); +const buildDevStandaloneMock = jest.fn(); +const buildStaticStandaloneMock = jest.fn(); +const buildMock = { + buildDevStandalone: buildDevStandaloneMock, + buildStaticStandalone: buildStaticStandaloneMock, +}; +jest.doMock('@storybook/core-server', () => buildMock); jest.doMock('find-up', () => ({ sync: () => './storybook/tsconfig.ts' })); const cpSpawnMock = { @@ -49,7 +54,7 @@ describe('Start Storybook Builder', () => { }); beforeEach(() => { - buildStandaloneMock.mockImplementation((_options: unknown) => Promise.resolve()); + buildDevStandaloneMock.mockImplementation((_options: unknown) => Promise.resolve()); cpSpawnMock.spawn.mockImplementation(() => ({ stdout: { on: () => {} }, stderr: { on: () => {} }, @@ -74,14 +79,16 @@ describe('Start Storybook Builder', () => { expect(output.success).toBeTruthy(); expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); - expect(buildStandaloneMock).toHaveBeenCalledWith({ + expect(buildDevStandaloneMock).toHaveBeenCalledWith({ angularBrowserTarget: 'angular-cli:build-2', angularBuilderContext: expect.any(Object), angularBuilderOptions: {}, ci: false, configDir: '.storybook', + docs: undefined, host: 'localhost', https: false, + packageJson: expect.any(Object), port: 4400, quiet: false, smokeTest: false, @@ -105,14 +112,16 @@ describe('Start Storybook Builder', () => { expect(output.success).toBeTruthy(); expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); - expect(buildStandaloneMock).toHaveBeenCalledWith({ + expect(buildDevStandaloneMock).toHaveBeenCalledWith({ angularBrowserTarget: null, angularBuilderContext: expect.any(Object), angularBuilderOptions: {}, ci: false, configDir: '.storybook', + docs: undefined, host: 'localhost', https: false, + packageJson: expect.any(Object), port: 4400, quiet: false, smokeTest: false, @@ -124,7 +133,7 @@ describe('Start Storybook Builder', () => { }); it('should throw error', async () => { - buildStandaloneMock.mockRejectedValue(true); + buildDevStandaloneMock.mockRejectedValue(true); const run = await architect.scheduleBuilder('@storybook/angular:start-storybook', { browserTarget: 'angular-cli:build-2', @@ -159,16 +168,19 @@ describe('Start Storybook Builder', () => { ['compodoc', '-p', './storybook/tsconfig.ts', '-d', '', '-e', 'json'], { cwd: '', + shell: true, } ); - expect(buildStandaloneMock).toHaveBeenCalledWith({ + expect(buildDevStandaloneMock).toHaveBeenCalledWith({ angularBrowserTarget: 'angular-cli:build-2', angularBuilderContext: expect.any(Object), angularBuilderOptions: {}, ci: false, configDir: '.storybook', + docs: undefined, host: 'localhost', https: false, + packageJson: expect.any(Object), port: 9009, quiet: false, smokeTest: false, @@ -193,7 +205,7 @@ describe('Start Storybook Builder', () => { expect(output.success).toBeTruthy(); expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); - expect(buildStandaloneMock).toHaveBeenCalledWith({ + expect(buildDevStandaloneMock).toHaveBeenCalledWith({ angularBrowserTarget: null, angularBuilderContext: expect.any(Object), angularBuilderOptions: { @@ -201,9 +213,11 @@ describe('Start Storybook Builder', () => { }, ci: false, configDir: '.storybook', + docs: undefined, host: 'localhost', https: false, port: 4400, + packageJson: expect.any(Object), quiet: false, smokeTest: false, sslCa: undefined, diff --git a/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-posix.snapshot b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-posix.snapshot index dbb2d4c08edf..de95727d81f5 100644 --- a/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-posix.snapshot +++ b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-posix.snapshot @@ -10,7 +10,7 @@ Object { "getSignature": Object { "description": "

Getter for inputValue.

", - "line": 115, + "line": 116, "name": "inputValue", "rawdescription": " Getter for \`inputValue\`.", @@ -42,7 +42,7 @@ Getter for \`inputValue\`.", "type": "string", }, ], - "line": 110, + "line": 111, "name": "inputValue", "rawdescription": " Setter for \`inputValue\` that is also an \`@Input\`.", @@ -74,7 +74,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "type": "T[]", }, ], - "line": 195, + "line": 196, "name": "item", "returnType": "void", "type": "void", @@ -84,7 +84,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "getSignature": Object { "description": "

Get the private value.

", - "line": 154, + "line": 155, "name": "value", "rawdescription": " Get the private value.", @@ -116,7 +116,7 @@ Get the private value.", "type": "string | number", }, ], - "line": 149, + "line": 150, "name": "value", "rawdescription": " Set the private value.", @@ -137,14 +137,14 @@ like bold, italic, and inline code.

", "encapsulation": Array [], "entryComponents": Array [], - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "hostBindings": Array [ Object { "decorators": Array [], "defaultValue": "false", "deprecated": false, "deprecationMessage": "", - "line": 124, + "line": 125, "name": "class.focused", "type": "boolean", }, @@ -164,7 +164,7 @@ like bold, italic, and inline code.

], "deprecated": false, "deprecationMessage": "", - "line": 120, + "line": 121, "name": "click", }, ], @@ -177,7 +177,7 @@ like bold, italic, and inline code.

"deprecationMessage": "", "description": "

Specify the accent-type of the button

", - "line": 56, + "line": 57, "name": "accent", "rawdescription": " Specify the accent-type of the button", @@ -190,7 +190,7 @@ Specify the accent-type of the button", "deprecationMessage": "", "description": "

Appearance style of the button.

", - "line": 52, + "line": 53, "name": "appearance", "rawdescription": " Appearance style of the button.", @@ -202,7 +202,7 @@ Appearance style of the button.", "deprecationMessage": "", "description": "

Setter for inputValue that is also an @Input.

", - "line": 110, + "line": 111, "name": "inputValue", "rawdescription": " Setter for \`inputValue\` that is also an \`@Input\`.", @@ -215,7 +215,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "deprecationMessage": "", "description": "

Sets the button to a disabled state.

", - "line": 60, + "line": 61, "name": "isDisabled", "rawdescription": " Sets the button to a disabled state.", @@ -225,7 +225,7 @@ Sets the button to a disabled state.", "decorators": Array [], "deprecated": false, "deprecationMessage": "", - "line": 195, + "line": 196, "name": "item", "type": "T[]", }, @@ -238,24 +238,24 @@ Sets the button to a disabled state.", "jsdoctags": Array [ Object { "comment": "", - "end": 1525, + "end": 1587, "flags": 4227072, "kind": 325, "modifierFlagsCache": 0, - "pos": 1512, + "pos": 1574, "tagName": Object { - "end": 1521, + "end": 1583, "escapedText": "required", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 1513, + "pos": 1575, "transformFlags": 0, }, "transformFlags": 0, }, ], - "line": 68, + "line": 69, "name": "label", "rawdescription": " @@ -268,7 +268,7 @@ The inner text of the button. "decorators": Array [], "deprecated": false, "deprecationMessage": "", - "line": 192, + "line": 193, "name": "showKeyAlias", "type": "", }, @@ -279,7 +279,7 @@ The inner text of the button. "deprecationMessage": "", "description": "

Size of the button.

", - "line": 72, + "line": 73, "name": "size", "rawdescription": " Size of the button.", @@ -291,7 +291,7 @@ Size of the button.", "deprecationMessage": "", "description": "

Specifies some arbitrary object

", - "line": 75, + "line": 76, "name": "someDataObject", "rawdescription": " Specifies some arbitrary object", @@ -307,24 +307,24 @@ Specifies some arbitrary object", "jsdoctags": Array [ Object { "comment": "", - "end": 1802, + "end": 1864, "flags": 4227072, "kind": 329, "modifierFlagsCache": 0, - "pos": 1787, + "pos": 1849, "tagName": Object { - "end": 1798, + "end": 1860, "escapedText": "deprecated", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 1788, + "pos": 1850, "transformFlags": 0, }, "transformFlags": 0, }, ], - "line": 83, + "line": 84, "name": "somethingYouShouldNotUse", "rawdescription": " @@ -361,21 +361,21 @@ Some input you shouldn't use. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3518, + "end": 3580, "escapedText": "x", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3517, + "pos": 3579, "transformFlags": 0, }, "tagName": Object { - "end": 3516, + "end": 3578, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3511, + "pos": 3573, "transformFlags": 0, }, "type": "number", @@ -386,27 +386,27 @@ Some input you shouldn't use. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3563, + "end": 3625, "escapedText": "y", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3562, + "pos": 3624, "transformFlags": 0, }, "tagName": Object { - "end": 3561, + "end": 3623, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3556, + "pos": 3618, "transformFlags": 0, }, "type": "string | number", }, ], - "line": 164, + "line": 165, "modifierKind": Array [ 123, ], @@ -448,7 +448,7 @@ An internal calculation method which adds \`x\` and \`y\` together. "type": "", }, ], - "line": 120, + "line": 121, "name": "onClickListener", "optional": false, "returnType": "void", @@ -474,27 +474,27 @@ An internal calculation method which adds \`x\` and \`y\` together. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 4079, + "end": 4141, "escapedText": "password", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 4071, + "pos": 4133, "transformFlags": 0, }, "tagName": Object { - "end": 4070, + "end": 4132, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 4065, + "pos": 4127, "transformFlags": 0, }, "type": "string", }, ], - "line": 187, + "line": 188, "modifierKind": Array [ 121, ], @@ -529,28 +529,28 @@ A private method. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3938, + "end": 4000, "escapedText": "id", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3936, + "pos": 3998, "transformFlags": 0, }, "optional": true, "tagName": Object { - "end": 3935, + "end": 3997, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3930, + "pos": 3992, "transformFlags": 0, }, "type": "number", }, ], - "line": 178, + "line": 179, "modifierKind": Array [ 122, ], @@ -588,7 +588,7 @@ A protected method. "type": "ISomeInterface", }, ], - "line": 169, + "line": 170, "modifierKind": Array [ 123, ], @@ -610,7 +610,7 @@ A public method using an interface.", "description": "

Handler to be called when the button is clicked by a user.

Will also block the emission of the event if isDisabled is true.

", - "line": 91, + "line": 92, "name": "onClick", "rawdescription": " @@ -627,7 +627,7 @@ Will also block the emission of the event if \`isDisabled\` is true. "deprecated": false, "deprecationMessage": "", "description": "", - "line": 106, + "line": 107, "modifierKind": Array [ 121, ], @@ -641,7 +641,7 @@ Will also block the emission of the event if \`isDisabled\` is true. "deprecationMessage": "", "description": "

Private value.

", - "line": 146, + "line": 147, "modifierKind": Array [ 121, ], @@ -661,7 +661,7 @@ Private value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 48, + "line": 49, "name": "buttonRef", "optional": false, "type": "ElementRef", @@ -677,7 +677,7 @@ Private value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 124, + "line": 125, "name": "focus", "optional": false, "type": "", @@ -688,7 +688,7 @@ Private value.", "deprecationMessage": "", "description": "

Public value.

", - "line": 143, + "line": 144, "modifierKind": Array [ 123, ], @@ -702,7 +702,7 @@ Public value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 199, + "line": 200, "modifierKind": Array [ 123, ], @@ -937,7 +937,7 @@ export class InputComponent { Object { "coverageCount": "16/25", "coveragePercent": 64, - "filePath": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "filePath": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "linktype": "component", "name": "InputComponent", "status": "good", @@ -946,7 +946,7 @@ export class InputComponent { Object { "coverageCount": "0/4", "coveragePercent": 0, - "filePath": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "filePath": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "linktype": "interface", "name": "ISomeInterface", "status": "low", @@ -955,7 +955,7 @@ export class InputComponent { Object { "coverageCount": "0/1", "coveragePercent": 0, - "filePath": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "filePath": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "linksubtype": "variable", "linktype": "miscellaneous", "name": "exportedConstant", @@ -973,7 +973,7 @@ export class InputComponent { Object { "deprecated": false, "deprecationMessage": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "id": "interface-ISomeInterface-d145da25329b094ee29610c45a9e46387cb39eddb2a67b4c9fadb84bcec76eacd60d131e48d98b2ee5725dedd25f2eb299b704e8e0a34307d6e84f6e57d57044", "indexSignatures": Array [], "kind": 165, @@ -984,7 +984,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 25, + "line": 26, "name": "one", "optional": false, "type": "string", @@ -993,7 +993,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 27, + "line": 28, "name": "three", "optional": false, "type": "any[]", @@ -1002,7 +1002,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 26, + "line": 27, "name": "two", "optional": false, "type": "boolean", @@ -1230,14 +1230,14 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "ButtonAccent", "subtype": "enum", }, ], "functions": Array [], "groupedEnumerations": Object { - "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts": Array [ + "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ Object { "childs": Array [ Object { @@ -1257,7 +1257,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "ButtonAccent", "subtype": "enum", }, @@ -1265,13 +1265,13 @@ export class InputComponent { }, "groupedFunctions": Object {}, "groupedTypeAliases": Object { - "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts": Array [ + "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ Object { "ctype": "miscellaneous", "deprecated": false, "deprecationMessage": "", "description": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "kind": 186, "name": "ButtonSize", "rawtype": "\\"small\\" | \\"medium\\" | \\"large\\" | \\"xlarge\\"", @@ -1280,13 +1280,13 @@ export class InputComponent { ], }, "groupedVariables": Object { - "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts": Array [ + "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ Object { "ctype": "miscellaneous", "defaultValue": "'An exported constant'", "deprecated": false, "deprecationMessage": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "exportedConstant", "subtype": "variable", "type": "string", @@ -1299,7 +1299,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "kind": 186, "name": "ButtonSize", "rawtype": "\\"small\\" | \\"medium\\" | \\"large\\" | \\"xlarge\\"", @@ -1312,7 +1312,7 @@ export class InputComponent { "defaultValue": "'An exported constant'", "deprecated": false, "deprecationMessage": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "exportedConstant", "subtype": "variable", "type": "string", diff --git a/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-undefined.snapshot b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-undefined.snapshot index 012aeb4a1651..de95727d81f5 100644 --- a/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-undefined.snapshot +++ b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-undefined.snapshot @@ -10,7 +10,7 @@ Object { "getSignature": Object { "description": "

Getter for inputValue.

", - "line": 115, + "line": 116, "name": "inputValue", "rawdescription": " Getter for \`inputValue\`.", @@ -42,7 +42,7 @@ Getter for \`inputValue\`.", "type": "string", }, ], - "line": 110, + "line": 111, "name": "inputValue", "rawdescription": " Setter for \`inputValue\` that is also an \`@Input\`.", @@ -74,7 +74,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "type": "T[]", }, ], - "line": 195, + "line": 196, "name": "item", "returnType": "void", "type": "void", @@ -84,7 +84,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "getSignature": Object { "description": "

Get the private value.

", - "line": 154, + "line": 155, "name": "value", "rawdescription": " Get the private value.", @@ -116,7 +116,7 @@ Get the private value.", "type": "string | number", }, ], - "line": 149, + "line": 150, "name": "value", "rawdescription": " Set the private value.", @@ -144,7 +144,7 @@ like bold, italic, and inline code.

"defaultValue": "false", "deprecated": false, "deprecationMessage": "", - "line": 124, + "line": 125, "name": "class.focused", "type": "boolean", }, @@ -164,7 +164,7 @@ like bold, italic, and inline code.

], "deprecated": false, "deprecationMessage": "", - "line": 120, + "line": 121, "name": "click", }, ], @@ -177,7 +177,7 @@ like bold, italic, and inline code.

"deprecationMessage": "", "description": "

Specify the accent-type of the button

", - "line": 56, + "line": 57, "name": "accent", "rawdescription": " Specify the accent-type of the button", @@ -190,7 +190,7 @@ Specify the accent-type of the button", "deprecationMessage": "", "description": "

Appearance style of the button.

", - "line": 52, + "line": 53, "name": "appearance", "rawdescription": " Appearance style of the button.", @@ -202,7 +202,7 @@ Appearance style of the button.", "deprecationMessage": "", "description": "

Setter for inputValue that is also an @Input.

", - "line": 110, + "line": 111, "name": "inputValue", "rawdescription": " Setter for \`inputValue\` that is also an \`@Input\`.", @@ -215,7 +215,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "deprecationMessage": "", "description": "

Sets the button to a disabled state.

", - "line": 60, + "line": 61, "name": "isDisabled", "rawdescription": " Sets the button to a disabled state.", @@ -225,7 +225,7 @@ Sets the button to a disabled state.", "decorators": Array [], "deprecated": false, "deprecationMessage": "", - "line": 195, + "line": 196, "name": "item", "type": "T[]", }, @@ -238,24 +238,24 @@ Sets the button to a disabled state.", "jsdoctags": Array [ Object { "comment": "", - "end": 1525, + "end": 1587, "flags": 4227072, "kind": 325, "modifierFlagsCache": 0, - "pos": 1512, + "pos": 1574, "tagName": Object { - "end": 1521, + "end": 1583, "escapedText": "required", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 1513, + "pos": 1575, "transformFlags": 0, }, "transformFlags": 0, }, ], - "line": 68, + "line": 69, "name": "label", "rawdescription": " @@ -268,7 +268,7 @@ The inner text of the button. "decorators": Array [], "deprecated": false, "deprecationMessage": "", - "line": 192, + "line": 193, "name": "showKeyAlias", "type": "", }, @@ -279,7 +279,7 @@ The inner text of the button. "deprecationMessage": "", "description": "

Size of the button.

", - "line": 72, + "line": 73, "name": "size", "rawdescription": " Size of the button.", @@ -291,7 +291,7 @@ Size of the button.", "deprecationMessage": "", "description": "

Specifies some arbitrary object

", - "line": 75, + "line": 76, "name": "someDataObject", "rawdescription": " Specifies some arbitrary object", @@ -307,24 +307,24 @@ Specifies some arbitrary object", "jsdoctags": Array [ Object { "comment": "", - "end": 1802, + "end": 1864, "flags": 4227072, "kind": 329, "modifierFlagsCache": 0, - "pos": 1787, + "pos": 1849, "tagName": Object { - "end": 1798, + "end": 1860, "escapedText": "deprecated", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 1788, + "pos": 1850, "transformFlags": 0, }, "transformFlags": 0, }, ], - "line": 83, + "line": 84, "name": "somethingYouShouldNotUse", "rawdescription": " @@ -361,21 +361,21 @@ Some input you shouldn't use. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3518, + "end": 3580, "escapedText": "x", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3517, + "pos": 3579, "transformFlags": 0, }, "tagName": Object { - "end": 3516, + "end": 3578, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3511, + "pos": 3573, "transformFlags": 0, }, "type": "number", @@ -386,27 +386,27 @@ Some input you shouldn't use. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3563, + "end": 3625, "escapedText": "y", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3562, + "pos": 3624, "transformFlags": 0, }, "tagName": Object { - "end": 3561, + "end": 3623, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3556, + "pos": 3618, "transformFlags": 0, }, "type": "string | number", }, ], - "line": 164, + "line": 165, "modifierKind": Array [ 123, ], @@ -448,7 +448,7 @@ An internal calculation method which adds \`x\` and \`y\` together. "type": "", }, ], - "line": 120, + "line": 121, "name": "onClickListener", "optional": false, "returnType": "void", @@ -474,27 +474,27 @@ An internal calculation method which adds \`x\` and \`y\` together. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 4079, + "end": 4141, "escapedText": "password", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 4071, + "pos": 4133, "transformFlags": 0, }, "tagName": Object { - "end": 4070, + "end": 4132, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 4065, + "pos": 4127, "transformFlags": 0, }, "type": "string", }, ], - "line": 187, + "line": 188, "modifierKind": Array [ 121, ], @@ -529,28 +529,28 @@ A private method. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3938, + "end": 4000, "escapedText": "id", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3936, + "pos": 3998, "transformFlags": 0, }, "optional": true, "tagName": Object { - "end": 3935, + "end": 3997, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3930, + "pos": 3992, "transformFlags": 0, }, "type": "number", }, ], - "line": 178, + "line": 179, "modifierKind": Array [ 122, ], @@ -588,7 +588,7 @@ A protected method. "type": "ISomeInterface", }, ], - "line": 169, + "line": 170, "modifierKind": Array [ 123, ], @@ -610,7 +610,7 @@ A public method using an interface.", "description": "

Handler to be called when the button is clicked by a user.

Will also block the emission of the event if isDisabled is true.

", - "line": 91, + "line": 92, "name": "onClick", "rawdescription": " @@ -627,7 +627,7 @@ Will also block the emission of the event if \`isDisabled\` is true. "deprecated": false, "deprecationMessage": "", "description": "", - "line": 106, + "line": 107, "modifierKind": Array [ 121, ], @@ -641,7 +641,7 @@ Will also block the emission of the event if \`isDisabled\` is true. "deprecationMessage": "", "description": "

Private value.

", - "line": 146, + "line": 147, "modifierKind": Array [ 121, ], @@ -661,7 +661,7 @@ Private value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 48, + "line": 49, "name": "buttonRef", "optional": false, "type": "ElementRef", @@ -677,7 +677,7 @@ Private value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 124, + "line": 125, "name": "focus", "optional": false, "type": "", @@ -688,7 +688,7 @@ Private value.", "deprecationMessage": "", "description": "

Public value.

", - "line": 143, + "line": 144, "modifierKind": Array [ 123, ], @@ -702,7 +702,7 @@ Public value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 199, + "line": 200, "modifierKind": Array [ 123, ], @@ -984,7 +984,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 25, + "line": 26, "name": "one", "optional": false, "type": "string", @@ -993,7 +993,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 27, + "line": 28, "name": "three", "optional": false, "type": "any[]", @@ -1002,7 +1002,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 26, + "line": 27, "name": "two", "optional": false, "type": "boolean", diff --git a/code/jest.config.js b/code/jest.config.js index b49aae1cf69f..bd7aeb6f1b5f 100644 --- a/code/jest.config.js +++ b/code/jest.config.js @@ -31,10 +31,7 @@ module.exports = { '^.+\\.[jt]sx?$': '/../scripts/utils/jest-transform-js.js', '^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx', }, - transformIgnorePatterns: [ - '/node_modules/(?!(lit-html|@mdx-js)).+\\.js', - '/node_modules/(?!).+\\.js', - ], + transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid|lit-html|@mdx-js)'], testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], testPathIgnorePatterns: [ '/storybook-static/', @@ -43,7 +40,6 @@ module.exports = { '/prebuilt/', '/template/', 'addon-jest.test.js', - '/frameworks/angular/*', '/examples/*/src/*.*', '/examples/*/src/*/*.*', '/examples/*/src/*/*/*.*', diff --git a/code/jest.init.ts b/code/jest.init.ts index bf6a5ee3a9af..b87aae751a2b 100644 --- a/code/jest.init.ts +++ b/code/jest.init.ts @@ -9,6 +9,7 @@ import Adapter from 'enzyme-adapter-react-16'; import regeneratorRuntime from 'regenerator-runtime'; import registerRequireContextHook from '@storybook/babel-plugin-require-context-hook/register'; import EventEmitter from 'events'; +import { webcrypto } from 'node:crypto'; registerRequireContextHook(); @@ -96,3 +97,9 @@ class EventSourceMock { } global.window.EventSource = EventSourceMock as any; + +Object.defineProperty(window, 'crypto', { + get() { + return webcrypto; + }, +}); diff --git a/code/lib/api/package.json b/code/lib/api/package.json index 26e5c0c54656..ca9066e4fd71 100644 --- a/code/lib/api/package.json +++ b/code/lib/api/package.json @@ -62,7 +62,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "@jest/globals": "^26.6.2", + "@jest/globals": "^28.0.0", "@storybook/core-common": "7.0.0-alpha.42", "@types/lodash": "^4.14.167", "@types/qs": "^6", diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index 0765a5507b91..8e228b8dd626 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -83,7 +83,7 @@ "@types/ws": "^8", "jest-os-detection": "^1.3.1", "jest-specific-snapshot": "^4.0.0", - "ts-jest": "^26.4.4", + "ts-jest": "^28.0.0", "typescript": "~4.6.3", "webpack": "5" }, diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts index cae6ef1110ab..f1feb5f3f138 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts @@ -7,7 +7,6 @@ import type { NormalizedStoriesSpecifier } from '@storybook/core-common'; import { loadCsf, getStorySortParameter } from '@storybook/csf-tools'; import { toId } from '@storybook/csf'; import { logger } from '@storybook/node-logger'; -import { mocked } from 'ts-jest/utils'; import { StoryIndexGenerator } from './StoryIndexGenerator'; @@ -59,7 +58,7 @@ describe('StoryIndexGenerator', () => { beforeEach(() => { const actual = jest.requireActual('@storybook/csf-tools'); loadCsfMock.mockImplementation(actual.loadCsf); - mocked(logger.warn).mockClear(); + jest.mocked(logger.warn).mockClear(); }); describe('extraction', () => { const storiesSpecifier: NormalizedStoriesSpecifier = normalizeStoriesEntry( @@ -701,7 +700,7 @@ describe('StoryIndexGenerator', () => { `); expect(logger.warn).toHaveBeenCalledTimes(1); - expect(mocked(logger.warn).mock.calls[0][0]).toMatchInlineSnapshot( + expect(jest.mocked(logger.warn).mock.calls[0][0]).toMatchInlineSnapshot( `"🚨 You have two component docs pages with the same name A:docs. Use \`\` to distinguish them."` ); }); @@ -729,7 +728,7 @@ describe('StoryIndexGenerator', () => { `); expect(logger.warn).toHaveBeenCalledTimes(1); - expect(mocked(logger.warn).mock.calls[0][0]).toMatchInlineSnapshot( + expect(jest.mocked(logger.warn).mock.calls[0][0]).toMatchInlineSnapshot( `"🚨 You have a story for A with the same name as your component docs page (Story One), so the docs page is being dropped. Use \`\` to distinguish them."` ); }); @@ -751,7 +750,7 @@ describe('StoryIndexGenerator', () => { `); expect(logger.warn).toHaveBeenCalledTimes(1); - expect(mocked(logger.warn).mock.calls[0][0]).toMatchInlineSnapshot( + expect(jest.mocked(logger.warn).mock.calls[0][0]).toMatchInlineSnapshot( `"🚨 You have a story for A with the same name as your default docs entry name (Story One), so the docs page is being dropped. Consider changing the story name."` ); }); diff --git a/code/lib/core-server/src/withTelemetry.test.ts b/code/lib/core-server/src/withTelemetry.test.ts index b60fd8d382f2..d887909ecc72 100644 --- a/code/lib/core-server/src/withTelemetry.test.ts +++ b/code/lib/core-server/src/withTelemetry.test.ts @@ -3,7 +3,6 @@ import prompts from 'prompts'; import { loadAllPresets, cache } from '@storybook/core-common'; import { telemetry } from '@storybook/telemetry'; -import { mocked } from 'ts-jest/utils'; import { withTelemetry } from './withTelemetry'; @@ -57,7 +56,7 @@ describe('when command fails', () => { }); it('does not send error message when crash reports are disabled', async () => { - mocked(loadAllPresets).mockResolvedValueOnce({ + jest.mocked(loadAllPresets).mockResolvedValueOnce({ apply: async () => ({ enableCrashReports: false } as any), }); await expect(async () => @@ -73,7 +72,7 @@ describe('when command fails', () => { }); it('does send error message when crash reports are enabled', async () => { - mocked(loadAllPresets).mockResolvedValueOnce({ + jest.mocked(loadAllPresets).mockResolvedValueOnce({ apply: async () => ({ enableCrashReports: true } as any), }); @@ -90,7 +89,7 @@ describe('when command fails', () => { }); it('does not send error message when telemetry is disabled', async () => { - mocked(loadAllPresets).mockResolvedValueOnce({ + jest.mocked(loadAllPresets).mockResolvedValueOnce({ apply: async () => ({ disableTelemetry: true } as any), }); @@ -107,7 +106,7 @@ describe('when command fails', () => { }); it('does send error messages when telemetry is disabled, but crash reports are enabled', async () => { - mocked(loadAllPresets).mockResolvedValueOnce({ + jest.mocked(loadAllPresets).mockResolvedValueOnce({ apply: async () => ({ disableTelemetry: true, enableCrashReports: true } as any), }); @@ -124,10 +123,10 @@ describe('when command fails', () => { }); it('does not send error messages when disabled crash reports are cached', async () => { - mocked(loadAllPresets).mockResolvedValueOnce({ + jest.mocked(loadAllPresets).mockResolvedValueOnce({ apply: async () => ({} as any), }); - mocked(cache.get).mockResolvedValueOnce(false); + jest.mocked(cache.get).mockResolvedValueOnce(false); await expect(async () => withTelemetry('dev', { presetOptions: {} as any }, run) @@ -142,10 +141,10 @@ describe('when command fails', () => { }); it('does send error messages when enabled crash reports are cached', async () => { - mocked(loadAllPresets).mockResolvedValueOnce({ + jest.mocked(loadAllPresets).mockResolvedValueOnce({ apply: async () => ({} as any), }); - mocked(cache.get).mockResolvedValueOnce(true); + jest.mocked(cache.get).mockResolvedValueOnce(true); await expect(async () => withTelemetry('dev', { presetOptions: {} as any }, run) @@ -160,11 +159,11 @@ describe('when command fails', () => { }); it('does not send error messages when disabled crash reports are prompted', async () => { - mocked(loadAllPresets).mockResolvedValueOnce({ + jest.mocked(loadAllPresets).mockResolvedValueOnce({ apply: async () => ({} as any), }); - mocked(cache.get).mockResolvedValueOnce(undefined); - mocked(prompts).mockResolvedValueOnce({ enableCrashReports: false }); + jest.mocked(cache.get).mockResolvedValueOnce(undefined); + jest.mocked(prompts).mockResolvedValueOnce({ enableCrashReports: false }); await expect(async () => withTelemetry('dev', { presetOptions: {} as any }, run) @@ -179,11 +178,11 @@ describe('when command fails', () => { }); it('does send error messages when enabled crash reports are prompted', async () => { - mocked(loadAllPresets).mockResolvedValueOnce({ + jest.mocked(loadAllPresets).mockResolvedValueOnce({ apply: async () => ({} as any), }); - mocked(cache.get).mockResolvedValueOnce(undefined); - mocked(prompts).mockResolvedValueOnce({ enableCrashReports: true }); + jest.mocked(cache.get).mockResolvedValueOnce(undefined); + jest.mocked(prompts).mockResolvedValueOnce({ enableCrashReports: true }); await expect(async () => withTelemetry('dev', { presetOptions: {} as any }, run) @@ -199,7 +198,7 @@ describe('when command fails', () => { // if main.js has errors, we have no way to tell if they've disabled telemetry it('does not send error messages when presets fail to evaluate', async () => { - mocked(loadAllPresets).mockRejectedValueOnce(error); + jest.mocked(loadAllPresets).mockRejectedValueOnce(error); await expect(async () => withTelemetry('dev', { presetOptions: {} as any }, run) diff --git a/code/lib/preview-web/src/PreviewWeb.integration.test.ts b/code/lib/preview-web/src/PreviewWeb.integration.test.ts index 852d994f2602..b8a701042729 100644 --- a/code/lib/preview-web/src/PreviewWeb.integration.test.ts +++ b/code/lib/preview-web/src/PreviewWeb.integration.test.ts @@ -3,7 +3,6 @@ import global from 'global'; import { RenderContext } from '@storybook/store'; import addons, { mockChannel as createMockChannel } from '@storybook/addons'; -import { mocked } from 'ts-jest/utils'; import { expect } from '@jest/globals'; import { PreviewWeb } from './PreviewWeb'; @@ -63,8 +62,8 @@ beforeEach(() => { addons.setChannel(mockChannel as any); addons.setServerChannel(createMockChannel()); - mocked(WebView.prototype).prepareForDocs.mockReturnValue('docs-element' as any); - mocked(WebView.prototype).prepareForStory.mockReturnValue('story-element' as any); + jest.mocked(WebView.prototype).prepareForDocs.mockReturnValue('docs-element' as any); + jest.mocked(WebView.prototype).prepareForStory.mockReturnValue('story-element' as any); }); describe('PreviewWeb', () => { diff --git a/code/lib/preview-web/src/PreviewWeb.test.ts b/code/lib/preview-web/src/PreviewWeb.test.ts index 75fb1b8de23f..b486b21f2051 100644 --- a/code/lib/preview-web/src/PreviewWeb.test.ts +++ b/code/lib/preview-web/src/PreviewWeb.test.ts @@ -31,7 +31,6 @@ import { logger } from '@storybook/client-logger'; import { addons, mockChannel as createMockChannel } from '@storybook/addons'; import type { AnyFramework } from '@storybook/csf'; import type { ModuleImportFn, WebProjectAnnotations } from '@storybook/store'; -import { mocked } from 'ts-jest/utils'; import { PreviewWeb } from './PreviewWeb'; import { @@ -140,8 +139,8 @@ beforeEach(() => { addons.setServerChannel(createMockChannel()); mockFetchResult = { status: 200, json: mockStoryIndex, text: () => 'error text' }; - mocked(WebView.prototype).prepareForDocs.mockReturnValue('docs-element' as any); - mocked(WebView.prototype).prepareForStory.mockReturnValue('story-element' as any); + jest.mocked(WebView.prototype).prepareForDocs.mockReturnValue('docs-element' as any); + jest.mocked(WebView.prototype).prepareForStory.mockReturnValue('story-element' as any); }); describe('PreviewWeb', () => { diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index f1742c0868c6..02058badff44 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -74,7 +74,7 @@ }, "devDependencies": { "@babel/core": "^7.11.5", - "@jest/globals": "^26.6.2", + "@jest/globals": "^28.0.0", "@types/util-deprecate": "^1.0.0", "expect-type": "^0.14.2", "jest-specific-snapshot": "^4.0.0", diff --git a/code/yarn.lock b/code/yarn.lock index cf359857d31c..6a47b7e54bbd 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -3128,7 +3128,7 @@ __metadata: languageName: node linkType: hard -"@jest/globals@npm:^28.1.3": +"@jest/globals@npm:^28.0.0, @jest/globals@npm:^28.1.3": version: 28.1.3 resolution: "@jest/globals@npm:28.1.3" dependencies: @@ -6880,7 +6880,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/api@workspace:lib/api" dependencies: - "@jest/globals": ^26.6.2 + "@jest/globals": ^28.0.0 "@storybook/channels": 7.0.0-alpha.42 "@storybook/client-logger": 7.0.0-alpha.42 "@storybook/core-common": 7.0.0-alpha.42 @@ -7405,7 +7405,7 @@ __metadata: slash: ^3.0.0 telejson: ^6.0.8 ts-dedent: ^2.0.0 - ts-jest: ^26.4.4 + ts-jest: ^28.0.0 typescript: ~4.6.3 util-deprecate: ^1.0.2 watchpack: ^2.2.0 @@ -8132,7 +8132,7 @@ __metadata: resolution: "@storybook/react@workspace:renderers/react" dependencies: "@babel/core": ^7.11.5 - "@jest/globals": ^26.6.2 + "@jest/globals": ^28.0.0 "@storybook/addons": 7.0.0-alpha.42 "@storybook/client-logger": 7.0.0-alpha.42 "@storybook/core-client": 7.0.0-alpha.42 @@ -38378,7 +38378,7 @@ __metadata: languageName: node linkType: hard -"ts-jest@npm:26.x, ts-jest@npm:^26.4.4": +"ts-jest@npm:26.x": version: 26.5.6 resolution: "ts-jest@npm:26.5.6" dependencies: From 87582dc9e86cc92582debd1e87973d118944a69f Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Sun, 30 Oct 2022 22:24:23 -0400 Subject: [PATCH 005/258] Vite: Re-export essentials sub-addon preview annotations for pnpm --- code/addons/essentials/package.json | 38 ++++++++++++++++++- code/addons/essentials/src/preview/actions.ts | 4 ++ .../essentials/src/preview/backgrounds.ts | 4 ++ code/addons/essentials/src/preview/docs.ts | 3 ++ .../essentials/src/preview/highlight.ts | 4 ++ code/addons/essentials/src/preview/measure.ts | 4 ++ code/addons/essentials/src/preview/outline.ts | 4 ++ .../src/codegen-modern-iframe-script.ts | 14 ++++++- 8 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 code/addons/essentials/src/preview/actions.ts create mode 100644 code/addons/essentials/src/preview/backgrounds.ts create mode 100644 code/addons/essentials/src/preview/docs.ts create mode 100644 code/addons/essentials/src/preview/highlight.ts create mode 100644 code/addons/essentials/src/preview/measure.ts create mode 100644 code/addons/essentials/src/preview/outline.ts diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 114f34133fe0..837f91f0eade 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -27,6 +27,36 @@ "import": "./dist/index.mjs", "types": "./dist/index.d.ts" }, + "./preview/actions": { + "require": "./dist/preview/actions.js", + "import": "./dist/preview/actions.mjs", + "types": "./dist/actions.d.ts" + }, + "./preview/backgrounds": { + "require": "./dist/preview/backgrounds.js", + "import": "./dist/preview/backgrounds.mjs", + "types": "./dist/backgrounds.d.ts" + }, + "./preview/docs": { + "require": "./dist/preview/docs.js", + "import": "./dist/preview/docs.mjs", + "types": "./dist/docs.d.ts" + }, + "./preview/highlight": { + "require": "./dist/preview/highlight.js", + "import": "./dist/preview/highlight.mjs", + "types": "./dist/highlight.d.ts" + }, + "./preview/measure": { + "require": "./dist/preview/measure.js", + "import": "./dist/preview/measure.mjs", + "types": "./dist/measure.d.ts" + }, + "./preview/outline": { + "require": "./dist/preview/outline.js", + "import": "./dist/preview/outline.mjs", + "types": "./dist/outline.d.ts" + }, "./package.json": "./package.json" }, "main": "dist/index.js", @@ -108,7 +138,13 @@ }, "bundler": { "entries": [ - "./src/index.ts" + "./src/index.ts", + "./src/preview/actions.ts", + "./src/preview/backgrounds.ts", + "./src/preview/docs.ts", + "./src/preview/highlight.ts", + "./src/preview/measure.ts", + "./src/preview/outline.ts" ], "platform": "node" }, diff --git a/code/addons/essentials/src/preview/actions.ts b/code/addons/essentials/src/preview/actions.ts new file mode 100644 index 000000000000..57cae8b9b31f --- /dev/null +++ b/code/addons/essentials/src/preview/actions.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/export */ +// This lint rule fails because it doesn't use export maps correctly + +export * from '@storybook/addon-actions/preview'; diff --git a/code/addons/essentials/src/preview/backgrounds.ts b/code/addons/essentials/src/preview/backgrounds.ts new file mode 100644 index 000000000000..1295c5592251 --- /dev/null +++ b/code/addons/essentials/src/preview/backgrounds.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/export */ +// This lint rule fails because it doesn't use export maps correctly + +export * from '@storybook/addon-backgrounds/preview'; diff --git a/code/addons/essentials/src/preview/docs.ts b/code/addons/essentials/src/preview/docs.ts new file mode 100644 index 000000000000..b7ba04e25554 --- /dev/null +++ b/code/addons/essentials/src/preview/docs.ts @@ -0,0 +1,3 @@ +// This lint rule fails because it doesn't use export maps correctly + +export * from '@storybook/addon-docs/preview'; diff --git a/code/addons/essentials/src/preview/highlight.ts b/code/addons/essentials/src/preview/highlight.ts new file mode 100644 index 000000000000..30e8c15340d0 --- /dev/null +++ b/code/addons/essentials/src/preview/highlight.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/export */ +// This lint rule fails because it doesn't use export maps correctly + +export * from '@storybook/addon-highlight/preview'; diff --git a/code/addons/essentials/src/preview/measure.ts b/code/addons/essentials/src/preview/measure.ts new file mode 100644 index 000000000000..3f2a4f86a63e --- /dev/null +++ b/code/addons/essentials/src/preview/measure.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/export */ +// This lint rule fails because it doesn't use export maps correctly + +export * from '@storybook/addon-measure/preview'; diff --git a/code/addons/essentials/src/preview/outline.ts b/code/addons/essentials/src/preview/outline.ts new file mode 100644 index 000000000000..f811f6155d6e --- /dev/null +++ b/code/addons/essentials/src/preview/outline.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/export */ +// This lint rule fails because it doesn't use export maps correctly + +export * from '@storybook/addon-outline/preview'; diff --git a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts index ee5339228f23..2341905ef9be 100644 --- a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts +++ b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts @@ -15,7 +15,19 @@ export async function generateModernIframeScriptCode(options: ExtendedOptions) { ); const relativePreviewAnnotations = [...resolvedPreviewAnnotations, previewOrConfigFile] .filter(Boolean) - .map((configEntry) => transformAbsPath(configEntry as string)); + .map((configEntry) => { + // Convert absolute path into a "bare" import (See https://github.com/vitejs/vite/issues/5494) + const relative = transformAbsPath(configEntry as string); + // If this is a sub-addon of essentials, rewrite the import to point to essentials re-export + const match = + /@storybook\/addon-(actions|backgrounds|docs|highlight|measure|outline)\/preview/.exec( + relative + ); + if (match) { + return `@storybook/addon-essentials/preview/${match[1]}`; + } + return relative; + }); // eslint-disable-next-line @typescript-eslint/no-shadow const generateHMRHandler = (frameworkName: string): string => { From cec66540e3766765f8376ce6637eddd4ba8b27fb Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 14:49:38 -0400 Subject: [PATCH 006/258] Standardize addon preview location / export --- code/addons/highlight/package.json | 10 +++++----- code/addons/highlight/preview.js | 2 +- .../highlight/src/{highlight.ts => preview.ts} | 0 code/addons/interactions/package.json | 12 ++++++------ code/addons/interactions/preview.js | 2 +- code/addons/interactions/src/{preset => }/preview.ts | 0 code/addons/outline/package.json | 12 ++++++------ code/addons/outline/preview.js | 2 +- code/addons/outline/src/{preset => }/preview.tsx | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-) rename code/addons/highlight/src/{highlight.ts => preview.ts} (100%) rename code/addons/interactions/src/{preset => }/preview.ts (100%) rename code/addons/outline/src/{preset => }/preview.tsx (51%) diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index 4d11f001001b..9d532d7a5375 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -29,10 +29,10 @@ "import": "./dist/index.mjs", "types": "./dist/index.d.ts" }, - "./preview": { - "require": "./dist/highlight.js", - "import": "./dist/highlight.mjs", - "types": "./dist/highlight.d.ts" + "./dist/preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" }, "./package.json": "./package.json" }, @@ -64,7 +64,7 @@ "bundler": { "entries": [ "./src/index.ts", - "./src/highlight.ts" + "./src/preview.ts" ] }, "gitHead": "1c706a4a778831e012343c905f86225fa71491a7", diff --git a/code/addons/highlight/preview.js b/code/addons/highlight/preview.js index f7dfc599138c..49ad602f79f4 100644 --- a/code/addons/highlight/preview.js +++ b/code/addons/highlight/preview.js @@ -1 +1 @@ -export * from './dist/highlight'; +export * from './dist/preview'; diff --git a/code/addons/highlight/src/highlight.ts b/code/addons/highlight/src/preview.ts similarity index 100% rename from code/addons/highlight/src/highlight.ts rename to code/addons/highlight/src/preview.ts diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index aaf19034814c..4a3f90f1d69e 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -27,15 +27,15 @@ "import": "./dist/index.mjs", "types": "./dist/index.d.ts" }, - "./manager": { + "./dist/manager": { "require": "./dist/manager.js", "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./preview": { - "require": "./dist/preset/preview.js", - "import": "./dist/preset/preview.mjs", - "types": "./dist/preset/preview.d.ts" + "./dist/preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" }, "./register.js": { "require": "./dist/manager.js", @@ -99,7 +99,7 @@ "entries": [ "./src/index.ts", "./src/manager.tsx", - "./src/preset/preview.ts", + "./src/preview.ts", "./src/preset/checkActionsLoaded.ts" ], "platform": "node" diff --git a/code/addons/interactions/preview.js b/code/addons/interactions/preview.js index 48714cc6fba3..49ad602f79f4 100644 --- a/code/addons/interactions/preview.js +++ b/code/addons/interactions/preview.js @@ -1 +1 @@ -export * from './dist/preset/preview'; +export * from './dist/preview'; diff --git a/code/addons/interactions/src/preset/preview.ts b/code/addons/interactions/src/preview.ts similarity index 100% rename from code/addons/interactions/src/preset/preview.ts rename to code/addons/interactions/src/preview.ts diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index ca64da59d950..74ecccd23bec 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -33,17 +33,17 @@ "import": "./dist/index.mjs", "types": "./dist/index.d.ts" }, - "./manager": { + "./dist/manager": { "require": "./dist/manager.js", "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./preview": { - "require": "./dist/preset/preview.js", - "import": "./dist/preset/preview.mjs", + "./dist/preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" }, - "./register": { + "./dist/register": { "require": "./dist/manager.js", "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" @@ -95,7 +95,7 @@ "entries": [ "./src/index.ts", "./src/manager.tsx", - "./src/preset/preview.tsx" + "./src/preview.tsx" ] }, "gitHead": "1c706a4a778831e012343c905f86225fa71491a7", diff --git a/code/addons/outline/preview.js b/code/addons/outline/preview.js index 48714cc6fba3..49ad602f79f4 100644 --- a/code/addons/outline/preview.js +++ b/code/addons/outline/preview.js @@ -1 +1 @@ -export * from './dist/preset/preview'; +export * from './dist/preview'; diff --git a/code/addons/outline/src/preset/preview.tsx b/code/addons/outline/src/preview.tsx similarity index 51% rename from code/addons/outline/src/preset/preview.tsx rename to code/addons/outline/src/preview.tsx index 1abee6e575c6..65161c6c4f29 100644 --- a/code/addons/outline/src/preset/preview.tsx +++ b/code/addons/outline/src/preview.tsx @@ -1,5 +1,5 @@ -import { withOutline } from '../withOutline'; -import { PARAM_KEY } from '../constants'; +import { withOutline } from './withOutline'; +import { PARAM_KEY } from './constants'; export const decorators = [withOutline]; From a61403ae0b414670685ebdf03295c948841057a7 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 16:02:17 -0400 Subject: [PATCH 007/258] Use /dist/preview in addons --- code/addons/a11y/package.json | 2 +- code/addons/actions/package.json | 2 +- code/addons/backgrounds/package.json | 2 +- code/addons/essentials/package.json | 12 ++++++------ code/addons/essentials/src/preview/actions.ts | 5 +---- code/addons/essentials/src/preview/backgrounds.ts | 5 +---- code/addons/essentials/src/preview/docs.ts | 2 -- code/addons/essentials/src/preview/highlight.ts | 5 +---- code/addons/essentials/src/preview/measure.ts | 5 +---- code/addons/essentials/src/preview/outline.ts | 5 +---- code/addons/essentials/src/typings.d.ts | 3 +++ code/addons/interactions/package.json | 2 +- code/addons/links/package.json | 2 +- code/addons/measure/package.json | 2 +- code/addons/outline/package.json | 4 ++-- 15 files changed, 22 insertions(+), 36 deletions(-) diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index 8c6d1d8e168f..64232fda8cd7 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -36,7 +36,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./preview": { + "./dist/preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index 91b57e0027ee..cb72471f012d 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -37,7 +37,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./preview": { + "./dist/preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index 12124cdcd4c2..603ba38e0c1d 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -36,7 +36,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./preview": { + "./dist/preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 837f91f0eade..d930e68d212e 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -30,32 +30,32 @@ "./preview/actions": { "require": "./dist/preview/actions.js", "import": "./dist/preview/actions.mjs", - "types": "./dist/actions.d.ts" + "types": "./dist/preview/actions.d.ts" }, "./preview/backgrounds": { "require": "./dist/preview/backgrounds.js", "import": "./dist/preview/backgrounds.mjs", - "types": "./dist/backgrounds.d.ts" + "types": "./dist/preview/backgrounds.d.ts" }, "./preview/docs": { "require": "./dist/preview/docs.js", "import": "./dist/preview/docs.mjs", - "types": "./dist/docs.d.ts" + "types": "./dist/preview/docs.d.ts" }, "./preview/highlight": { "require": "./dist/preview/highlight.js", "import": "./dist/preview/highlight.mjs", - "types": "./dist/highlight.d.ts" + "types": "./dist/preview/highlight.d.ts" }, "./preview/measure": { "require": "./dist/preview/measure.js", "import": "./dist/preview/measure.mjs", - "types": "./dist/measure.d.ts" + "types": "./dist/preview/measure.d.ts" }, "./preview/outline": { "require": "./dist/preview/outline.js", "import": "./dist/preview/outline.mjs", - "types": "./dist/outline.d.ts" + "types": "./dist/preview/outline.d.ts" }, "./package.json": "./package.json" }, diff --git a/code/addons/essentials/src/preview/actions.ts b/code/addons/essentials/src/preview/actions.ts index 57cae8b9b31f..572ae20e01d2 100644 --- a/code/addons/essentials/src/preview/actions.ts +++ b/code/addons/essentials/src/preview/actions.ts @@ -1,4 +1 @@ -/* eslint-disable import/export */ -// This lint rule fails because it doesn't use export maps correctly - -export * from '@storybook/addon-actions/preview'; +export * from '@storybook/addon-actions/dist/preview'; diff --git a/code/addons/essentials/src/preview/backgrounds.ts b/code/addons/essentials/src/preview/backgrounds.ts index 1295c5592251..d5ff97a51ace 100644 --- a/code/addons/essentials/src/preview/backgrounds.ts +++ b/code/addons/essentials/src/preview/backgrounds.ts @@ -1,4 +1 @@ -/* eslint-disable import/export */ -// This lint rule fails because it doesn't use export maps correctly - -export * from '@storybook/addon-backgrounds/preview'; +export * from '@storybook/addon-backgrounds/dist/preview'; diff --git a/code/addons/essentials/src/preview/docs.ts b/code/addons/essentials/src/preview/docs.ts index b7ba04e25554..68ad94fc557c 100644 --- a/code/addons/essentials/src/preview/docs.ts +++ b/code/addons/essentials/src/preview/docs.ts @@ -1,3 +1 @@ -// This lint rule fails because it doesn't use export maps correctly - export * from '@storybook/addon-docs/preview'; diff --git a/code/addons/essentials/src/preview/highlight.ts b/code/addons/essentials/src/preview/highlight.ts index 30e8c15340d0..9d8609a61a04 100644 --- a/code/addons/essentials/src/preview/highlight.ts +++ b/code/addons/essentials/src/preview/highlight.ts @@ -1,4 +1 @@ -/* eslint-disable import/export */ -// This lint rule fails because it doesn't use export maps correctly - -export * from '@storybook/addon-highlight/preview'; +export * from '@storybook/addon-highlight/dist/preview'; diff --git a/code/addons/essentials/src/preview/measure.ts b/code/addons/essentials/src/preview/measure.ts index 3f2a4f86a63e..6c094594d63a 100644 --- a/code/addons/essentials/src/preview/measure.ts +++ b/code/addons/essentials/src/preview/measure.ts @@ -1,4 +1 @@ -/* eslint-disable import/export */ -// This lint rule fails because it doesn't use export maps correctly - -export * from '@storybook/addon-measure/preview'; +export * from '@storybook/addon-measure/dist/preview'; diff --git a/code/addons/essentials/src/preview/outline.ts b/code/addons/essentials/src/preview/outline.ts index f811f6155d6e..d0c577287550 100644 --- a/code/addons/essentials/src/preview/outline.ts +++ b/code/addons/essentials/src/preview/outline.ts @@ -1,4 +1 @@ -/* eslint-disable import/export */ -// This lint rule fails because it doesn't use export maps correctly - -export * from '@storybook/addon-outline/preview'; +export * from '@storybook/addon-outline/dist/preview'; diff --git a/code/addons/essentials/src/typings.d.ts b/code/addons/essentials/src/typings.d.ts index 8cf1e5fe3055..419fc10cd268 100644 --- a/code/addons/essentials/src/typings.d.ts +++ b/code/addons/essentials/src/typings.d.ts @@ -1 +1,4 @@ declare module 'fs'; + +// TODO: Remove this once addon-docs is generated with tsup +declare module '@storybook/addon-docs/preview'; diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index 4a3f90f1d69e..40c62ba1a1e7 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -27,7 +27,7 @@ "import": "./dist/index.mjs", "types": "./dist/index.d.ts" }, - "./dist/manager": { + "./manager": { "require": "./dist/manager.js", "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 45d083b1e684..6e5e1e7cf5ca 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -32,7 +32,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./preview": { + "./dist/preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index 8b2d88c0bb02..ee1b607efab3 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -35,7 +35,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./preview": { + "./dist/preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index 74ecccd23bec..653859135daa 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -33,7 +33,7 @@ "import": "./dist/index.mjs", "types": "./dist/index.d.ts" }, - "./dist/manager": { + "./manager": { "require": "./dist/manager.js", "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" @@ -43,7 +43,7 @@ "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" }, - "./dist/register": { + "./register": { "require": "./dist/manager.js", "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" From 9fe7fdc20b65b33bba0914b1446c404910555bf3 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 19:33:16 -0400 Subject: [PATCH 008/258] Upgrade to TS 4.8 --- code/addons/a11y/package.json | 2 +- code/addons/actions/package.json | 2 +- code/addons/backgrounds/package.json | 2 +- code/addons/docs/package.json | 2 +- code/addons/essentials/package.json | 2 +- code/addons/highlight/package.json | 2 +- code/addons/interactions/package.json | 2 +- code/addons/jest/package.json | 2 +- code/addons/links/package.json | 2 +- code/addons/measure/package.json | 2 +- code/addons/outline/package.json | 2 +- code/addons/storysource/package.json | 2 +- code/addons/toolbars/package.json | 2 +- code/addons/viewport/package.json | 2 +- code/frameworks/angular/package.json | 2 +- code/frameworks/ember/package.json | 2 +- code/frameworks/html-webpack5/package.json | 2 +- code/frameworks/nextjs/package.json | 2 +- code/frameworks/preact-webpack5/package.json | 2 +- code/frameworks/react-vite/package.json | 2 +- code/frameworks/react-webpack5/package.json | 2 +- code/frameworks/server-webpack5/package.json | 2 +- code/frameworks/svelte-vite/package.json | 2 +- code/frameworks/svelte-webpack5/package.json | 2 +- code/frameworks/vue-vite/package.json | 2 +- code/frameworks/vue-webpack5/package.json | 2 +- code/frameworks/vue3-vite/package.json | 2 +- code/frameworks/vue3-webpack5/package.json | 2 +- .../web-components-vite/package.json | 2 +- .../web-components-webpack5/package.json | 2 +- code/lib/api/package.json | 2 +- code/lib/builder-manager/package.json | 2 +- code/lib/builder-vite/package.json | 2 +- code/lib/builder-webpack5/package.json | 2 +- code/lib/channel-postmessage/package.json | 2 +- code/lib/channel-websocket/package.json | 2 +- code/lib/channels/package.json | 2 +- code/lib/cli-sb/package.json | 2 +- code/lib/cli-storybook/package.json | 2 +- code/lib/cli/package.json | 2 +- code/lib/client-api/package.json | 2 +- code/lib/client-logger/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/lib/core-client/package.json | 2 +- code/lib/core-common/package.json | 2 +- code/lib/core-events/package.json | 2 +- code/lib/core-server/package.json | 2 +- code/lib/core-webpack/package.json | 2 +- code/lib/csf-plugin/package.json | 2 +- code/lib/csf-tools/package.json | 2 +- code/lib/docs-tools/package.json | 2 +- code/lib/instrumenter/package.json | 2 +- code/lib/node-logger/package.json | 2 +- code/lib/postinstall/package.json | 2 +- code/lib/preview-web/package.json | 2 +- code/lib/router/package.json | 2 +- code/lib/source-loader/package.json | 2 +- code/lib/store/package.json | 2 +- code/lib/telemetry/package.json | 2 +- code/lib/theming/package.json | 2 +- code/lib/types/package.json | 2 +- code/package.json | 4 +- code/presets/html-webpack/package.json | 2 +- code/presets/preact-webpack/package.json | 2 +- code/presets/react-webpack/package.json | 2 +- code/presets/server-webpack/package.json | 2 +- code/presets/svelte-webpack/package.json | 2 +- code/presets/vue-webpack/package.json | 2 +- code/presets/vue3-webpack/package.json | 2 +- .../web-components-webpack/package.json | 2 +- code/renderers/html/package.json | 2 +- code/renderers/preact/package.json | 2 +- code/renderers/react/package.json | 2 +- code/renderers/server/package.json | 2 +- code/renderers/svelte/package.json | 2 +- code/renderers/vue/package.json | 2 +- code/renderers/vue3/package.json | 2 +- code/renderers/web-components/package.json | 2 +- code/ui/components/package.json | 2 +- code/ui/manager/package.json | 2 +- code/yarn.lock | 176 +++++++++--------- 81 files changed, 169 insertions(+), 169 deletions(-) diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index 64232fda8cd7..ec9815b2dc1c 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -78,7 +78,7 @@ }, "devDependencies": { "@testing-library/react": "^11.2.2", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index cb72471f012d..6445406fd3bf 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -82,7 +82,7 @@ }, "devDependencies": { "@types/lodash": "^4.14.167", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index 603ba38e0c1d..95c1d4a3a7fc 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -74,7 +74,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 0bdef57c666c..e8013d86b1a7 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -77,7 +77,7 @@ }, "devDependencies": { "@babel/core": "^7.12.10", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index d930e68d212e..9c55001b2441 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -90,7 +90,7 @@ "@babel/core": "^7.12.10", "@storybook/vue": "7.0.0-alpha.47", "@types/jest": "^26.0.16", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "^7.9.6" diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index 9d532d7a5375..6248c271c381 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -56,7 +56,7 @@ }, "devDependencies": { "@types/webpack-env": "^1.16.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index 40c62ba1a1e7..487ea58da846 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -78,7 +78,7 @@ "@storybook/testing-library": "0.0.14-next.0", "@types/node": "^16.0.0", "formik": "^2.2.9", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index bb6a5b226ee9..35e793b4b2c1 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -70,7 +70,7 @@ "upath": "^1.2.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/links/package.json b/code/addons/links/package.json index 82f3c21f58b2..ce9e4b586d8c 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -74,7 +74,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index ee1b607efab3..74b144c2c8eb 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -70,7 +70,7 @@ "global": "^4.4.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index 653859135daa..4ab2c9cfbb9a 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -74,7 +74,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/storysource/package.json b/code/addons/storysource/package.json index b99a34b22e47..969d9f0a9059 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -67,7 +67,7 @@ "devDependencies": { "@types/react": "^16.14.23", "@types/react-syntax-highlighter": "11.0.5", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index e2f62ba9de7b..e7ac0470e51f 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -64,7 +64,7 @@ "@storybook/theming": "7.0.0-alpha.47" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json index 4a7bd33a2b61..59053482b366 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -70,7 +70,7 @@ "prop-types": "^15.7.2" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index 31974b668643..aa149e593658 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -85,7 +85,7 @@ "jest-specific-snapshot": "^5.0.0", "rimraf": "^3.0.2", "tmp": "^0.2.1", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "webpack": "5", "zone.js": "^0.11.0" }, diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json index a3e7d9e249f8..48470c4e207d 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -45,7 +45,7 @@ }, "devDependencies": { "ember-source": "~3.28.1", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/frameworks/html-webpack5/package.json b/code/frameworks/html-webpack5/package.json index 622fb2b4f92b..387d1ca59deb 100644 --- a/code/frameworks/html-webpack5/package.json +++ b/code/frameworks/html-webpack5/package.json @@ -60,7 +60,7 @@ "react-dom": "16.14.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "*" diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index 88b421ada87d..78f36d636d61 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -84,7 +84,7 @@ "@storybook/addon-actions": "7.0.0-alpha.47", "@types/loader-utils": "^2.0.3", "next": "^12.2.4", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "webpack": "^5.65.0" }, "peerDependencies": { diff --git a/code/frameworks/preact-webpack5/package.json b/code/frameworks/preact-webpack5/package.json index 414219334b95..a8138063e444 100644 --- a/code/frameworks/preact-webpack5/package.json +++ b/code/frameworks/preact-webpack5/package.json @@ -60,7 +60,7 @@ }, "devDependencies": { "preact": "^10.5.13", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index e275e8074cad..455a8ab7b48d 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -68,7 +68,7 @@ }, "devDependencies": { "@types/node": "^16.0.0", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vite": "^3.1.3" }, "peerDependencies": { diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json index 5bfbd566ea61..cf473cdc36e2 100644 --- a/code/frameworks/react-webpack5/package.json +++ b/code/frameworks/react-webpack5/package.json @@ -58,7 +58,7 @@ }, "devDependencies": { "jest-specific-snapshot": "^4.0.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "^7.11.5", diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index fd973344c319..99ed65ee0bae 100644 --- a/code/frameworks/server-webpack5/package.json +++ b/code/frameworks/server-webpack5/package.json @@ -59,7 +59,7 @@ "react-dom": "16.14.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "engines": { "node": ">=10.13.0" diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index b98437e8927b..90cc6d76899b 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -68,7 +68,7 @@ }, "devDependencies": { "@types/node": "^16.0.0", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vite": "^3.1.3" }, "peerDependencies": { diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index ac3836331ecf..e683e5fd18bb 100644 --- a/code/frameworks/svelte-webpack5/package.json +++ b/code/frameworks/svelte-webpack5/package.json @@ -61,7 +61,7 @@ "devDependencies": { "svelte": "^3.48.0", "svelte-loader": "^3.1.2", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json index 78a386da4e10..f79a00616a39 100644 --- a/code/frameworks/vue-vite/package.json +++ b/code/frameworks/vue-vite/package.json @@ -64,7 +64,7 @@ "vue-docgen-api": "^4.40.0" }, "devDependencies": { - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vue": "^2.7.10" }, "peerDependencies": { diff --git a/code/frameworks/vue-webpack5/package.json b/code/frameworks/vue-webpack5/package.json index 4a7122583dcf..b0a0c75c6179 100644 --- a/code/frameworks/vue-webpack5/package.json +++ b/code/frameworks/vue-webpack5/package.json @@ -59,7 +59,7 @@ "react-dom": "16.14.0" }, "devDependencies": { - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vue": "^2.6.12", "vue-loader": "^15.7.0", "vue-template-compiler": "^2.6.14" diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index 10ee9f308ebb..046914170aa9 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -66,7 +66,7 @@ }, "devDependencies": { "@types/node": "^16.0.0", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vite": "^3.1.3" }, "engines": { diff --git a/code/frameworks/vue3-webpack5/package.json b/code/frameworks/vue3-webpack5/package.json index 5ef27f6db276..a4b901bc1a73 100644 --- a/code/frameworks/vue3-webpack5/package.json +++ b/code/frameworks/vue3-webpack5/package.json @@ -60,7 +60,7 @@ }, "devDependencies": { "@vue/compiler-sfc": "3.0.0", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vue": "3.0.0" }, "peerDependencies": { diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index 023d64308e13..23cbc4bcd23e 100644 --- a/code/frameworks/web-components-vite/package.json +++ b/code/frameworks/web-components-vite/package.json @@ -65,7 +65,7 @@ }, "devDependencies": { "@types/node": "^16.0.0", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vite": "^3.1.0" }, "engines": { diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index 06a9cdc10434..90c88e795578 100644 --- a/code/frameworks/web-components-webpack5/package.json +++ b/code/frameworks/web-components-webpack5/package.json @@ -63,7 +63,7 @@ }, "devDependencies": { "lit-html": "2.0.2", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "lit-html": "^1.4.1 || ^2.0.0" diff --git a/code/lib/api/package.json b/code/lib/api/package.json index 87f4bfb8dd7c..966a18ce5c62 100644 --- a/code/lib/api/package.json +++ b/code/lib/api/package.json @@ -69,7 +69,7 @@ "@types/qs": "^6", "flush-promises": "^1.0.2", "qs": "^6.10.1", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/builder-manager/package.json b/code/lib/builder-manager/package.json index 819989869481..7e5345246bc8 100644 --- a/code/lib/builder-manager/package.json +++ b/code/lib/builder-manager/package.json @@ -58,7 +58,7 @@ "util": "^0.12.4" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/builder-vite/package.json b/code/lib/builder-vite/package.json index 3b3b0129e05e..3e8eebc728aa 100644 --- a/code/lib/builder-vite/package.json +++ b/code/lib/builder-vite/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@types/express": "^4.17.13", "@types/node": "^16.0.0", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vite": "^3.1.3" }, "publishConfig": { diff --git a/code/lib/builder-webpack5/package.json b/code/lib/builder-webpack5/package.json index 269253ceac03..2d7cbb0bfdbf 100644 --- a/code/lib/builder-webpack5/package.json +++ b/code/lib/builder-webpack5/package.json @@ -98,7 +98,7 @@ "@types/webpack-dev-middleware": "^5.3.0", "@types/webpack-hot-middleware": "^2.25.6", "@types/webpack-virtual-modules": "^0.1.1", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/channel-postmessage/package.json b/code/lib/channel-postmessage/package.json index c1a4cb07e6d5..c298a57f5c8a 100644 --- a/code/lib/channel-postmessage/package.json +++ b/code/lib/channel-postmessage/package.json @@ -50,7 +50,7 @@ "telejson": "^6.0.8" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/channel-websocket/package.json b/code/lib/channel-websocket/package.json index 7606042af691..746e536f94cb 100644 --- a/code/lib/channel-websocket/package.json +++ b/code/lib/channel-websocket/package.json @@ -40,7 +40,7 @@ "telejson": "^6.0.8" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/channels/package.json b/code/lib/channels/package.json index 8759d8b01adb..5492cf2dbeb1 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -42,7 +42,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index 96871a9fd353..2a77f7c8d42a 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -27,7 +27,7 @@ "@storybook/cli": "7.0.0-alpha.47" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index 281c4b0290a0..b41f8fc20344 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -30,7 +30,7 @@ "@storybook/cli": "7.0.0-alpha.47" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 88f8ee00bfe3..804dd02afb04 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -87,7 +87,7 @@ "@types/update-notifier": "^6.0.1", "@types/util-deprecate": "^1.0.0", "strip-json-comments": "^3.1.1", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "update-notifier": "^6.0.2" }, "publishConfig": { diff --git a/code/lib/client-api/package.json b/code/lib/client-api/package.json index b0a7d82c24e6..65fdf6482422 100644 --- a/code/lib/client-api/package.json +++ b/code/lib/client-api/package.json @@ -57,7 +57,7 @@ }, "devDependencies": { "@storybook/core-common": "7.0.0-alpha.47", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/client-logger/package.json b/code/lib/client-logger/package.json index 8f12654654ed..9d1950063a6c 100644 --- a/code/lib/client-logger/package.json +++ b/code/lib/client-logger/package.json @@ -45,7 +45,7 @@ "global": "^4.4.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 3d9a473cd683..7c2a72dd6239 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -53,7 +53,7 @@ "devDependencies": { "jest": "^26.6.3", "jest-specific-snapshot": "^4.0.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/core-client/package.json b/code/lib/core-client/package.json index 838bd92a8133..ffc733b750c3 100644 --- a/code/lib/core-client/package.json +++ b/code/lib/core-client/package.json @@ -50,7 +50,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependenciesMeta": { "typescript": { diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index a81bf5560997..fcbf75b0b89d 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -77,7 +77,7 @@ "@types/picomatch": "^2.3.0", "mock-fs": "^4.13.0", "type-fest": "^2.17.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/core-events/package.json b/code/lib/core-events/package.json index d75b53ea8a5e..21bb8647646c 100644 --- a/code/lib/core-events/package.json +++ b/code/lib/core-events/package.json @@ -42,7 +42,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index 8b965838aa81..aaad3d77b142 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -85,7 +85,7 @@ "jest-os-detection": "^1.3.1", "jest-specific-snapshot": "^4.0.0", "ts-jest": "^26.4.4", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "webpack": "5" }, "peerDependencies": { diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index 7936a4b0a9b5..9d99e9818f26 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -49,7 +49,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.6.3", + "typescript": "~4.8.4", "webpack": "5" }, "publishConfig": { diff --git a/code/lib/csf-plugin/package.json b/code/lib/csf-plugin/package.json index 2af68bc379d0..cbf328cd1581 100644 --- a/code/lib/csf-plugin/package.json +++ b/code/lib/csf-plugin/package.json @@ -46,7 +46,7 @@ "unplugin": "^0.10.2" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index 23827b33f3e1..2f9379f32ee4 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -54,7 +54,7 @@ "@babel/traverse": "^7.12.11", "@types/fs-extra": "^9.0.6", "js-yaml": "^3.14.1", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/docs-tools/package.json b/code/lib/docs-tools/package.json index 83455a4301db..9b6755a52c48 100644 --- a/code/lib/docs-tools/package.json +++ b/code/lib/docs-tools/package.json @@ -52,7 +52,7 @@ "devDependencies": { "jest-specific-snapshot": "^4.0.0", "require-from-string": "^2.0.2", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/instrumenter/package.json b/code/lib/instrumenter/package.json index 52201a05a346..65a5b81ad97b 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -50,7 +50,7 @@ "global": "^4.4.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/node-logger/package.json b/code/lib/node-logger/package.json index 0d525c544841..63e21d1ff546 100644 --- a/code/lib/node-logger/package.json +++ b/code/lib/node-logger/package.json @@ -49,7 +49,7 @@ }, "devDependencies": { "@types/pretty-hrtime": "^1.0.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/postinstall/package.json b/code/lib/postinstall/package.json index fddaef27a739..d0ab71f38a7f 100644 --- a/code/lib/postinstall/package.json +++ b/code/lib/postinstall/package.json @@ -46,7 +46,7 @@ "jest": "^26.6.3", "jest-specific-snapshot": "^4.0.0", "jscodeshift": "^0.13.1", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/preview-web/package.json b/code/lib/preview-web/package.json index d7b6a3ed83bb..bdb7ec1574f6 100644 --- a/code/lib/preview-web/package.json +++ b/code/lib/preview-web/package.json @@ -60,7 +60,7 @@ "@storybook/channel-postmessage": "7.0.0-alpha.47", "react": "16.14.0", "ts-jest": "^28.0.8", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/router/package.json b/code/lib/router/package.json index ad75ea56600f..d41d7088108b 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -58,7 +58,7 @@ "react-router-dom": "6.0.2", "ts-dedent": "^2.0.0", "ts-node": "^10.4.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index 9eef875da2f5..856de66ccca4 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -51,7 +51,7 @@ }, "devDependencies": { "jest-specific-snapshot": "^4.0.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/store/package.json b/code/lib/store/package.json index 337fbbc3ea3a..5ad7f5dd6297 100644 --- a/code/lib/store/package.json +++ b/code/lib/store/package.json @@ -57,7 +57,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/telemetry/package.json b/code/lib/telemetry/package.json index 54f17f017829..83b3a13e133a 100644 --- a/code/lib/telemetry/package.json +++ b/code/lib/telemetry/package.json @@ -53,7 +53,7 @@ "read-pkg-up": "^7.0.1" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/lib/theming/package.json b/code/lib/theming/package.json index d22d00a5b794..e050a0f13618 100644 --- a/code/lib/theming/package.json +++ b/code/lib/theming/package.json @@ -63,7 +63,7 @@ "global": "^4.4.0", "polished": "^4.2.2", "ts-dedent": "^2.0.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/types/package.json b/code/lib/types/package.json index 3c837664f5eb..e8e449e7b963 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -50,7 +50,7 @@ "@storybook/csf": "next", "@types/node": "^16.0.0", "synchronous-promise": "^2.0.15", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/package.json b/code/package.json index 041f52e6755e..a64b6d66e8b8 100644 --- a/code/package.json +++ b/code/package.json @@ -117,7 +117,7 @@ "esbuild": "^0.14.48", "eslint": "^8.26.0", "serialize-javascript": "^3.1.0", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "webpack": "5" }, "dependencies": { @@ -338,7 +338,7 @@ "ts-jest": "^26.4.4", "ts-node": "^10.4.0", "tsup": "^6.2.2", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "util": "^0.12.4", "vite": "^3.1.7", "wait-on": "^5.2.1", diff --git a/code/presets/html-webpack/package.json b/code/presets/html-webpack/package.json index 13ed7efd851e..8543b462b069 100644 --- a/code/presets/html-webpack/package.json +++ b/code/presets/html-webpack/package.json @@ -58,7 +58,7 @@ "webpack": "5" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "*" diff --git a/code/presets/preact-webpack/package.json b/code/presets/preact-webpack/package.json index a27970e6b6c7..df7bf92cdf0d 100644 --- a/code/presets/preact-webpack/package.json +++ b/code/presets/preact-webpack/package.json @@ -58,7 +58,7 @@ }, "devDependencies": { "preact": "^10.5.13", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/presets/react-webpack/package.json b/code/presets/react-webpack/package.json index 5fec867c0ae7..81aa9cad3551 100644 --- a/code/presets/react-webpack/package.json +++ b/code/presets/react-webpack/package.json @@ -89,7 +89,7 @@ }, "devDependencies": { "@types/util-deprecate": "^1.0.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "^7.11.5", diff --git a/code/presets/server-webpack/package.json b/code/presets/server-webpack/package.json index 715ff99fd4fc..207b00aaba5b 100644 --- a/code/presets/server-webpack/package.json +++ b/code/presets/server-webpack/package.json @@ -69,7 +69,7 @@ "devDependencies": { "fs-extra": "^9.0.1", "jest-specific-snapshot": "^4.0.0", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "yaml": "^1.10.0" }, "engines": { diff --git a/code/presets/svelte-webpack/package.json b/code/presets/svelte-webpack/package.json index e4747efb9d3b..b387c9fcc179 100644 --- a/code/presets/svelte-webpack/package.json +++ b/code/presets/svelte-webpack/package.json @@ -75,7 +75,7 @@ "devDependencies": { "svelte": "^3.31.2", "svelte-loader": "^3.1.2", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/presets/vue-webpack/package.json b/code/presets/vue-webpack/package.json index a2bd6bfe95c3..546179a48667 100644 --- a/code/presets/vue-webpack/package.json +++ b/code/presets/vue-webpack/package.json @@ -71,7 +71,7 @@ "webpack": "5" }, "devDependencies": { - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vue": "^2.6.12", "vue-loader": "^15.7.0", "vue-template-compiler": "^2.6.14", diff --git a/code/presets/vue3-webpack/package.json b/code/presets/vue3-webpack/package.json index a883af45e493..cee1fb97c6cf 100644 --- a/code/presets/vue3-webpack/package.json +++ b/code/presets/vue3-webpack/package.json @@ -73,7 +73,7 @@ }, "devDependencies": { "@vue/compiler-sfc": "^3.2.33", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vue": "^3.2.33" }, "peerDependencies": { diff --git a/code/presets/web-components-webpack/package.json b/code/presets/web-components-webpack/package.json index 64945ebc1a8e..8375955d6fcc 100644 --- a/code/presets/web-components-webpack/package.json +++ b/code/presets/web-components-webpack/package.json @@ -64,7 +64,7 @@ }, "devDependencies": { "lit-html": "2.0.2", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "lit-html": "^1.4.1 || ^2.0.0" diff --git a/code/renderers/html/package.json b/code/renderers/html/package.json index 5fa591cd8b8b..97b8c9a2c990 100644 --- a/code/renderers/html/package.json +++ b/code/renderers/html/package.json @@ -63,7 +63,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "*" diff --git a/code/renderers/preact/package.json b/code/renderers/preact/package.json index 690ec7da696f..c5b3757ef189 100644 --- a/code/renderers/preact/package.json +++ b/code/renderers/preact/package.json @@ -62,7 +62,7 @@ }, "devDependencies": { "preact": "^10.5.13", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "preact": "^8.0.0||^10.0.0" diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index 6abb292ed5c3..3dc637462c55 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -80,7 +80,7 @@ "expect-type": "^0.14.2", "jest-specific-snapshot": "^4.0.0", "require-from-string": "^2.0.2", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index fe56f38fd9c2..223fa6dedf3b 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -62,7 +62,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "engines": { "node": ">=10.13.0" diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index 6c4187f5a242..955a2fddce59 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -71,7 +71,7 @@ "expect-type": "^0.14.2", "svelte": "^3.31.2", "svelte-check": "^2.9.2", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/renderers/vue/package.json b/code/renderers/vue/package.json index 8a3043975ac5..06c8e8bcf8d3 100644 --- a/code/renderers/vue/package.json +++ b/code/renderers/vue/package.json @@ -64,7 +64,7 @@ "type-fest": "2.19.0" }, "devDependencies": { - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vue": "2.6.14", "vue-tsc": "^1.0.9" }, diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index c2bba2f61ab2..e13c77b86bf0 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -64,7 +64,7 @@ }, "devDependencies": { "@digitak/esrun": "^3.2.2", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "vue": "^3.2.41", "vue-tsc": "^1.0.8" }, diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index e14b64898c30..a18f19f298fd 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -69,7 +69,7 @@ "devDependencies": { "lit": "2.3.1", "lit-html": "2.0.2", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "lit-html": "^1.4.1 || ^2.0.0" diff --git a/code/ui/components/package.json b/code/ui/components/package.json index a20ba4625b43..5a5500435651 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -72,7 +72,7 @@ "react-syntax-highlighter": "^15.4.5", "react-textarea-autosize": "^8.3.0", "ts-dedent": "^2.0.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/ui/manager/package.json b/code/ui/manager/package.json index e0293adbcafa..27fd1cf4e7c8 100644 --- a/code/ui/manager/package.json +++ b/code/ui/manager/package.json @@ -87,7 +87,7 @@ "shelljs": "^0.8.5", "store2": "^2.12.0", "ts-dedent": "^2.0.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "publishConfig": { "access": "public" diff --git a/code/yarn.lock b/code/yarn.lock index 38af9d7e00c3..57de4a2df1c4 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5406,7 +5406,7 @@ __metadata: global: ^4.4.0 lodash: ^4.17.21 react-sizeme: ^3.0.1 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5438,7 +5438,7 @@ __metadata: react-inspector: ^6.0.0 telejson: ^6.0.8 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 uuid-browser: ^3.1.0 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5465,7 +5465,7 @@ __metadata: global: ^4.4.0 memoizerific: ^1.11.3 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5534,7 +5534,7 @@ __metadata: remark-external-links: ^8.0.0 remark-slug: ^6.0.0 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5567,7 +5567,7 @@ __metadata: "@storybook/vue": 7.0.0-alpha.47 "@types/jest": ^26.0.16 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": ^7.9.6 peerDependenciesMeta: @@ -5606,7 +5606,7 @@ __metadata: "@storybook/core-events": 7.0.0-alpha.47 "@types/webpack-env": ^1.16.0 global: ^4.4.0 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -5632,7 +5632,7 @@ __metadata: jest-mock: ^27.0.6 polished: ^4.2.2 ts-dedent: ^2.2.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5656,7 +5656,7 @@ __metadata: "@storybook/theming": 7.0.0-alpha.47 global: ^4.4.0 react-sizeme: ^3.0.1 - typescript: ~4.6.3 + typescript: ~4.8.4 upath: ^1.2.0 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5682,7 +5682,7 @@ __metadata: global: ^4.4.0 prop-types: ^15.7.2 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5705,7 +5705,7 @@ __metadata: "@storybook/core-events": 7.0.0-alpha.47 "@storybook/types": 7.0.0-alpha.47 global: ^4.4.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5729,7 +5729,7 @@ __metadata: "@storybook/types": 7.0.0-alpha.47 global: ^4.4.0 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5868,7 +5868,7 @@ __metadata: estraverse: ^5.2.0 prop-types: ^15.7.2 react-syntax-highlighter: ^15.5.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5905,7 +5905,7 @@ __metadata: "@storybook/client-logger": 7.0.0-alpha.47 "@storybook/components": 7.0.0-alpha.47 "@storybook/theming": 7.0.0-alpha.47 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5930,7 +5930,7 @@ __metadata: global: ^4.4.0 memoizerific: ^1.11.3 prop-types: ^15.7.2 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6033,7 +6033,7 @@ __metadata: tmp: ^0.2.1 ts-dedent: ^2.0.0 tsconfig-paths-webpack-plugin: ^3.5.2 - typescript: ~4.6.3 + typescript: ~4.8.4 util-deprecate: ^1.0.2 webpack: 5 zone.js: ^0.11.0 @@ -6087,7 +6087,7 @@ __metadata: store2: ^2.12.0 telejson: ^6.0.8 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6182,7 +6182,7 @@ __metadata: fs-extra: ^9.0.1 process: ^0.11.10 slash: ^3.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 util: ^0.12.4 languageName: unknown linkType: soft @@ -6209,7 +6209,7 @@ __metadata: glob-promise: ^4.2.0 magic-string: ^0.26.1 slash: ^3.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 vite: ^3.1.3 languageName: unknown linkType: soft @@ -6256,7 +6256,7 @@ __metadata: style-loader: ^3.3.1 terser-webpack-plugin: ^5.3.1 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 util: ^0.12.4 util-deprecate: ^1.0.2 webpack: 5 @@ -6282,7 +6282,7 @@ __metadata: global: ^4.4.0 qs: ^6.10.0 telejson: ^6.0.8 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -6294,7 +6294,7 @@ __metadata: "@storybook/client-logger": 7.0.0-alpha.47 global: ^4.4.0 telejson: ^6.0.8 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -6302,7 +6302,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/channels@workspace:lib/channels" dependencies: - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -6361,7 +6361,7 @@ __metadata: shelljs: ^0.8.5 strip-json-comments: ^3.1.1 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 update-notifier: ^6.0.2 util-deprecate: ^1.0.2 bin: @@ -6386,7 +6386,7 @@ __metadata: qs: ^6.10.0 synchronous-promise: ^2.0.15 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6399,7 +6399,7 @@ __metadata: resolution: "@storybook/client-logger@workspace:lib/client-logger" dependencies: global: ^4.4.0 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -6430,7 +6430,7 @@ __metadata: lodash: ^4.17.21 prettier: ">=2.2.1 <=3.0.0" recast: ^0.19.0 - typescript: ~4.6.3 + typescript: ~4.8.4 util: ^0.12.4 languageName: unknown linkType: soft @@ -6457,7 +6457,7 @@ __metadata: react-syntax-highlighter: ^15.4.5 react-textarea-autosize: ^8.3.0 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6481,7 +6481,7 @@ __metadata: "@storybook/store": 7.0.0-alpha.47 "@storybook/types": 7.0.0-alpha.47 global: ^4.4.0 - typescript: ~4.6.3 + typescript: ~4.8.4 util-deprecate: ^1.0.2 peerDependenciesMeta: typescript: @@ -6521,7 +6521,7 @@ __metadata: telejson: ^6.0.8 ts-dedent: ^2.0.0 type-fest: ^2.17.0 - typescript: ~4.6.3 + typescript: ~4.8.4 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6536,7 +6536,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/core-events@workspace:lib/core-events" dependencies: - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -6600,7 +6600,7 @@ __metadata: telejson: ^6.0.8 ts-dedent: ^2.0.0 ts-jest: ^26.4.4 - typescript: ~4.6.3 + typescript: ~4.8.4 util-deprecate: ^1.0.2 watchpack: ^2.2.0 webpack: 5 @@ -6625,7 +6625,7 @@ __metadata: "@storybook/types": 7.0.0-alpha.47 "@types/node": ^16.0.0 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 webpack: 5 languageName: unknown linkType: soft @@ -6635,7 +6635,7 @@ __metadata: resolution: "@storybook/csf-plugin@workspace:lib/csf-plugin" dependencies: "@storybook/csf-tools": 7.0.0-alpha.47 - typescript: ~4.6.3 + typescript: ~4.8.4 unplugin: ^0.10.2 languageName: unknown linkType: soft @@ -6654,7 +6654,7 @@ __metadata: fs-extra: ^9.0.1 js-yaml: ^3.14.1 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -6711,7 +6711,7 @@ __metadata: jest-specific-snapshot: ^4.0.0 lodash: ^4.17.21 require-from-string: ^2.0.2 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -6731,7 +6731,7 @@ __metadata: react-dom: 16.14.0 read-pkg-up: ^7.0.1 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": "*" "@types/ember__component": 4.0.8 @@ -6771,7 +6771,7 @@ __metadata: global: ^4.4.0 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": "*" languageName: unknown @@ -6791,7 +6791,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": "*" languageName: unknown @@ -6807,7 +6807,7 @@ __metadata: "@storybook/core-events": 7.0.0-alpha.47 core-js: ^3.8.2 global: ^4.4.0 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -6930,7 +6930,7 @@ __metadata: shelljs: ^0.8.5 store2: ^2.12.0 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -6978,7 +6978,7 @@ __metadata: ts-dedent: ^2.0.0 tsconfig-paths: ^4.0.0 tsconfig-paths-webpack-plugin: ^3.5.2 - typescript: ~4.6.3 + typescript: ~4.8.4 webpack: ^5.65.0 peerDependencies: "@babel/core": ^7.11.5 @@ -7006,7 +7006,7 @@ __metadata: chalk: ^4.1.0 npmlog: ^5.0.1 pretty-hrtime: ^1.0.3 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -7017,7 +7017,7 @@ __metadata: jest: ^26.6.3 jest-specific-snapshot: ^4.0.0 jscodeshift: ^0.13.1 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -7033,7 +7033,7 @@ __metadata: preact: ^10.5.13 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": "*" preact: ^8.0.0||^10.0.0 @@ -7053,7 +7053,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: preact: ^8.0.0||^10.0.0 languageName: unknown @@ -7068,7 +7068,7 @@ __metadata: html-loader: ^3.1.0 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.6.3 + typescript: ~4.8.4 webpack: 5 peerDependencies: "@babel/core": "*" @@ -7085,7 +7085,7 @@ __metadata: preact: ^10.5.13 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": "*" preact: ^8.0.0||^10.0.0 @@ -7112,7 +7112,7 @@ __metadata: fs-extra: ^9.0.1 react-refresh: ^0.11.0 semver: ^7.3.7 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": ^7.11.5 jest-specific-snapshot: ^4.0.0 @@ -7143,7 +7143,7 @@ __metadata: react-dom: 16.14.0 safe-identifier: ^0.4.1 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 yaml: ^1.10.0 yaml-loader: ^0.8.0 languageName: unknown @@ -7161,7 +7161,7 @@ __metadata: svelte-loader: ^3.1.2 sveltedoc-parser: ^4.2.1 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": "*" svelte: ^3.1.0 @@ -7179,7 +7179,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-loader: ^9.2.8 - typescript: ~4.6.3 + typescript: ~4.8.4 vue: ^2.6.12 vue-docgen-api: ^4.44.23 vue-docgen-loader: ^1.5.1 @@ -7207,7 +7207,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-loader: ^9.2.8 - typescript: ~4.6.3 + typescript: ~4.8.4 vue: ^3.2.33 vue-docgen-api: ^4.46.0 vue-docgen-loader: ^1.5.1 @@ -7235,7 +7235,7 @@ __metadata: lit-html: 2.0.2 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: lit-html: ^1.4.1 || ^2.0.0 languageName: unknown @@ -7260,7 +7260,7 @@ __metadata: synchronous-promise: ^2.0.15 ts-dedent: ^2.0.0 ts-jest: ^28.0.8 - typescript: ~4.6.3 + typescript: ~4.8.4 util-deprecate: ^1.0.2 languageName: unknown linkType: soft @@ -7301,7 +7301,7 @@ __metadata: ast-types: ^0.14.2 magic-string: ^0.26.1 react-docgen: ^6.0.0-alpha.3 - typescript: ~4.6.3 + typescript: ~4.8.4 vite: ^3.1.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7318,7 +7318,7 @@ __metadata: "@storybook/react": 7.0.0-alpha.47 "@types/node": ^16.0.0 jest-specific-snapshot: ^4.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": ^7.11.5 react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7360,7 +7360,7 @@ __metadata: require-from-string: ^2.0.2 ts-dedent: ^2.0.0 type-fest: ^2.19.0 - typescript: ~4.6.3 + typescript: ~4.8.4 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7595,7 +7595,7 @@ __metadata: ts-loader: ^9.2.8 ts-node: ^10.4.0 tsup: ^6.2.2 - typescript: ~4.6.3 + typescript: ~4.8.4 util: ^0.12.4 verdaccio: ^4.10.0 verdaccio-auth-memory: ^9.7.2 @@ -7648,7 +7648,7 @@ __metadata: react-router-dom: 6.0.2 ts-dedent: ^2.0.0 ts-node: ^10.4.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7694,7 +7694,7 @@ __metadata: "@types/node": ^16.0.0 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -7711,7 +7711,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -7725,7 +7725,7 @@ __metadata: jest-specific-snapshot: ^4.0.0 lodash: ^4.17.21 prettier: ">=2.2.1 <=3.0.0" - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7748,7 +7748,7 @@ __metadata: slash: ^3.0.0 synchronous-promise: ^2.0.15 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7774,7 +7774,7 @@ __metadata: magic-string: ^0.26.1 svelte: ^3.0.0 sveltedoc-parser: ^4.2.1 - typescript: ~4.6.3 + typescript: ~4.8.4 vite: ^3.1.3 peerDependencies: "@storybook/addon-svelte-csf": ^2.0.0 @@ -7796,7 +7796,7 @@ __metadata: react-dom: 16.14.0 svelte: ^3.48.0 svelte-loader: ^3.1.2 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": "*" svelte: ^3.48.0 @@ -7822,7 +7822,7 @@ __metadata: svelte-check: ^2.9.2 sveltedoc-parser: ^4.2.1 type-fest: 2.19.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: "@babel/core": "*" svelte: ^3.1.0 @@ -7842,7 +7842,7 @@ __metadata: isomorphic-unfetch: ^3.1.0 nanoid: ^3.3.1 read-pkg-up: ^7.0.1 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -7877,7 +7877,7 @@ __metadata: memoizerific: ^1.11.3 polished: ^4.2.2 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7911,7 +7911,7 @@ __metadata: express: ^4.17.1 file-system-cache: ^2.0.0 synchronous-promise: ^2.0.15 - typescript: ~4.6.3 + typescript: ~4.8.4 languageName: unknown linkType: soft @@ -7929,7 +7929,7 @@ __metadata: "@storybook/preview-web": 7.0.0-alpha.47 "@storybook/vue": 7.0.0-alpha.47 magic-string: ^0.26.1 - typescript: ~4.6.3 + typescript: ~4.8.4 vite: ^3.1.3 vue: ^2.7.10 vue-docgen-api: ^4.40.0 @@ -7949,7 +7949,7 @@ __metadata: "@types/node": ^16.0.0 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.6.3 + typescript: ~4.8.4 vue: ^2.6.12 vue-loader: ^15.7.0 vue-template-compiler: ^2.6.14 @@ -7978,7 +7978,7 @@ __metadata: "@types/node": ^16.0.0 "@vitejs/plugin-vue": ^3.0.0 magic-string: ^0.26.1 - typescript: ~4.6.3 + typescript: ~4.8.4 vite: ^3.1.3 vue-docgen-api: ^4.40.0 languageName: unknown @@ -7996,7 +7996,7 @@ __metadata: "@vue/compiler-sfc": 3.0.0 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.6.3 + typescript: ~4.8.4 vue: 3.0.0 peerDependencies: "@babel/core": "*" @@ -8021,7 +8021,7 @@ __metadata: react-dom: 16.14.0 ts-dedent: ^2.0.0 type-fest: 2.19.0 - typescript: ~4.6.3 + typescript: ~4.8.4 vue: ^3.2.41 vue-tsc: ^1.0.8 peerDependencies: @@ -8049,7 +8049,7 @@ __metadata: react-dom: 16.14.0 ts-dedent: ^2.0.0 type-fest: 2.19.0 - typescript: ~4.6.3 + typescript: ~4.8.4 vue: 2.6.14 vue-tsc: ^1.0.9 peerDependencies: @@ -8078,7 +8078,7 @@ __metadata: "@storybook/web-components": 7.0.0-alpha.47 "@types/node": ^16.0.0 magic-string: ^0.26.1 - typescript: ~4.6.3 + typescript: ~4.8.4 vite: ^3.1.0 languageName: unknown linkType: soft @@ -8096,7 +8096,7 @@ __metadata: lit-html: 2.0.2 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: lit-html: ^1.4.1 || ^2.0.0 languageName: unknown @@ -8120,7 +8120,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-dedent: ^2.0.0 - typescript: ~4.6.3 + typescript: ~4.8.4 peerDependencies: lit-html: ^1.4.1 || ^2.0.0 languageName: unknown @@ -31502,7 +31502,7 @@ __metadata: resolution: "sb@workspace:lib/cli-sb" dependencies: "@storybook/cli": 7.0.0-alpha.47 - typescript: ~4.6.3 + typescript: ~4.8.4 bin: sb: ./index.js languageName: unknown @@ -32627,7 +32627,7 @@ __metadata: resolution: "storybook@workspace:lib/cli-storybook" dependencies: "@storybook/cli": 7.0.0-alpha.47 - typescript: ~4.6.3 + typescript: ~4.8.4 bin: sb: ./index.js storybook: ./index.js @@ -34386,23 +34386,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~4.6.3": - version: 4.6.4 - resolution: "typescript@npm:4.6.4" +"typescript@npm:~4.8.4": + version: 4.8.4 + resolution: "typescript@npm:4.8.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 92e2c0328485a4f7bd7435f5b105f03addff32f867e241dc3be8c372ed801a138c732d9a55697696d2f82a80dd6ad4bddff1ad6b0d1884bf4a24b92e71094c44 + checksum: 663bf455b21ac024e719bb8c6a07bcaaa027a9943abfb58a694b59789e7d08578badb5556170267ad480e31786b8b4c8ab3c9c0e597d3b8df39af800e43c6ed5 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~4.6.3#~builtin": - version: 4.6.4 - resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin::version=4.6.4&hash=701156" +"typescript@patch:typescript@npm%3A~4.8.4#~builtin": + version: 4.8.4 + resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin::version=4.8.4&hash=701156" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 0e3fa814d454942a689daf4c00f82328d323e7ecd4077e3265d45375e64642611631f4c882a71be87774468ba03793e9b8ff4bccfac3018194a9e36d8f72c251 + checksum: bfba046abb25c2f417899ad724e41034433094fb25bbbec401291bf7f6f11f5b7de0e4b2a5bcb6c8af4e62615482a3a0b1160763a3f478896a06f9851186f4fb languageName: node linkType: hard From d41699aa1d156f5789393359ba0bc4e49e304728 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 19:34:59 -0400 Subject: [PATCH 009/258] Use Node16 moduleResolution --- code/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/tsconfig.json b/code/tsconfig.json index 1e99fa09f78e..ae3ba92d4f7a 100644 --- a/code/tsconfig.json +++ b/code/tsconfig.json @@ -6,7 +6,7 @@ "noImplicitAny": true, "forceConsistentCasingInFileNames": true, "jsx": "react", - "moduleResolution": "Node", + "moduleResolution": "Node16", "target": "ES2020", "module": "CommonJS", "skipLibCheck": false, From 9264795cc6f198365e9d2c819d8dc968b1b19014 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 19:43:00 -0400 Subject: [PATCH 010/258] Add typescript eslint resolver --- code/.eslintrc.js | 8 +++++ code/package.json | 1 + code/yarn.lock | 76 ++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 84 insertions(+), 1 deletion(-) diff --git a/code/.eslintrc.js b/code/.eslintrc.js index a22b9fd2de0e..a3c685d8009e 100644 --- a/code/.eslintrc.js +++ b/code/.eslintrc.js @@ -14,6 +14,14 @@ module.exports = { 'react-hooks/rules-of-hooks': 'off', 'jest/no-done-callback': 'off', }, + settings: { + 'import/resolver': { + typescript: { + alwaysTryTypes: true, + project: './tsconfig.json', + }, + }, + }, overrides: [ { // this package depends on a lot of peerDependencies we don't want to specify, because npm would install them diff --git a/code/package.json b/code/package.json index a64b6d66e8b8..0a20fb9c5301 100644 --- a/code/package.json +++ b/code/package.json @@ -281,6 +281,7 @@ "esbuild-loader": "^2.19.0", "esbuild-plugin-alias": "^0.2.1", "eslint": "^8.26.0", + "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.26.0", "eslint-plugin-react": "^7.31.10", "eslint-plugin-storybook": "^0.6.6", diff --git a/code/yarn.lock b/code/yarn.lock index 57de4a2df1c4..f25ae65bb979 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5201,6 +5201,20 @@ __metadata: languageName: node linkType: hard +"@pkgr/utils@npm:^2.3.1": + version: 2.3.1 + resolution: "@pkgr/utils@npm:2.3.1" + dependencies: + cross-spawn: ^7.0.3 + is-glob: ^4.0.3 + open: ^8.4.0 + picocolors: ^1.0.0 + tiny-glob: ^0.2.9 + tslib: ^2.4.0 + checksum: 50c2480c3580c0f75b9325271deeb4f4cb24f6a29f1ebc5a7de0c6991380e23625fd554ecdbc7d7e93ad6dab92532a254f7490433cf2b8f1b18d75c9e01636ea + languageName: node + linkType: hard + "@playwright/test@npm:1.27.0": version: 1.27.0 resolution: "@playwright/test@npm:1.27.0" @@ -7535,6 +7549,7 @@ __metadata: esbuild-loader: ^2.19.0 esbuild-plugin-alias: ^0.2.1 eslint: ^8.26.0 + eslint-import-resolver-typescript: ^3.5.2 eslint-plugin-import: ^2.26.0 eslint-plugin-react: ^7.31.10 eslint-plugin-storybook: ^0.6.6 @@ -16396,6 +16411,24 @@ __metadata: languageName: node linkType: hard +"eslint-import-resolver-typescript@npm:^3.5.2": + version: 3.5.2 + resolution: "eslint-import-resolver-typescript@npm:3.5.2" + dependencies: + debug: ^4.3.4 + enhanced-resolve: ^5.10.0 + get-tsconfig: ^4.2.0 + globby: ^13.1.2 + is-core-module: ^2.10.0 + is-glob: ^4.0.3 + synckit: ^0.8.4 + peerDependencies: + eslint: "*" + eslint-plugin-import: "*" + checksum: 7947cccc80d439132cb75ec7a74bf710fef72b3b0d6d804246265836f143e86520608a5a3c3313aec0e21a8b0ca0eb99101236895ea89b71559d0cf9c9ac377a + languageName: node + linkType: hard + "eslint-module-utils@npm:^2.7.3": version: 2.7.4 resolution: "eslint-module-utils@npm:2.7.4" @@ -18490,6 +18523,13 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.2.0": + version: 4.2.0 + resolution: "get-tsconfig@npm:4.2.0" + checksum: a60b2665d57894f844116cd0947722d107f2f639ef62d01a488da70f3d91707eeb3843a5c2eb49e21b6a46a68853d42450a63c251cb1659576454febb03bd307 + languageName: node + linkType: hard + "get-value@npm:^2.0.3, get-value@npm:^2.0.6": version: 2.0.6 resolution: "get-value@npm:2.0.6" @@ -18806,6 +18846,13 @@ __metadata: languageName: node linkType: hard +"globalyzer@npm:0.1.0": + version: 0.1.0 + resolution: "globalyzer@npm:0.1.0" + checksum: e16e47a5835cbe8a021423d4c7fcd9f5f85815b4190a7f50c1fdb95fc559d72e4fb30be96f106c66a99413f36d72da0f8323d19d27f60a8feec9d936139ec5a8 + languageName: node + linkType: hard + "globby@npm:10.0.0": version: 10.0.0 resolution: "globby@npm:10.0.0" @@ -18893,6 +18940,13 @@ __metadata: languageName: node linkType: hard +"globrex@npm:^0.1.2": + version: 0.1.2 + resolution: "globrex@npm:0.1.2" + checksum: a54c029520cf58bda1d8884f72bd49b4cd74e977883268d931fd83bcbd1a9eb96d57c7dbd4ad80148fb9247467ebfb9b215630b2ed7563b2a8de02e1ff7f89d1 + languageName: node + linkType: hard + "glur@npm:^1.1.2": version: 1.1.2 resolution: "glur@npm:1.1.2" @@ -20412,7 +20466,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1, is-core-module@npm:^2.9.0": +"is-core-module@npm:^2.10.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1, is-core-module@npm:^2.9.0": version: 2.11.0 resolution: "is-core-module@npm:2.11.0" dependencies: @@ -33324,6 +33378,16 @@ __metadata: languageName: node linkType: hard +"synckit@npm:^0.8.4": + version: 0.8.4 + resolution: "synckit@npm:0.8.4" + dependencies: + "@pkgr/utils": ^2.3.1 + tslib: ^2.4.0 + checksum: cd2444b7879b010b220721874527dbf3231a05cd42a47b24260db9c9427e9c3d3e481bd41175112434267dec3402166cfde417c4ae254937b5cc3b0cd994b992 + languageName: node + linkType: hard + "syntax-error@npm:^1.1.6": version: 1.4.0 resolution: "syntax-error@npm:1.4.0" @@ -33646,6 +33710,16 @@ __metadata: languageName: node linkType: hard +"tiny-glob@npm:^0.2.9": + version: 0.2.9 + resolution: "tiny-glob@npm:0.2.9" + dependencies: + globalyzer: 0.1.0 + globrex: ^0.1.2 + checksum: cbe072f0d213a1395d30aa94845a051d4af18fe8ffb79c8e99ac1787cd25df69083f17791a53997cb65f469f48950cb61426ccc0683cc9df170ac2430e883702 + languageName: node + linkType: hard + "tiny-inflate@npm:^1.0.0, tiny-inflate@npm:^1.0.2": version: 1.0.3 resolution: "tiny-inflate@npm:1.0.3" From edb90d6b7c7fe665d06227340b613d55df51dd31 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 19:43:21 -0400 Subject: [PATCH 011/258] Remove /dist from exports & imports --- code/addons/actions/package.json | 2 +- code/addons/backgrounds/package.json | 2 +- code/addons/essentials/src/preview/actions.ts | 2 +- code/addons/essentials/src/preview/backgrounds.ts | 2 +- code/addons/essentials/src/preview/highlight.ts | 2 +- code/addons/essentials/src/preview/measure.ts | 2 +- code/addons/essentials/src/preview/outline.ts | 2 +- code/addons/highlight/package.json | 2 +- code/addons/interactions/package.json | 2 +- code/addons/links/package.json | 2 +- code/addons/measure/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index 6445406fd3bf..4747cf4819bb 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -37,7 +37,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./dist/preview": { + "./preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index 95c1d4a3a7fc..02025a379227 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -36,7 +36,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./dist/preview": { + "./preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/addons/essentials/src/preview/actions.ts b/code/addons/essentials/src/preview/actions.ts index 572ae20e01d2..0d7d5c6c33ba 100644 --- a/code/addons/essentials/src/preview/actions.ts +++ b/code/addons/essentials/src/preview/actions.ts @@ -1 +1 @@ -export * from '@storybook/addon-actions/dist/preview'; +export * from '@storybook/addon-actions/preview'; diff --git a/code/addons/essentials/src/preview/backgrounds.ts b/code/addons/essentials/src/preview/backgrounds.ts index d5ff97a51ace..2d01bf61bb6a 100644 --- a/code/addons/essentials/src/preview/backgrounds.ts +++ b/code/addons/essentials/src/preview/backgrounds.ts @@ -1 +1 @@ -export * from '@storybook/addon-backgrounds/dist/preview'; +export * from '@storybook/addon-backgrounds/preview'; diff --git a/code/addons/essentials/src/preview/highlight.ts b/code/addons/essentials/src/preview/highlight.ts index 9d8609a61a04..c57b34aafd63 100644 --- a/code/addons/essentials/src/preview/highlight.ts +++ b/code/addons/essentials/src/preview/highlight.ts @@ -1 +1 @@ -export * from '@storybook/addon-highlight/dist/preview'; +export * from '@storybook/addon-highlight/preview'; diff --git a/code/addons/essentials/src/preview/measure.ts b/code/addons/essentials/src/preview/measure.ts index 6c094594d63a..c34063ac4ca4 100644 --- a/code/addons/essentials/src/preview/measure.ts +++ b/code/addons/essentials/src/preview/measure.ts @@ -1 +1 @@ -export * from '@storybook/addon-measure/dist/preview'; +export * from '@storybook/addon-measure/preview'; diff --git a/code/addons/essentials/src/preview/outline.ts b/code/addons/essentials/src/preview/outline.ts index d0c577287550..16cc2faa0397 100644 --- a/code/addons/essentials/src/preview/outline.ts +++ b/code/addons/essentials/src/preview/outline.ts @@ -1 +1 @@ -export * from '@storybook/addon-outline/dist/preview'; +export * from '@storybook/addon-outline/preview'; diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index 6248c271c381..40563352d49c 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -29,7 +29,7 @@ "import": "./dist/index.mjs", "types": "./dist/index.d.ts" }, - "./dist/preview": { + "./preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index 487ea58da846..7bbc59c59f60 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -32,7 +32,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./dist/preview": { + "./preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/addons/links/package.json b/code/addons/links/package.json index ce9e4b586d8c..f0a55ac47d8d 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -32,7 +32,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./dist/preview": { + "./preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index 74b144c2c8eb..11ba0b09cf55 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -35,7 +35,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./dist/preview": { + "./preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" From 8c62083bed4cca662204e9b443f59cf7dac7c4c1 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 19:49:22 -0400 Subject: [PATCH 012/258] Update typescript in /scripts too --- scripts/package.json | 4 ++-- scripts/tsconfig.json | 4 ++-- scripts/yarn.lock | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/package.json b/scripts/package.json index e7190c1c757e..8ccd71553de5 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -33,7 +33,7 @@ "esbuild": "^0.14.48", "eslint": "^8.26.0", "serialize-javascript": "^3.1.0", - "typescript": "~4.6.3" + "typescript": "~4.8.4" }, "dependencies": { "@babel/cli": "^7.17.6", @@ -171,7 +171,7 @@ "ts-jest": "^26.4.4", "ts-node": "^10.4.0", "tsup": "^6.2.2", - "typescript": "~4.6.3", + "typescript": "~4.8.4", "util": "^0.12.4", "wait-on": "^5.2.1", "window-size": "^1.1.1", diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index 19b4e68d4278..e979022de811 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -5,7 +5,7 @@ "incremental": false, "noImplicitAny": true, "jsx": "react", - "moduleResolution": "Node", + "moduleResolution": "Node16", "target": "ES2020", "module": "CommonJS", "skipLibCheck": false, @@ -57,4 +57,4 @@ ] } } -} \ No newline at end of file +} diff --git a/scripts/yarn.lock b/scripts/yarn.lock index fb167307ddc9..9c4d3f2c51fc 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -3457,7 +3457,7 @@ __metadata: ts-loader: ^9.2.8 ts-node: ^10.4.0 tsup: ^6.2.2 - typescript: ~4.6.3 + typescript: ~4.8.4 util: ^0.12.4 verdaccio: ^4.10.0 verdaccio-auth-memory: ^9.7.2 @@ -18809,23 +18809,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~4.6.3": - version: 4.6.4 - resolution: "typescript@npm:4.6.4" +"typescript@npm:~4.8.4": + version: 4.8.4 + resolution: "typescript@npm:4.8.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 92e2c0328485a4f7bd7435f5b105f03addff32f867e241dc3be8c372ed801a138c732d9a55697696d2f82a80dd6ad4bddff1ad6b0d1884bf4a24b92e71094c44 + checksum: 663bf455b21ac024e719bb8c6a07bcaaa027a9943abfb58a694b59789e7d08578badb5556170267ad480e31786b8b4c8ab3c9c0e597d3b8df39af800e43c6ed5 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~4.6.3#~builtin": - version: 4.6.4 - resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin::version=4.6.4&hash=701156" +"typescript@patch:typescript@npm%3A~4.8.4#~builtin": + version: 4.8.4 + resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin::version=4.8.4&hash=701156" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 0e3fa814d454942a689daf4c00f82328d323e7ecd4077e3265d45375e64642611631f4c882a71be87774468ba03793e9b8ff4bccfac3018194a9e36d8f72c251 + checksum: bfba046abb25c2f417899ad724e41034433094fb25bbbec401291bf7f6f11f5b7de0e4b2a5bcb6c8af4e62615482a3a0b1160763a3f478896a06f9851186f4fb languageName: node linkType: hard From 4560a33187c1b5ae1319234dae1817b78608c3d0 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 22:27:08 -0400 Subject: [PATCH 013/258] Limit Node16 to only where it's needed, for now Turns out it's kind of a bit PITA --- code/addons/essentials/tsconfig.json | 1 + code/addons/outline/package.json | 2 +- code/tsconfig.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/addons/essentials/tsconfig.json b/code/addons/essentials/tsconfig.json index 25de4fbd3e60..c237ae1fba73 100644 --- a/code/addons/essentials/tsconfig.json +++ b/code/addons/essentials/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "moduleResolution": "Node16", "strict": true }, "include": ["src/**/*"], diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index 4ab2c9cfbb9a..f725bddebe55 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -38,7 +38,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./dist/preview": { + "./preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" diff --git a/code/tsconfig.json b/code/tsconfig.json index ae3ba92d4f7a..e980f28c0f47 100644 --- a/code/tsconfig.json +++ b/code/tsconfig.json @@ -6,7 +6,7 @@ "noImplicitAny": true, "forceConsistentCasingInFileNames": true, "jsx": "react", - "moduleResolution": "Node16", + "moduleResolution": "node", "target": "ES2020", "module": "CommonJS", "skipLibCheck": false, From 0add1a99b434309ce0ffda2daf998812caae254a Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 22:41:03 -0400 Subject: [PATCH 014/258] Fix TS 4.8 errors --- code/addons/viewport/src/shortcuts.ts | 11 ++++++++--- code/lib/store/src/args.ts | 6 ++++-- code/renderers/react/src/testing-api.ts | 2 +- scripts/prepare/bundle.ts | 8 ++++---- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/code/addons/viewport/src/shortcuts.ts b/code/addons/viewport/src/shortcuts.ts index 779726eb9e23..6e9b7302b1c1 100644 --- a/code/addons/viewport/src/shortcuts.ts +++ b/code/addons/viewport/src/shortcuts.ts @@ -1,6 +1,11 @@ import type { API } from '@storybook/api'; import { ADDON_ID } from './constants'; +type State = { + selected: string; + isRotated: boolean; +}; + const getCurrentViewportIndex = (viewportsKeys: string[], current: string): number => viewportsKeys.indexOf(current); @@ -24,7 +29,7 @@ export const registerShortcuts = async (api: API, setState: any, viewportsKeys: defaultShortcut: ['shift', 'V'], actionName: 'previous', action: () => { - const { selected, isRotated } = api.getAddonState(ADDON_ID); + const { selected, isRotated } = api.getAddonState(ADDON_ID); setState({ selected: getPreviousViewport(viewportsKeys, selected), isRotated, @@ -37,7 +42,7 @@ export const registerShortcuts = async (api: API, setState: any, viewportsKeys: defaultShortcut: ['V'], actionName: 'next', action: () => { - const { selected, isRotated } = api.getAddonState(ADDON_ID); + const { selected, isRotated } = api.getAddonState(ADDON_ID); setState({ selected: getNextViewport(viewportsKeys, selected), isRotated, @@ -50,7 +55,7 @@ export const registerShortcuts = async (api: API, setState: any, viewportsKeys: defaultShortcut: ['alt', 'V'], actionName: 'reset', action: () => { - const { isRotated } = api.getAddonState(ADDON_ID); + const { isRotated } = api.getAddonState(ADDON_ID); setState({ selected: 'reset', isRotated, diff --git a/code/lib/store/src/args.ts b/code/lib/store/src/args.ts index 842c46c84f24..a119be4bfe80 100644 --- a/code/lib/store/src/args.ts +++ b/code/lib/store/src/args.ts @@ -152,7 +152,7 @@ export const deepDiff = (value: any, update: any): any => { }; export const NO_TARGET_NAME = ''; -export function groupArgsByTarget({ +export function groupArgsByTarget({ args, argTypes, }: StoryContext) { @@ -166,6 +166,8 @@ export function groupArgsByTarget({ return groupedArgs; } -export function noTargetArgs(context: StoryContext) { +export function noTargetArgs( + context: StoryContext +) { return groupArgsByTarget(context)[NO_TARGET_NAME]; } diff --git a/code/renderers/react/src/testing-api.ts b/code/renderers/react/src/testing-api.ts index c1213f837eb7..3b148c15e084 100644 --- a/code/renderers/react/src/testing-api.ts +++ b/code/renderers/react/src/testing-api.ts @@ -80,7 +80,7 @@ const defaultProjectAnnotations: ProjectAnnotations = { * @param [projectAnnotations] - e.g. (import * as projectAnnotations from '../.storybook/preview') this can be applied automatically if you use `setProjectAnnotations` in your setup files. * @param [exportsName] - in case your story does not contain a name and you want it to have a name. */ -export function composeStory( +export function composeStory( story: Store_ComposedStory, componentAnnotations: Meta, projectAnnotations?: ProjectAnnotations, diff --git a/scripts/prepare/bundle.ts b/scripts/prepare/bundle.ts index 9689079b4c66..323b5fced4ff 100755 --- a/scripts/prepare/bundle.ts +++ b/scripts/prepare/bundle.ts @@ -37,12 +37,12 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { entries.map(async (file: string) => { console.log(`skipping generating types for ${file}`); const { name: entryName, dir } = path.parse(file); - + const pathName = join(process.cwd(), dir.replace('./src', 'dist'), `${entryName}.d.ts`); const srcName = join(process.cwd(), file); - + const rel = relative(dirname(pathName), dirname(srcName)); - + await fs.ensureFile(pathName); await fs.writeFile( pathName, @@ -54,7 +54,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { }) ); } - + const tsConfigPath = join(cwd, 'tsconfig.json'); const tsConfigExists = await fs.pathExists(tsConfigPath); await Promise.all([ From 3d8d1a167bf658a761edbde639132dcbf10f6627 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 23:44:18 -0400 Subject: [PATCH 015/258] Restore moduleResolution in scripts --- code/tsconfig.json | 2 +- scripts/tsconfig.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/tsconfig.json b/code/tsconfig.json index e980f28c0f47..1e99fa09f78e 100644 --- a/code/tsconfig.json +++ b/code/tsconfig.json @@ -6,7 +6,7 @@ "noImplicitAny": true, "forceConsistentCasingInFileNames": true, "jsx": "react", - "moduleResolution": "node", + "moduleResolution": "Node", "target": "ES2020", "module": "CommonJS", "skipLibCheck": false, diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index e979022de811..1b54a8f32716 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -5,7 +5,7 @@ "incremental": false, "noImplicitAny": true, "jsx": "react", - "moduleResolution": "Node16", + "moduleResolution": "Node", "target": "ES2020", "module": "CommonJS", "skipLibCheck": false, From 00bb65cf452dfc9f3380182545e5d09e2c82118b Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 2 Nov 2022 23:45:05 -0400 Subject: [PATCH 016/258] downgrade eslint-import-resolver-typescript https://github.com/import-js/eslint-import-resolver-typescript/issues/176 --- code/package.json | 2 +- code/yarn.lock | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/code/package.json b/code/package.json index 0a20fb9c5301..040861c27658 100644 --- a/code/package.json +++ b/code/package.json @@ -281,7 +281,7 @@ "esbuild-loader": "^2.19.0", "esbuild-plugin-alias": "^0.2.1", "eslint": "^8.26.0", - "eslint-import-resolver-typescript": "^3.5.2", + "eslint-import-resolver-typescript": "3.1.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-react": "^7.31.10", "eslint-plugin-storybook": "^0.6.6", diff --git a/code/yarn.lock b/code/yarn.lock index f25ae65bb979..1dba10973437 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5201,7 +5201,7 @@ __metadata: languageName: node linkType: hard -"@pkgr/utils@npm:^2.3.1": +"@pkgr/utils@npm:^2.3.0": version: 2.3.1 resolution: "@pkgr/utils@npm:2.3.1" dependencies: @@ -7549,7 +7549,7 @@ __metadata: esbuild-loader: ^2.19.0 esbuild-plugin-alias: ^0.2.1 eslint: ^8.26.0 - eslint-import-resolver-typescript: ^3.5.2 + eslint-import-resolver-typescript: 3.1.0 eslint-plugin-import: ^2.26.0 eslint-plugin-react: ^7.31.10 eslint-plugin-storybook: ^0.6.6 @@ -15583,7 +15583,7 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.10.0, enhanced-resolve@npm:^5.7.0": +"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.10.0, enhanced-resolve@npm:^5.7.0, enhanced-resolve@npm:^5.9.3": version: 5.10.0 resolution: "enhanced-resolve@npm:5.10.0" dependencies: @@ -16411,21 +16411,21 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-typescript@npm:^3.5.2": - version: 3.5.2 - resolution: "eslint-import-resolver-typescript@npm:3.5.2" +"eslint-import-resolver-typescript@npm:3.1.0": + version: 3.1.0 + resolution: "eslint-import-resolver-typescript@npm:3.1.0" dependencies: debug: ^4.3.4 - enhanced-resolve: ^5.10.0 - get-tsconfig: ^4.2.0 + enhanced-resolve: ^5.9.3 + get-tsconfig: ^4.0.6 globby: ^13.1.2 - is-core-module: ^2.10.0 + is-core-module: ^2.9.0 is-glob: ^4.0.3 - synckit: ^0.8.4 + synckit: ^0.7.1 peerDependencies: eslint: "*" eslint-plugin-import: "*" - checksum: 7947cccc80d439132cb75ec7a74bf710fef72b3b0d6d804246265836f143e86520608a5a3c3313aec0e21a8b0ca0eb99101236895ea89b71559d0cf9c9ac377a + checksum: dbd541e19624af4705aecf2f5437199b91635d38cd670dd4452ff5222cdf21ed6d2baeabbe34a62544c9f078c1b935b159fd86be574f436e4c5032f49bebce15 languageName: node linkType: hard @@ -18523,7 +18523,7 @@ __metadata: languageName: node linkType: hard -"get-tsconfig@npm:^4.2.0": +"get-tsconfig@npm:^4.0.6": version: 4.2.0 resolution: "get-tsconfig@npm:4.2.0" checksum: a60b2665d57894f844116cd0947722d107f2f639ef62d01a488da70f3d91707eeb3843a5c2eb49e21b6a46a68853d42450a63c251cb1659576454febb03bd307 @@ -20466,7 +20466,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.10.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1, is-core-module@npm:^2.9.0": +"is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1, is-core-module@npm:^2.9.0": version: 2.11.0 resolution: "is-core-module@npm:2.11.0" dependencies: @@ -33378,13 +33378,13 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.8.4": - version: 0.8.4 - resolution: "synckit@npm:0.8.4" +"synckit@npm:^0.7.1": + version: 0.7.3 + resolution: "synckit@npm:0.7.3" dependencies: - "@pkgr/utils": ^2.3.1 + "@pkgr/utils": ^2.3.0 tslib: ^2.4.0 - checksum: cd2444b7879b010b220721874527dbf3231a05cd42a47b24260db9c9427e9c3d3e481bd41175112434267dec3402166cfde417c4ae254937b5cc3b0cd994b992 + checksum: 572daa56f743c6b433dcee2ad12eba1b0329ddb98f6a3fd47ce85269a5315cdaa095ee62e3b02d77094897cbffc92832993790e709501c23dab7ac867b63e315 languageName: node linkType: hard From 1f6b189d66484c8e1ae7fb4f700937cf0c06f7c2 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 08:04:27 -0400 Subject: [PATCH 017/258] Remove typescript import resolver for now --- code/.eslintrc.js | 8 -- code/addons/essentials/src/preview/actions.ts | 3 + .../essentials/src/preview/backgrounds.ts | 3 + .../essentials/src/preview/highlight.ts | 3 + code/addons/essentials/src/preview/measure.ts | 3 + code/addons/essentials/src/preview/outline.ts | 3 + code/package.json | 1 - code/yarn.lock | 76 +------------------ 8 files changed, 16 insertions(+), 84 deletions(-) diff --git a/code/.eslintrc.js b/code/.eslintrc.js index a3c685d8009e..a22b9fd2de0e 100644 --- a/code/.eslintrc.js +++ b/code/.eslintrc.js @@ -14,14 +14,6 @@ module.exports = { 'react-hooks/rules-of-hooks': 'off', 'jest/no-done-callback': 'off', }, - settings: { - 'import/resolver': { - typescript: { - alwaysTryTypes: true, - project: './tsconfig.json', - }, - }, - }, overrides: [ { // this package depends on a lot of peerDependencies we don't want to specify, because npm would install them diff --git a/code/addons/essentials/src/preview/actions.ts b/code/addons/essentials/src/preview/actions.ts index 0d7d5c6c33ba..86c6d5f2e656 100644 --- a/code/addons/essentials/src/preview/actions.ts +++ b/code/addons/essentials/src/preview/actions.ts @@ -1 +1,4 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + export * from '@storybook/addon-actions/preview'; diff --git a/code/addons/essentials/src/preview/backgrounds.ts b/code/addons/essentials/src/preview/backgrounds.ts index 2d01bf61bb6a..5e56121e4a03 100644 --- a/code/addons/essentials/src/preview/backgrounds.ts +++ b/code/addons/essentials/src/preview/backgrounds.ts @@ -1 +1,4 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + export * from '@storybook/addon-backgrounds/preview'; diff --git a/code/addons/essentials/src/preview/highlight.ts b/code/addons/essentials/src/preview/highlight.ts index c57b34aafd63..ffcf62555af2 100644 --- a/code/addons/essentials/src/preview/highlight.ts +++ b/code/addons/essentials/src/preview/highlight.ts @@ -1 +1,4 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + export * from '@storybook/addon-highlight/preview'; diff --git a/code/addons/essentials/src/preview/measure.ts b/code/addons/essentials/src/preview/measure.ts index c34063ac4ca4..f18769ff001a 100644 --- a/code/addons/essentials/src/preview/measure.ts +++ b/code/addons/essentials/src/preview/measure.ts @@ -1 +1,4 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + export * from '@storybook/addon-measure/preview'; diff --git a/code/addons/essentials/src/preview/outline.ts b/code/addons/essentials/src/preview/outline.ts index 16cc2faa0397..1cc44b9689a8 100644 --- a/code/addons/essentials/src/preview/outline.ts +++ b/code/addons/essentials/src/preview/outline.ts @@ -1 +1,4 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + export * from '@storybook/addon-outline/preview'; diff --git a/code/package.json b/code/package.json index 040861c27658..a64b6d66e8b8 100644 --- a/code/package.json +++ b/code/package.json @@ -281,7 +281,6 @@ "esbuild-loader": "^2.19.0", "esbuild-plugin-alias": "^0.2.1", "eslint": "^8.26.0", - "eslint-import-resolver-typescript": "3.1.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-react": "^7.31.10", "eslint-plugin-storybook": "^0.6.6", diff --git a/code/yarn.lock b/code/yarn.lock index 1dba10973437..57de4a2df1c4 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5201,20 +5201,6 @@ __metadata: languageName: node linkType: hard -"@pkgr/utils@npm:^2.3.0": - version: 2.3.1 - resolution: "@pkgr/utils@npm:2.3.1" - dependencies: - cross-spawn: ^7.0.3 - is-glob: ^4.0.3 - open: ^8.4.0 - picocolors: ^1.0.0 - tiny-glob: ^0.2.9 - tslib: ^2.4.0 - checksum: 50c2480c3580c0f75b9325271deeb4f4cb24f6a29f1ebc5a7de0c6991380e23625fd554ecdbc7d7e93ad6dab92532a254f7490433cf2b8f1b18d75c9e01636ea - languageName: node - linkType: hard - "@playwright/test@npm:1.27.0": version: 1.27.0 resolution: "@playwright/test@npm:1.27.0" @@ -7549,7 +7535,6 @@ __metadata: esbuild-loader: ^2.19.0 esbuild-plugin-alias: ^0.2.1 eslint: ^8.26.0 - eslint-import-resolver-typescript: 3.1.0 eslint-plugin-import: ^2.26.0 eslint-plugin-react: ^7.31.10 eslint-plugin-storybook: ^0.6.6 @@ -15583,7 +15568,7 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.10.0, enhanced-resolve@npm:^5.7.0, enhanced-resolve@npm:^5.9.3": +"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.10.0, enhanced-resolve@npm:^5.7.0": version: 5.10.0 resolution: "enhanced-resolve@npm:5.10.0" dependencies: @@ -16411,24 +16396,6 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-typescript@npm:3.1.0": - version: 3.1.0 - resolution: "eslint-import-resolver-typescript@npm:3.1.0" - dependencies: - debug: ^4.3.4 - enhanced-resolve: ^5.9.3 - get-tsconfig: ^4.0.6 - globby: ^13.1.2 - is-core-module: ^2.9.0 - is-glob: ^4.0.3 - synckit: ^0.7.1 - peerDependencies: - eslint: "*" - eslint-plugin-import: "*" - checksum: dbd541e19624af4705aecf2f5437199b91635d38cd670dd4452ff5222cdf21ed6d2baeabbe34a62544c9f078c1b935b159fd86be574f436e4c5032f49bebce15 - languageName: node - linkType: hard - "eslint-module-utils@npm:^2.7.3": version: 2.7.4 resolution: "eslint-module-utils@npm:2.7.4" @@ -18523,13 +18490,6 @@ __metadata: languageName: node linkType: hard -"get-tsconfig@npm:^4.0.6": - version: 4.2.0 - resolution: "get-tsconfig@npm:4.2.0" - checksum: a60b2665d57894f844116cd0947722d107f2f639ef62d01a488da70f3d91707eeb3843a5c2eb49e21b6a46a68853d42450a63c251cb1659576454febb03bd307 - languageName: node - linkType: hard - "get-value@npm:^2.0.3, get-value@npm:^2.0.6": version: 2.0.6 resolution: "get-value@npm:2.0.6" @@ -18846,13 +18806,6 @@ __metadata: languageName: node linkType: hard -"globalyzer@npm:0.1.0": - version: 0.1.0 - resolution: "globalyzer@npm:0.1.0" - checksum: e16e47a5835cbe8a021423d4c7fcd9f5f85815b4190a7f50c1fdb95fc559d72e4fb30be96f106c66a99413f36d72da0f8323d19d27f60a8feec9d936139ec5a8 - languageName: node - linkType: hard - "globby@npm:10.0.0": version: 10.0.0 resolution: "globby@npm:10.0.0" @@ -18940,13 +18893,6 @@ __metadata: languageName: node linkType: hard -"globrex@npm:^0.1.2": - version: 0.1.2 - resolution: "globrex@npm:0.1.2" - checksum: a54c029520cf58bda1d8884f72bd49b4cd74e977883268d931fd83bcbd1a9eb96d57c7dbd4ad80148fb9247467ebfb9b215630b2ed7563b2a8de02e1ff7f89d1 - languageName: node - linkType: hard - "glur@npm:^1.1.2": version: 1.1.2 resolution: "glur@npm:1.1.2" @@ -33378,16 +33324,6 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.7.1": - version: 0.7.3 - resolution: "synckit@npm:0.7.3" - dependencies: - "@pkgr/utils": ^2.3.0 - tslib: ^2.4.0 - checksum: 572daa56f743c6b433dcee2ad12eba1b0329ddb98f6a3fd47ce85269a5315cdaa095ee62e3b02d77094897cbffc92832993790e709501c23dab7ac867b63e315 - languageName: node - linkType: hard - "syntax-error@npm:^1.1.6": version: 1.4.0 resolution: "syntax-error@npm:1.4.0" @@ -33710,16 +33646,6 @@ __metadata: languageName: node linkType: hard -"tiny-glob@npm:^0.2.9": - version: 0.2.9 - resolution: "tiny-glob@npm:0.2.9" - dependencies: - globalyzer: 0.1.0 - globrex: ^0.1.2 - checksum: cbe072f0d213a1395d30aa94845a051d4af18fe8ffb79c8e99ac1787cd25df69083f17791a53997cb65f469f48950cb61426ccc0683cc9df170ac2430e883702 - languageName: node - linkType: hard - "tiny-inflate@npm:^1.0.0, tiny-inflate@npm:^1.0.2": version: 1.0.3 resolution: "tiny-inflate@npm:1.0.3" From af941fd3650894ae0b97ba840f4ce17339549164 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 16:09:47 -0400 Subject: [PATCH 018/258] Add typesVersions to addons --- code/addons/actions/package.json | 13 +++++++++++++ code/addons/backgrounds/package.json | 13 +++++++++++++ code/addons/controls/package.json | 10 ++++++++++ code/addons/highlight/package.json | 10 ++++++++++ code/addons/interactions/package.json | 13 +++++++++++++ code/addons/jest/package.json | 10 ++++++++++ code/addons/links/package.json | 13 +++++++++++++ code/addons/measure/package.json | 13 +++++++++++++ code/addons/outline/package.json | 13 +++++++++++++ code/addons/toolbars/package.json | 10 ++++++++++ code/addons/viewport/package.json | 13 +++++++++++++ 11 files changed, 131 insertions(+) diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index 4747cf4819bb..5f0e7443b510 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -52,6 +52,19 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index 02025a379227..63c4e5507888 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -51,6 +51,19 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", diff --git a/code/addons/controls/package.json b/code/addons/controls/package.json index 18adadb1e421..c72515bc30b6 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/package.json @@ -46,6 +46,16 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index 40563352d49c..1d7351379bbc 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -39,6 +39,16 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index 7bbc59c59f60..e3cc74d88ca4 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -47,6 +47,19 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index 35e793b4b2c1..d3e72d44c314 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -48,6 +48,16 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", diff --git a/code/addons/links/package.json b/code/addons/links/package.json index f0a55ac47d8d..cdfe4a9dc8db 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -52,6 +52,19 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index 11ba0b09cf55..9aa5dfa6cc9b 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -50,6 +50,19 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index f725bddebe55..c5615db8fead 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -53,6 +53,19 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index e7ac0470e51f..6086de91975e 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -46,6 +46,16 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json index 59053482b366..69afdb38074d 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -48,6 +48,19 @@ "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, "files": [ "dist/**/*", "README.md", From aaa4a210e08687cd81a9b29a84ee3d932bd69d55 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 16:11:59 -0400 Subject: [PATCH 019/258] Re-export all addons from addon-essentials --- code/addons/essentials/package.json | 118 ++++++++++++------ code/addons/essentials/src/actions/manager.ts | 5 + .../actions.ts => actions/preview.ts} | 0 .../essentials/src/backgrounds/manager.ts | 5 + .../backgrounds.ts => backgrounds/preview.ts} | 0 .../addons/essentials/src/controls/manager.ts | 5 + code/addons/essentials/src/docs/preset.ts | 1 + .../src/{preview/docs.ts => docs/preview.ts} | 0 .../highlight.ts => highlight/preview.ts} | 0 code/addons/essentials/src/measure/manager.ts | 5 + .../measure.ts => measure/preview.ts} | 0 code/addons/essentials/src/outline/manager.ts | 5 + .../outline.ts => outline/preview.ts} | 0 .../addons/essentials/src/toolbars/manager.ts | 5 + code/addons/essentials/src/typings.d.ts | 1 + .../addons/essentials/src/viewport/manager.ts | 5 + 16 files changed, 120 insertions(+), 35 deletions(-) create mode 100644 code/addons/essentials/src/actions/manager.ts rename code/addons/essentials/src/{preview/actions.ts => actions/preview.ts} (100%) create mode 100644 code/addons/essentials/src/backgrounds/manager.ts rename code/addons/essentials/src/{preview/backgrounds.ts => backgrounds/preview.ts} (100%) create mode 100644 code/addons/essentials/src/controls/manager.ts create mode 100644 code/addons/essentials/src/docs/preset.ts rename code/addons/essentials/src/{preview/docs.ts => docs/preview.ts} (100%) rename code/addons/essentials/src/{preview/highlight.ts => highlight/preview.ts} (100%) create mode 100644 code/addons/essentials/src/measure/manager.ts rename code/addons/essentials/src/{preview/measure.ts => measure/preview.ts} (100%) create mode 100644 code/addons/essentials/src/outline/manager.ts rename code/addons/essentials/src/{preview/outline.ts => outline/preview.ts} (100%) create mode 100644 code/addons/essentials/src/toolbars/manager.ts create mode 100644 code/addons/essentials/src/viewport/manager.ts diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 9c55001b2441..72b59087e903 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -27,35 +27,75 @@ "import": "./dist/index.mjs", "types": "./dist/index.d.ts" }, - "./preview/actions": { - "require": "./dist/preview/actions.js", - "import": "./dist/preview/actions.mjs", - "types": "./dist/preview/actions.d.ts" - }, - "./preview/backgrounds": { - "require": "./dist/preview/backgrounds.js", - "import": "./dist/preview/backgrounds.mjs", - "types": "./dist/preview/backgrounds.d.ts" - }, - "./preview/docs": { - "require": "./dist/preview/docs.js", - "import": "./dist/preview/docs.mjs", - "types": "./dist/preview/docs.d.ts" - }, - "./preview/highlight": { - "require": "./dist/preview/highlight.js", - "import": "./dist/preview/highlight.mjs", - "types": "./dist/preview/highlight.d.ts" - }, - "./preview/measure": { - "require": "./dist/preview/measure.js", - "import": "./dist/preview/measure.mjs", - "types": "./dist/preview/measure.d.ts" - }, - "./preview/outline": { - "require": "./dist/preview/outline.js", - "import": "./dist/preview/outline.mjs", - "types": "./dist/preview/outline.d.ts" + "./actions/preview": { + "require": "./dist/actions/preview.js", + "import": "./dist/actions/preview.mjs", + "types": "./dist/actions/preview.d.ts" + }, + "./actions/manager": { + "require": "./dist/actions/manager.js", + "import": "./dist/actions/manager.mjs", + "types": "./dist/actions/manager.d.ts" + }, + "./backgrounds/preview": { + "require": "./dist/backgrounds/preview.js", + "import": "./dist/backgrounds/preview.mjs", + "types": "./dist/backgrounds/preview.d.ts" + }, + "./backgrounds/manager": { + "require": "./dist/backgrounds/manager.js", + "import": "./dist/backgrounds/manager.mjs", + "types": "./dist/backgrounds/manager.d.ts" + }, + "./controls/manager": { + "require": "./dist/controls/manager.js", + "import": "./dist/controls/manager.mjs", + "types": "./dist/controls/manager.d.ts" + }, + "./docs/preview": { + "require": "./dist/docs/preview.js", + "import": "./dist/docs/preview.mjs", + "types": "./dist/docs/preview.d.ts" + }, + "./docs/preset": { + "require": "./dist/docs/preset.js", + "import": "./dist/docs/preset.mjs", + "types": "./dist/docs/preset.d.ts" + }, + "./highlight/preview": { + "require": "./dist/highlight/preview.js", + "import": "./dist/highlight/preview.mjs", + "types": "./dist/highlight/preview.d.ts" + }, + "./measure/preview": { + "require": "./dist/measure/preview.js", + "import": "./dist/measure/preview.mjs", + "types": "./dist/measure/preview.d.ts" + }, + "./measure/manager": { + "require": "./dist/measure/manager.js", + "import": "./dist/measure/manager.mjs", + "types": "./dist/measure/manager.d.ts" + }, + "./outline/preview": { + "require": "./dist/outline/preview.js", + "import": "./dist/outline/preview.mjs", + "types": "./dist/outline/preview.d.ts" + }, + "./outline/manager": { + "require": "./dist/outline/manager.js", + "import": "./dist/outline/manager.mjs", + "types": "./dist/outline/manager.d.ts" + }, + "./toolbars/manager": { + "require": "./dist/toolbars/manager.js", + "import": "./dist/toolbars/manager.mjs", + "types": "./dist/toolbars/manager.d.ts" + }, + "./viewport/manager": { + "require": "./dist/viewport/manager.js", + "import": "./dist/viewport/manager.mjs", + "types": "./dist/viewport/manager.d.ts" }, "./package.json": "./package.json" }, @@ -139,12 +179,20 @@ "bundler": { "entries": [ "./src/index.ts", - "./src/preview/actions.ts", - "./src/preview/backgrounds.ts", - "./src/preview/docs.ts", - "./src/preview/highlight.ts", - "./src/preview/measure.ts", - "./src/preview/outline.ts" + "./src/actions/preview.ts", + "./src/actions/manager.ts", + "./src/backgrounds/preview.ts", + "./src/backgrounds/manager.ts", + "./src/controls/manager.ts", + "./src/docs/preview.ts", + "./src/docs/preset.ts", + "./src/highlight/preview.ts", + "./src/measure/preview.ts", + "./src/measure/manager.ts", + "./src/outline/preview.ts", + "./src/outline/manager.ts", + "./src/toolbars/manager.ts", + "./src/viewport/manager.ts" ], "platform": "node" }, diff --git a/code/addons/essentials/src/actions/manager.ts b/code/addons/essentials/src/actions/manager.ts new file mode 100644 index 000000000000..14c3a48dbc10 --- /dev/null +++ b/code/addons/essentials/src/actions/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-actions/manager'; diff --git a/code/addons/essentials/src/preview/actions.ts b/code/addons/essentials/src/actions/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/actions.ts rename to code/addons/essentials/src/actions/preview.ts diff --git a/code/addons/essentials/src/backgrounds/manager.ts b/code/addons/essentials/src/backgrounds/manager.ts new file mode 100644 index 000000000000..4fad52e6b1a5 --- /dev/null +++ b/code/addons/essentials/src/backgrounds/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-backgrounds/manager'; diff --git a/code/addons/essentials/src/preview/backgrounds.ts b/code/addons/essentials/src/backgrounds/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/backgrounds.ts rename to code/addons/essentials/src/backgrounds/preview.ts diff --git a/code/addons/essentials/src/controls/manager.ts b/code/addons/essentials/src/controls/manager.ts new file mode 100644 index 000000000000..3adb5f13f6c7 --- /dev/null +++ b/code/addons/essentials/src/controls/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-controls/manager'; diff --git a/code/addons/essentials/src/docs/preset.ts b/code/addons/essentials/src/docs/preset.ts new file mode 100644 index 000000000000..f97114783e13 --- /dev/null +++ b/code/addons/essentials/src/docs/preset.ts @@ -0,0 +1 @@ +export * from '@storybook/addon-docs/preset'; diff --git a/code/addons/essentials/src/preview/docs.ts b/code/addons/essentials/src/docs/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/docs.ts rename to code/addons/essentials/src/docs/preview.ts diff --git a/code/addons/essentials/src/preview/highlight.ts b/code/addons/essentials/src/highlight/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/highlight.ts rename to code/addons/essentials/src/highlight/preview.ts diff --git a/code/addons/essentials/src/measure/manager.ts b/code/addons/essentials/src/measure/manager.ts new file mode 100644 index 000000000000..096a85e7ecb3 --- /dev/null +++ b/code/addons/essentials/src/measure/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-measure/manager'; diff --git a/code/addons/essentials/src/preview/measure.ts b/code/addons/essentials/src/measure/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/measure.ts rename to code/addons/essentials/src/measure/preview.ts diff --git a/code/addons/essentials/src/outline/manager.ts b/code/addons/essentials/src/outline/manager.ts new file mode 100644 index 000000000000..4048af2a78e5 --- /dev/null +++ b/code/addons/essentials/src/outline/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-outline/manager'; diff --git a/code/addons/essentials/src/preview/outline.ts b/code/addons/essentials/src/outline/preview.ts similarity index 100% rename from code/addons/essentials/src/preview/outline.ts rename to code/addons/essentials/src/outline/preview.ts diff --git a/code/addons/essentials/src/toolbars/manager.ts b/code/addons/essentials/src/toolbars/manager.ts new file mode 100644 index 000000000000..4b3a25c62a3b --- /dev/null +++ b/code/addons/essentials/src/toolbars/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-toolbars/manager'; diff --git a/code/addons/essentials/src/typings.d.ts b/code/addons/essentials/src/typings.d.ts index 419fc10cd268..818a79e77c49 100644 --- a/code/addons/essentials/src/typings.d.ts +++ b/code/addons/essentials/src/typings.d.ts @@ -2,3 +2,4 @@ declare module 'fs'; // TODO: Remove this once addon-docs is generated with tsup declare module '@storybook/addon-docs/preview'; +declare module '@storybook/addon-docs/preset'; diff --git a/code/addons/essentials/src/viewport/manager.ts b/code/addons/essentials/src/viewport/manager.ts new file mode 100644 index 000000000000..5446adf98a84 --- /dev/null +++ b/code/addons/essentials/src/viewport/manager.ts @@ -0,0 +1,5 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-viewport/manager'; From 756ea18f769dbf992d03c22eb471724f3a5d2f01 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 16:13:25 -0400 Subject: [PATCH 020/258] Keep addons relative, but use addon-essentials re-exports --- code/addons/essentials/src/index.ts | 51 +++++++------------ .../src/codegen-modern-iframe-script.ts | 22 +++----- .../src/utils/transform-abs-path.ts | 11 ---- code/lib/core-common/src/presets.ts | 24 ++------- 4 files changed, 30 insertions(+), 78 deletions(-) delete mode 100644 code/lib/builder-vite/src/utils/transform-abs-path.ts diff --git a/code/addons/essentials/src/index.ts b/code/addons/essentials/src/index.ts index 861fd91162da..743abb709ab7 100644 --- a/code/addons/essentials/src/index.ts +++ b/code/addons/essentials/src/index.ts @@ -24,7 +24,8 @@ const requireMain = (configDir: string) => { }; export function addons(options: PresetOptions) { - const checkInstalled = (addon: string, main: any) => { + const checkInstalled = (addonName: string, main: any) => { + const addon = `@storybook/addon-${addonName}`; const existingAddon = main.addons?.find((entry: string | { name: string }) => { const name = typeof entry === 'string' ? entry : entry.name; return name?.startsWith(addon); @@ -36,35 +37,21 @@ export function addons(options: PresetOptions) { }; const main = requireMain(options.configDir); - return ( - [ - 'docs', - 'controls', - 'actions', - 'backgrounds', - 'viewport', - 'toolbars', - 'measure', - 'outline', - 'highlight', - ] - .filter((key) => (options as any)[key] !== false) - .map((key) => `@storybook/addon-${key}`) - .filter((addon) => !checkInstalled(addon, main)) - // Use `require.resolve` to ensure Yarn PnP compatibility - // Files of various addons should be resolved in the context of `addon-essentials` as they are listed as deps here - // and not in `@storybook/core` nor in SB user projects. If `@storybook/core` make the require itself Yarn 2 will - // throw an error saying that the package to require must be added as a dependency. Doing `require.resolve` will - // allow `@storybook/core` to work with absolute path directly, no more require of dep no more issue. - // File to load can be `preset.js`, `register.js`, or the package entry point, so we need to check all these cases - // as it's done in `lib/core/src/server/presets.js`. - .map((addon) => { - try { - return dirname(require.resolve(join(addon, 'package.json'))); - // eslint-disable-next-line no-empty - } catch (err) {} - - return require.resolve(addon); - }) - ); + return [ + 'docs', + 'controls', + 'actions', + 'backgrounds', + 'viewport', + 'toolbars', + 'measure', + 'outline', + 'highlight', + ] + .filter((key) => (options as any)[key] !== false) + .filter((addon) => !checkInstalled(addon, main)) + .map((addon) => { + // We point to the re-export from addon-essentials to support yarn pnp and pnpm. + return `@storybook/addon-essentials/${addon}`; + }); } diff --git a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts index 2341905ef9be..7c9120e6c49a 100644 --- a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts +++ b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts @@ -1,7 +1,6 @@ -import { isAbsolute, resolve } from 'path'; +import { resolve } from 'path'; import { loadPreviewOrConfigFile, getFrameworkName } from '@storybook/core-common'; import { virtualStoriesFile, virtualAddonSetupFile } from './virtual-file-names'; -import { transformAbsPath } from './utils/transform-abs-path'; import type { ExtendedOptions } from './types'; export async function generateModernIframeScriptCode(options: ExtendedOptions) { @@ -10,23 +9,14 @@ export async function generateModernIframeScriptCode(options: ExtendedOptions) { const previewOrConfigFile = loadPreviewOrConfigFile({ configDir }); const previewAnnotations = await presets.apply('previewAnnotations', [], options); - const resolvedPreviewAnnotations = [...previewAnnotations].map((entry) => - isAbsolute(entry) ? entry : resolve(entry) - ); - const relativePreviewAnnotations = [...resolvedPreviewAnnotations, previewOrConfigFile] + const relativePreviewAnnotations = [...previewAnnotations, previewOrConfigFile] .filter(Boolean) .map((configEntry) => { - // Convert absolute path into a "bare" import (See https://github.com/vitejs/vite/issues/5494) - const relative = transformAbsPath(configEntry as string); - // If this is a sub-addon of essentials, rewrite the import to point to essentials re-export - const match = - /@storybook\/addon-(actions|backgrounds|docs|highlight|measure|outline)\/preview/.exec( - relative - ); - if (match) { - return `@storybook/addon-essentials/preview/${match[1]}`; + // resolve relative paths into absolute paths, but don't resolve "bare" imports + if (configEntry?.startsWith('./') || configEntry?.startsWith('../')) { + return resolve(configEntry); } - return relative; + return configEntry; }); // eslint-disable-next-line @typescript-eslint/no-shadow diff --git a/code/lib/builder-vite/src/utils/transform-abs-path.ts b/code/lib/builder-vite/src/utils/transform-abs-path.ts deleted file mode 100644 index bd8c89f8fbc3..000000000000 --- a/code/lib/builder-vite/src/utils/transform-abs-path.ts +++ /dev/null @@ -1,11 +0,0 @@ -import path from 'path'; -import { normalizePath } from 'vite'; - -// We need to convert from an absolute path, to a traditional node module import path, -// so that vite can correctly pre-bundle/optimize -export function transformAbsPath(absPath: string) { - const splits = absPath.split(`node_modules${path.sep}`); - // Return everything after the final "node_modules/" - const module = normalizePath(splits[splits.length - 1]); - return module; -} diff --git a/code/lib/core-common/src/presets.ts b/code/lib/core-common/src/presets.ts index 2ab9fd3bdc1e..b901be00fcc9 100644 --- a/code/lib/core-common/src/presets.ts +++ b/code/lib/core-common/src/presets.ts @@ -82,22 +82,8 @@ export const resolveAddonName = ( } } - const absolutePackageJson = resolved && resolve(`${name}/package.json`); - - // We want to absolutize the package name part to a path on disk - // (i.e. '/Users/foo/.../node_modules/@addons/foo') as otherwise - // we may not be able to import the package in certain module systems (eg. pnpm, yarn pnp) - const absoluteDir = absolutePackageJson && dirname(absolutePackageJson); - - // If the package has an export (e.g. `/preview`), absolutize it, eg. to - // /Users/foo/.../node_modules/@addons/foo/preview - // NOTE: this looks like the path of an absolute file, but it DOES NOT exist. - // - However it is importable by webpack. - // - Vite needs to strip off the absolute part to import it though - // (vite cannot import absolute files: https://github.com/vitejs/vite/issues/5494 - // this also means vite suffers issues with pnpm etc) - const absolutizeExport = (exportName: string) => { - if (resolve(`${name}${exportName}`)) return `${absoluteDir}${exportName}`; + const checkExists = (exportName: string) => { + if (resolve(`${name}${exportName}`)) return `${name}${exportName}`; return undefined; }; @@ -106,9 +92,9 @@ export const resolveAddonName = ( // We don't want to resolve an import path (e.g. '@addons/foo/preview') to the file on disk, // because you are not allowed to import arbitrary files in packages in Vite. // Instead we check if the export exists and "absolutize" it. - const managerFile = absolutizeExport(`/manager`); - const registerFile = absolutizeExport(`/register`) || absolutizeExport(`/register-panel`); - const previewFile = absolutizeExport(`/preview`); + const managerFile = checkExists(`/manager`); + const registerFile = checkExists(`/register`) || checkExists(`/register-panel`); + const previewFile = checkExists(`/preview`); // Presets are imported by node, so therefore fine to be a path on disk (at this stage anyway) const presetFile = resolve(`${path}/preset`); From 0e8b0ba16fb0b62aa0f127a1926519a96354a0b7 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 16:16:33 -0400 Subject: [PATCH 021/258] Remove node16 moduleResolution --- code/addons/essentials/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/code/addons/essentials/tsconfig.json b/code/addons/essentials/tsconfig.json index c237ae1fba73..25de4fbd3e60 100644 --- a/code/addons/essentials/tsconfig.json +++ b/code/addons/essentials/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.json", "compilerOptions": { - "moduleResolution": "Node16", "strict": true }, "include": ["src/**/*"], From afaf141041ba2fced5a7a4e6c594389d26508634 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 16:18:45 -0400 Subject: [PATCH 022/258] Adjust builder-vite ssv6 --- code/lib/builder-vite/src/codegen-iframe-script.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/code/lib/builder-vite/src/codegen-iframe-script.ts b/code/lib/builder-vite/src/codegen-iframe-script.ts index 90b1315d06eb..04e29c1a07f7 100644 --- a/code/lib/builder-vite/src/codegen-iframe-script.ts +++ b/code/lib/builder-vite/src/codegen-iframe-script.ts @@ -1,9 +1,16 @@ import { isAbsolute, resolve } from 'path'; import { getRendererName } from '@storybook/core-common'; import { virtualPreviewFile, virtualStoriesFile } from './virtual-file-names'; -import { transformAbsPath } from './utils/transform-abs-path'; import type { ExtendedOptions } from './types'; +function resolveRelativePath(path: string) { + // resolve relative paths into absolute paths, but don't resolve "bare" imports + if (path?.startsWith('./') || path?.startsWith('../')) { + return resolve(path); + } + return path; +} + export async function generateIframeScriptCode(options: ExtendedOptions) { const { presets } = options; const rendererName = await getRendererName(options); @@ -15,7 +22,7 @@ export async function generateIframeScriptCode(options: ExtendedOptions) { const absoluteFilesToImport = (files: string[], name: string) => files - .map((el, i) => `import ${name ? `* as ${name}_${i} from ` : ''}'${transformAbsPath(el)}'`) + .map((el, i) => `import ${name ? `* as ${name}_${i} from ` : ''}'${resolveRelativePath(el)}'`) .join('\n'); const importArray = (name: string, length: number) => From 2db1bc7e3ce3b8bcda97968d244fb155cbaa623e Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 16:26:55 -0400 Subject: [PATCH 023/258] Remove unused imports --- code/addons/essentials/src/index.ts | 2 +- code/lib/core-common/src/presets.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/code/addons/essentials/src/index.ts b/code/addons/essentials/src/index.ts index 743abb709ab7..96fd171146bb 100644 --- a/code/addons/essentials/src/index.ts +++ b/code/addons/essentials/src/index.ts @@ -1,4 +1,4 @@ -import path, { dirname, join } from 'path'; +import path from 'path'; import { logger } from '@storybook/node-logger'; import { serverRequire } from '@storybook/core-common'; diff --git a/code/lib/core-common/src/presets.ts b/code/lib/core-common/src/presets.ts index b901be00fcc9..8aadd7ad2a6b 100644 --- a/code/lib/core-common/src/presets.ts +++ b/code/lib/core-common/src/presets.ts @@ -1,6 +1,5 @@ import { dedent } from 'ts-dedent'; import { logger } from '@storybook/node-logger'; -import { dirname } from 'path'; import type { BuilderOptions, CLIOptions, From e7dc1c3340c91fe986d223efc0c14ecdb5937032 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 3 Nov 2022 16:33:13 -0400 Subject: [PATCH 024/258] Remove unused eslint disable directives --- code/addons/essentials/src/actions/manager.ts | 3 --- code/addons/essentials/src/backgrounds/manager.ts | 3 --- code/addons/essentials/src/controls/manager.ts | 3 --- code/addons/essentials/src/measure/manager.ts | 3 --- code/addons/essentials/src/outline/manager.ts | 3 --- code/addons/essentials/src/toolbars/manager.ts | 3 --- code/addons/essentials/src/viewport/manager.ts | 3 --- 7 files changed, 21 deletions(-) diff --git a/code/addons/essentials/src/actions/manager.ts b/code/addons/essentials/src/actions/manager.ts index 14c3a48dbc10..7e125b743169 100644 --- a/code/addons/essentials/src/actions/manager.ts +++ b/code/addons/essentials/src/actions/manager.ts @@ -1,5 +1,2 @@ -/* eslint-disable import/export */ -// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered - // @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 export * from '@storybook/addon-actions/manager'; diff --git a/code/addons/essentials/src/backgrounds/manager.ts b/code/addons/essentials/src/backgrounds/manager.ts index 4fad52e6b1a5..bc51f1b22b4e 100644 --- a/code/addons/essentials/src/backgrounds/manager.ts +++ b/code/addons/essentials/src/backgrounds/manager.ts @@ -1,5 +1,2 @@ -/* eslint-disable import/export */ -// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered - // @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 export * from '@storybook/addon-backgrounds/manager'; diff --git a/code/addons/essentials/src/controls/manager.ts b/code/addons/essentials/src/controls/manager.ts index 3adb5f13f6c7..49e403523565 100644 --- a/code/addons/essentials/src/controls/manager.ts +++ b/code/addons/essentials/src/controls/manager.ts @@ -1,5 +1,2 @@ -/* eslint-disable import/export */ -// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered - // @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 export * from '@storybook/addon-controls/manager'; diff --git a/code/addons/essentials/src/measure/manager.ts b/code/addons/essentials/src/measure/manager.ts index 096a85e7ecb3..cf95d95a76da 100644 --- a/code/addons/essentials/src/measure/manager.ts +++ b/code/addons/essentials/src/measure/manager.ts @@ -1,5 +1,2 @@ -/* eslint-disable import/export */ -// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered - // @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 export * from '@storybook/addon-measure/manager'; diff --git a/code/addons/essentials/src/outline/manager.ts b/code/addons/essentials/src/outline/manager.ts index 4048af2a78e5..07a0a1e4879a 100644 --- a/code/addons/essentials/src/outline/manager.ts +++ b/code/addons/essentials/src/outline/manager.ts @@ -1,5 +1,2 @@ -/* eslint-disable import/export */ -// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered - // @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 export * from '@storybook/addon-outline/manager'; diff --git a/code/addons/essentials/src/toolbars/manager.ts b/code/addons/essentials/src/toolbars/manager.ts index 4b3a25c62a3b..8c4868b1e254 100644 --- a/code/addons/essentials/src/toolbars/manager.ts +++ b/code/addons/essentials/src/toolbars/manager.ts @@ -1,5 +1,2 @@ -/* eslint-disable import/export */ -// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered - // @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 export * from '@storybook/addon-toolbars/manager'; diff --git a/code/addons/essentials/src/viewport/manager.ts b/code/addons/essentials/src/viewport/manager.ts index 5446adf98a84..7c052f303800 100644 --- a/code/addons/essentials/src/viewport/manager.ts +++ b/code/addons/essentials/src/viewport/manager.ts @@ -1,5 +1,2 @@ -/* eslint-disable import/export */ -// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered - // @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 export * from '@storybook/addon-viewport/manager'; From fae5a42b75513b43a26123d85566532626ebca53 Mon Sep 17 00:00:00 2001 From: Dominic Nguyen Date: Thu, 3 Nov 2022 16:58:48 -0400 Subject: [PATCH 025/258] Update README logo for dark mode Thanks for [the tip](https://twitter.com/_egoistlily/status/1588201619388190720) @egoist --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fd4b1a777064..7462b6c9fcb7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,12 @@

- Storybook + + + Storybook + + +

Build bulletproof UI components faster

From 2c7c4980e3eacd9b556cace227ed4d6ef81b4198 Mon Sep 17 00:00:00 2001 From: jonniebigodes Date: Thu, 3 Nov 2022 21:35:58 +0000 Subject: [PATCH 026/258] First pass at the code docs --- docs/contribute/code.md | 68 ++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/docs/contribute/code.md b/docs/contribute/code.md index 6e20ba581e7c..8920565fefb6 100644 --- a/docs/contribute/code.md +++ b/docs/contribute/code.md @@ -19,38 +19,39 @@ git clone https://github.com/your-username/storybook.git ## Run your first sandbox -Storybook development happens in a set of *sandboxes* which are templated Storybook environments corresponding to different user setups. Within each sandbox, we inject a set of generalized stories that allow us to test core features and addons in all such environments. +Storybook development happens in a set of _sandboxes_ which are templated Storybook environments corresponding to different user setups. Within each sandbox, we inject a set of generalized stories that allow us to test core features and addons in all such environments. -To run an sandbox locally, you can use the `start` command: +To run a sandbox locally, you can use the `start` command: ```shell yarn start ``` -That will install the required prerequisites, build the code, create and link an example for a Vite/React setup, and start the storybook server. +It will install the required prerequisites, build the code, create and link a starter example based on a Vite React setup and finally start the Storybook server. -If all goes well you should see the sandbox running. +If all goes well, you should see the sandbox running. ![Storybook Sandbox Running](./storybook-sandbox.png) ## Running a different sandbox template -The `start` command runs a Vite/React template, but there are many others you can use if you want to work on a different renderer or framework. - -To get started, run the `yarn task` command; it will prompt you with a series of questions to figure out what you are trying to do. Once you've made a selection it will provide a set of options that you can use to run the same command again. +By default, the `start` command is configured to initialize a Vite-based React template. If you're planning on working on a different renderer instead, you can do so as well. Start by running the `task` command as follows: ```shell yarn task ``` +When prompted, answer the questions as accurately as possible to allow Storybook to determine your goals. After answering these questions, you should see the entire command with the options you've selected should you require to re-run it. +
-💡 The yarn task command takes a couple of shortcuts for development that could catch you out if you change branches: you may need to rerun the install and compile tasks. You can do that by running the command with the --start-from=install flag. -
+💡 The `yarn task` command takes a few development shortcuts that can catch you off guard when switching branches and may require you to re-run both the `install` and `compile` tasks. You can speed up the process by running the command with the `start-from=install` flag. + + ## Running tests -Once you've run your [first sandbox](#run-your-first-sandbox), you should have a fully functional version of Storybook built on your local machine. Before making any code changes, it's helpful to verify that everything is working as it should. More specifically, the test suite. +After successfully running your [first sandbox](#run-your-first-sandbox), you should have a fully functional Storybook version built on your local machine. Before jumping onto any code changes, verifying everything is working is essential—specifically, the test suite. Run the following command to execute the tests: @@ -60,25 +61,25 @@ yarn test ## Start developing -Now that you've [verified your setup](#running-tests), it's time to jump into code. The simplest way to do this is to run one of the sandboxes in one terminal window and the interactive build process in a separate terminal. +Now that you've [verified your setup](#running-tests), it's time to jump into code. The simplest way is to run one of the sandboxes in one terminal window and the interactive build process in a separate terminal. -Assuming you're still running the Vite React sandbox from `yarn start`, open a new terminal and navigate to the `code/` dir of the Storybook monorepo. Then, create a new branch with the following command: +Assuming you're still running the Vite-based React sandbox initialized after running the `yarn start` command, open a new terminal window and navigate to the `code` directory of the Storybook monorepo. Then, create a new branch for your contribution by running the following command: ```shell git checkout -b my-first-storybook-contribution ``` -Run the build process with: +Lastly, run the build process with the following: ```shell yarn build ``` -When asked if you want to start the build in `watch` mode, answer **yes** to develop in interactive mode. Afterward, choose which packages you want to build. For example, if you're going to work on a feature for `@storybook/addon-docs`, you might want to select `@storybook/addon-docs` and `@storybook/components`. +When prompted to start the build process in `watch` mode, answer **yes** to develop in interactive mode. Afterward, choose which packages you want to build. For example, if you're going to work on a feature for `@storybook/addon-docs`, you might want to select both `@storybook/addon-docs` and `@storybook/components`.
-💡 Build's `watch` mode is great for interactive development. However, for performance reasons it only transpiles your code and doesn't execute the TypeScript compiler. If something isn't working as expected, try running `build` WITHOUT watch mode: it will re-generate TypeScript types and also perform type checking for you. +💡 Build's `watch` mode is great for interactive development. However, for performance reasons, it only transpiles your code and doesn't execute the TypeScript compiler. If something isn't working as expected, try running the `build` command WITHOUT enabling watch mode: it will re-generate TypeScript types and perform automatic type checking for you.
@@ -96,15 +97,15 @@ When you're done coding, add documentation and tests as appropriate. That simpli ### Add stories -Adding a story or set of stories to our suite of generic stories helps you test your work. +Adding a story or set of generic stories to our suite helps you test your work. -If you're modifying part of Storybook's core, or one of the essential addons, there's probably an existing set of stories in that addon's `template/stories` folder that documents how the feature is supposed to work. Add your stories there. +Assuming you're working on one of the [Essential addons](../essentials/introduction.md), there's a chance that a complete set of stories already exists. Check the addon's `template/stories` directory that documents how it's supposed to work and add your stories there. -If you're modifying something related to a specific renderer (e.g. React, Vue, etc.), the renderer will have its own template stories. +If you're modifying something related to a specific renderer (e.g., React, Vue, etc.), it will also have a similar `template/stories` directory in which you'll need to add your stories. ### Add tests -Unit tests ensure that Storybook doesn't break accidentally. If your code can regress in non-obvious ways, include unit tests with your PR. Use the following naming convention: +Unit tests ensure that Storybook doesn't break accidentally. If your code can regress in non-obvious ways, include unit tests with your pull request. Use the following naming convention: ``` +-- parentFolder @@ -114,9 +115,9 @@ Unit tests ensure that Storybook doesn't break accidentally. If your code can re ### End-to-end tests (e2e) -Storybook's monorepo is set up to rely on end-to-end testing with [Playwright](https://playwright.dev) during CI. To help with testing, we encourage running this test suite before submitting your contribution. +Storybook's monorepo is set up to rely on end-to-end testing with [Playwright](https://playwright.dev) during CI. To help with testing, we encourage running this test suite before submitting your contribution. -To run a e2e test against a sandbox, you can use the `e2e-tests` task: +To run an e2e test against a sandbox, you can use the `e2e-tests` task: ```shell yarn task --task e2e-tests --template=react-vite/default-ts --start-from=auto @@ -124,23 +125,25 @@ yarn task --task e2e-tests --template=react-vite/default-ts --start-from=auto ## Submit a pull request -Before submitting your contribution, run the test suite one last time with: +Before submitting your contribution, run the test suite one last time with the following: ```shell yarn test ```
-💡 Storybook uses jest as part of the testing suite, if you notice that the snapshot tests fail you can re-run and update them with yarn test -u. + +💡 Storybook relies on [Jest](https://jestjs.io/) as part of it's testing suite. During the test run, if you spot that snapshot tests are failing, re-run the command with the `-u` flag to update them. +
-Doing this prevents last-minute bugs and is also a great way to get your contribution merged faster once you submit your pull request. Failing to do so will lead to one of the maintainers mark the pull request with the **Work in Progress** label until all tests pass. +Doing this prevents last-minute bugs and is a great way to merge your contribution faster once you submit your pull request. Failing to do so will lead to one of the maintainers mark the pull request with the **Work in Progress** label until all tests pass. ### Target `next` branch -Once the test suite finishes, it's time to commit, push and open a pull request against Storybook's `next` (default) branch. This branch is where all active development happens and is associated with the latest prerelease version (e.g., `6.3.0-alpha.25`). +Once the test suite finishes, it's time to commit, push and open a pull request against Storybook's `next` (default) branch. This branch is where all active development happens and is associated with the latest prerelease version (e.g., `7.0.0-alpha.47`). -If your contribution focuses on a bugfix and you want it featured in the next stable release, mention it in the pull request description. We'll try to patch it in if it appears to be non-disruptive and fixes a critical bug. +If your contribution focuses on a bugfix and you want it featured in the next stable release, mention it in the pull request description. We'll try to patch it if it appears non-disruptive and fixes a critical bug. #### Useful resources when working with forks @@ -156,12 +159,13 @@ yarn task --task e2e-tests --template=react-vite/default-ts --start-from=install ``` Typically it is a good idea to start from the `install` task to ensure your local code is completely up to date. If you reproduce the failure, you can try and make fixes, [compile them](#start-developing) with `build`, then rerun the task with `--start-from=auto`. - +
-

💡 The default instructions run the code "linked" which means built changes to Storybook library code will be reflected in the sandbox right away (the next time you run the task). However CI runs in "unlinked" mode, which in rare cases will behave differently.

+💡 The default instructions run the code in "linked" mode, meaning built changes to Storybook library code will be reflected in the sandbox immediately (the next time you run the task). However, CI runs in "unlinked" mode, which in rare cases, will behave differently.
+ +If you are having trouble reproducing, try rerunning the command with the `--no-link` flag. If you need to do that, you'll need to run it with `--start-from=compile` after each code change. -

If you are having trouble reproducing, try rerunning the command with the --no-link flag. If you need to do that, you'll need to run it with --start-from=compile after each code change.

## How to work with reproductions @@ -183,7 +187,9 @@ npx storybook@next link --local /path/to/local-repro-directory ```
-💡 The storybook link command relies on yarn 2 linking under the hood. It requires that the local repro is using yarn 2, which will be the case if you're using the [storybook repro command](./how-to-reproduce) per our contributing guidelines. If you are trying to link to a non-yarn 2 project, linking will fail. + +💡 The `storybook link` command relies on [Yarn 2 linking](https://yarnpkg.com/cli/link/) under the hood. It requires your local reproduction to be using [Yarn 2](https://yarnpkg.com/) as well, which is the case if you're already enabled it with the [`storybook repro`](./how-to-reproduce.md) command per our contribution guidelines. The process will fail if you're trying to link a non-Yarn 2 project. +
## Troubleshooting @@ -192,6 +198,6 @@ npx storybook@next link --local /path/to/local-repro-directory yarn build --all --watch watches everything but is resource-intensive -It's troublesome to know which packages you're going to change ahead of time, and watching all of them can be highly demanding, even on modern machines. If you're working on a powerful enough machine, you can use `yarn build --all --watch` instead of `yarn build`. +It's troublesome to know which packages you'll change ahead of time, and watching them can be highly demanding, even on modern machines. If you're working on a powerful enough machine, you can use `yarn build --all --watch` instead of `yarn build`. From f6402934a192976332985da0353c12f0f8e91ee6 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 4 Nov 2022 11:31:06 -0400 Subject: [PATCH 027/258] Revert "Upgrade to TS 4.8" This reverts commit 9fe7fdc20b65b33bba0914b1446c404910555bf3. --- code/addons/a11y/package.json | 2 +- code/addons/actions/package.json | 2 +- code/addons/backgrounds/package.json | 2 +- code/addons/docs/package.json | 2 +- code/addons/essentials/package.json | 2 +- code/addons/highlight/package.json | 2 +- code/addons/interactions/package.json | 2 +- code/addons/jest/package.json | 2 +- code/addons/links/package.json | 2 +- code/addons/measure/package.json | 2 +- code/addons/outline/package.json | 2 +- code/addons/storysource/package.json | 2 +- code/addons/toolbars/package.json | 2 +- code/addons/viewport/package.json | 2 +- code/frameworks/angular/package.json | 2 +- code/frameworks/ember/package.json | 2 +- code/frameworks/html-webpack5/package.json | 2 +- code/frameworks/nextjs/package.json | 2 +- code/frameworks/preact-webpack5/package.json | 2 +- code/frameworks/react-vite/package.json | 2 +- code/frameworks/react-webpack5/package.json | 2 +- code/frameworks/server-webpack5/package.json | 2 +- code/frameworks/svelte-vite/package.json | 2 +- code/frameworks/svelte-webpack5/package.json | 2 +- code/frameworks/vue-vite/package.json | 2 +- code/frameworks/vue-webpack5/package.json | 2 +- code/frameworks/vue3-vite/package.json | 2 +- code/frameworks/vue3-webpack5/package.json | 2 +- .../web-components-vite/package.json | 2 +- .../web-components-webpack5/package.json | 2 +- code/lib/api/package.json | 2 +- code/lib/builder-manager/package.json | 2 +- code/lib/builder-vite/package.json | 2 +- code/lib/builder-webpack5/package.json | 2 +- code/lib/channel-postmessage/package.json | 2 +- code/lib/channel-websocket/package.json | 2 +- code/lib/channels/package.json | 2 +- code/lib/cli-sb/package.json | 2 +- code/lib/cli-storybook/package.json | 2 +- code/lib/cli/package.json | 2 +- code/lib/client-api/package.json | 2 +- code/lib/client-logger/package.json | 2 +- code/lib/codemod/package.json | 2 +- code/lib/core-client/package.json | 2 +- code/lib/core-common/package.json | 2 +- code/lib/core-events/package.json | 2 +- code/lib/core-server/package.json | 2 +- code/lib/core-webpack/package.json | 2 +- code/lib/csf-plugin/package.json | 2 +- code/lib/csf-tools/package.json | 2 +- code/lib/docs-tools/package.json | 2 +- code/lib/instrumenter/package.json | 2 +- code/lib/node-logger/package.json | 2 +- code/lib/postinstall/package.json | 2 +- code/lib/preview-web/package.json | 2 +- code/lib/router/package.json | 2 +- code/lib/source-loader/package.json | 2 +- code/lib/store/package.json | 2 +- code/lib/telemetry/package.json | 2 +- code/lib/theming/package.json | 2 +- code/lib/types/package.json | 2 +- code/package.json | 4 +- code/presets/html-webpack/package.json | 2 +- code/presets/preact-webpack/package.json | 2 +- code/presets/react-webpack/package.json | 2 +- code/presets/server-webpack/package.json | 2 +- code/presets/svelte-webpack/package.json | 2 +- code/presets/vue-webpack/package.json | 2 +- code/presets/vue3-webpack/package.json | 2 +- .../web-components-webpack/package.json | 2 +- code/renderers/html/package.json | 2 +- code/renderers/preact/package.json | 2 +- code/renderers/react/package.json | 2 +- code/renderers/server/package.json | 2 +- code/renderers/svelte/package.json | 2 +- code/renderers/vue/package.json | 2 +- code/renderers/vue3/package.json | 2 +- code/renderers/web-components/package.json | 2 +- code/ui/components/package.json | 2 +- code/ui/manager/package.json | 2 +- code/yarn.lock | 176 +++++++++--------- 81 files changed, 169 insertions(+), 169 deletions(-) diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index ec9815b2dc1c..64232fda8cd7 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -78,7 +78,7 @@ }, "devDependencies": { "@testing-library/react": "^11.2.2", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json index 5f0e7443b510..83aed7d84544 100644 --- a/code/addons/actions/package.json +++ b/code/addons/actions/package.json @@ -95,7 +95,7 @@ }, "devDependencies": { "@types/lodash": "^4.14.167", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json index 63c4e5507888..5383e776e9c7 100644 --- a/code/addons/backgrounds/package.json +++ b/code/addons/backgrounds/package.json @@ -87,7 +87,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index e8013d86b1a7..0bdef57c666c 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -77,7 +77,7 @@ }, "devDependencies": { "@babel/core": "^7.12.10", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 72b59087e903..b65e43d79d8c 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -130,7 +130,7 @@ "@babel/core": "^7.12.10", "@storybook/vue": "7.0.0-alpha.47", "@types/jest": "^26.0.16", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "^7.9.6" diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json index 1d7351379bbc..98f91c773b1a 100644 --- a/code/addons/highlight/package.json +++ b/code/addons/highlight/package.json @@ -66,7 +66,7 @@ }, "devDependencies": { "@types/webpack-env": "^1.16.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json index e3cc74d88ca4..3d56ed3fc524 100644 --- a/code/addons/interactions/package.json +++ b/code/addons/interactions/package.json @@ -91,7 +91,7 @@ "@storybook/testing-library": "0.0.14-next.0", "@types/node": "^16.0.0", "formik": "^2.2.9", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index d3e72d44c314..03aedf4be286 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -80,7 +80,7 @@ "upath": "^1.2.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/links/package.json b/code/addons/links/package.json index cdfe4a9dc8db..581f6e911515 100644 --- a/code/addons/links/package.json +++ b/code/addons/links/package.json @@ -87,7 +87,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json index 9aa5dfa6cc9b..d61406da8e6d 100644 --- a/code/addons/measure/package.json +++ b/code/addons/measure/package.json @@ -83,7 +83,7 @@ "global": "^4.4.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json index c5615db8fead..f60589c21776 100644 --- a/code/addons/outline/package.json +++ b/code/addons/outline/package.json @@ -87,7 +87,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/storysource/package.json b/code/addons/storysource/package.json index 969d9f0a9059..b99a34b22e47 100644 --- a/code/addons/storysource/package.json +++ b/code/addons/storysource/package.json @@ -67,7 +67,7 @@ "devDependencies": { "@types/react": "^16.14.23", "@types/react-syntax-highlighter": "11.0.5", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index 6086de91975e..7852d1bb6b81 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -74,7 +74,7 @@ "@storybook/theming": "7.0.0-alpha.47" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json index 69afdb38074d..9765f9ed5a26 100644 --- a/code/addons/viewport/package.json +++ b/code/addons/viewport/package.json @@ -83,7 +83,7 @@ "prop-types": "^15.7.2" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json index aa149e593658..31974b668643 100644 --- a/code/frameworks/angular/package.json +++ b/code/frameworks/angular/package.json @@ -85,7 +85,7 @@ "jest-specific-snapshot": "^5.0.0", "rimraf": "^3.0.2", "tmp": "^0.2.1", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "webpack": "5", "zone.js": "^0.11.0" }, diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json index 48470c4e207d..a3e7d9e249f8 100644 --- a/code/frameworks/ember/package.json +++ b/code/frameworks/ember/package.json @@ -45,7 +45,7 @@ }, "devDependencies": { "ember-source": "~3.28.1", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/frameworks/html-webpack5/package.json b/code/frameworks/html-webpack5/package.json index 387d1ca59deb..622fb2b4f92b 100644 --- a/code/frameworks/html-webpack5/package.json +++ b/code/frameworks/html-webpack5/package.json @@ -60,7 +60,7 @@ "react-dom": "16.14.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "*" diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index 78f36d636d61..88b421ada87d 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -84,7 +84,7 @@ "@storybook/addon-actions": "7.0.0-alpha.47", "@types/loader-utils": "^2.0.3", "next": "^12.2.4", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "webpack": "^5.65.0" }, "peerDependencies": { diff --git a/code/frameworks/preact-webpack5/package.json b/code/frameworks/preact-webpack5/package.json index a8138063e444..414219334b95 100644 --- a/code/frameworks/preact-webpack5/package.json +++ b/code/frameworks/preact-webpack5/package.json @@ -60,7 +60,7 @@ }, "devDependencies": { "preact": "^10.5.13", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json index 455a8ab7b48d..e275e8074cad 100644 --- a/code/frameworks/react-vite/package.json +++ b/code/frameworks/react-vite/package.json @@ -68,7 +68,7 @@ }, "devDependencies": { "@types/node": "^16.0.0", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vite": "^3.1.3" }, "peerDependencies": { diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json index cf473cdc36e2..5bfbd566ea61 100644 --- a/code/frameworks/react-webpack5/package.json +++ b/code/frameworks/react-webpack5/package.json @@ -58,7 +58,7 @@ }, "devDependencies": { "jest-specific-snapshot": "^4.0.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "^7.11.5", diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json index 99ed65ee0bae..fd973344c319 100644 --- a/code/frameworks/server-webpack5/package.json +++ b/code/frameworks/server-webpack5/package.json @@ -59,7 +59,7 @@ "react-dom": "16.14.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "engines": { "node": ">=10.13.0" diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json index 90cc6d76899b..b98437e8927b 100644 --- a/code/frameworks/svelte-vite/package.json +++ b/code/frameworks/svelte-vite/package.json @@ -68,7 +68,7 @@ }, "devDependencies": { "@types/node": "^16.0.0", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vite": "^3.1.3" }, "peerDependencies": { diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json index e683e5fd18bb..ac3836331ecf 100644 --- a/code/frameworks/svelte-webpack5/package.json +++ b/code/frameworks/svelte-webpack5/package.json @@ -61,7 +61,7 @@ "devDependencies": { "svelte": "^3.48.0", "svelte-loader": "^3.1.2", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json index f79a00616a39..78a386da4e10 100644 --- a/code/frameworks/vue-vite/package.json +++ b/code/frameworks/vue-vite/package.json @@ -64,7 +64,7 @@ "vue-docgen-api": "^4.40.0" }, "devDependencies": { - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vue": "^2.7.10" }, "peerDependencies": { diff --git a/code/frameworks/vue-webpack5/package.json b/code/frameworks/vue-webpack5/package.json index b0a0c75c6179..4a7122583dcf 100644 --- a/code/frameworks/vue-webpack5/package.json +++ b/code/frameworks/vue-webpack5/package.json @@ -59,7 +59,7 @@ "react-dom": "16.14.0" }, "devDependencies": { - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vue": "^2.6.12", "vue-loader": "^15.7.0", "vue-template-compiler": "^2.6.14" diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json index 046914170aa9..10ee9f308ebb 100644 --- a/code/frameworks/vue3-vite/package.json +++ b/code/frameworks/vue3-vite/package.json @@ -66,7 +66,7 @@ }, "devDependencies": { "@types/node": "^16.0.0", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vite": "^3.1.3" }, "engines": { diff --git a/code/frameworks/vue3-webpack5/package.json b/code/frameworks/vue3-webpack5/package.json index a4b901bc1a73..5ef27f6db276 100644 --- a/code/frameworks/vue3-webpack5/package.json +++ b/code/frameworks/vue3-webpack5/package.json @@ -60,7 +60,7 @@ }, "devDependencies": { "@vue/compiler-sfc": "3.0.0", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vue": "3.0.0" }, "peerDependencies": { diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json index 23cbc4bcd23e..023d64308e13 100644 --- a/code/frameworks/web-components-vite/package.json +++ b/code/frameworks/web-components-vite/package.json @@ -65,7 +65,7 @@ }, "devDependencies": { "@types/node": "^16.0.0", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vite": "^3.1.0" }, "engines": { diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json index 90c88e795578..06a9cdc10434 100644 --- a/code/frameworks/web-components-webpack5/package.json +++ b/code/frameworks/web-components-webpack5/package.json @@ -63,7 +63,7 @@ }, "devDependencies": { "lit-html": "2.0.2", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "lit-html": "^1.4.1 || ^2.0.0" diff --git a/code/lib/api/package.json b/code/lib/api/package.json index 966a18ce5c62..87f4bfb8dd7c 100644 --- a/code/lib/api/package.json +++ b/code/lib/api/package.json @@ -69,7 +69,7 @@ "@types/qs": "^6", "flush-promises": "^1.0.2", "qs": "^6.10.1", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/builder-manager/package.json b/code/lib/builder-manager/package.json index 7e5345246bc8..819989869481 100644 --- a/code/lib/builder-manager/package.json +++ b/code/lib/builder-manager/package.json @@ -58,7 +58,7 @@ "util": "^0.12.4" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/builder-vite/package.json b/code/lib/builder-vite/package.json index 3e8eebc728aa..3b3b0129e05e 100644 --- a/code/lib/builder-vite/package.json +++ b/code/lib/builder-vite/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@types/express": "^4.17.13", "@types/node": "^16.0.0", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vite": "^3.1.3" }, "publishConfig": { diff --git a/code/lib/builder-webpack5/package.json b/code/lib/builder-webpack5/package.json index 2d7cbb0bfdbf..269253ceac03 100644 --- a/code/lib/builder-webpack5/package.json +++ b/code/lib/builder-webpack5/package.json @@ -98,7 +98,7 @@ "@types/webpack-dev-middleware": "^5.3.0", "@types/webpack-hot-middleware": "^2.25.6", "@types/webpack-virtual-modules": "^0.1.1", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/channel-postmessage/package.json b/code/lib/channel-postmessage/package.json index c298a57f5c8a..c1a4cb07e6d5 100644 --- a/code/lib/channel-postmessage/package.json +++ b/code/lib/channel-postmessage/package.json @@ -50,7 +50,7 @@ "telejson": "^6.0.8" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/channel-websocket/package.json b/code/lib/channel-websocket/package.json index 746e536f94cb..7606042af691 100644 --- a/code/lib/channel-websocket/package.json +++ b/code/lib/channel-websocket/package.json @@ -40,7 +40,7 @@ "telejson": "^6.0.8" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/channels/package.json b/code/lib/channels/package.json index 5492cf2dbeb1..8759d8b01adb 100644 --- a/code/lib/channels/package.json +++ b/code/lib/channels/package.json @@ -42,7 +42,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json index 2a77f7c8d42a..96871a9fd353 100644 --- a/code/lib/cli-sb/package.json +++ b/code/lib/cli-sb/package.json @@ -27,7 +27,7 @@ "@storybook/cli": "7.0.0-alpha.47" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json index b41f8fc20344..281c4b0290a0 100644 --- a/code/lib/cli-storybook/package.json +++ b/code/lib/cli-storybook/package.json @@ -30,7 +30,7 @@ "@storybook/cli": "7.0.0-alpha.47" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json index 804dd02afb04..88f8ee00bfe3 100644 --- a/code/lib/cli/package.json +++ b/code/lib/cli/package.json @@ -87,7 +87,7 @@ "@types/update-notifier": "^6.0.1", "@types/util-deprecate": "^1.0.0", "strip-json-comments": "^3.1.1", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "update-notifier": "^6.0.2" }, "publishConfig": { diff --git a/code/lib/client-api/package.json b/code/lib/client-api/package.json index 65fdf6482422..b0a7d82c24e6 100644 --- a/code/lib/client-api/package.json +++ b/code/lib/client-api/package.json @@ -57,7 +57,7 @@ }, "devDependencies": { "@storybook/core-common": "7.0.0-alpha.47", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/client-logger/package.json b/code/lib/client-logger/package.json index 9d1950063a6c..8f12654654ed 100644 --- a/code/lib/client-logger/package.json +++ b/code/lib/client-logger/package.json @@ -45,7 +45,7 @@ "global": "^4.4.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 7c2a72dd6239..3d9a473cd683 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -53,7 +53,7 @@ "devDependencies": { "jest": "^26.6.3", "jest-specific-snapshot": "^4.0.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/core-client/package.json b/code/lib/core-client/package.json index ffc733b750c3..838bd92a8133 100644 --- a/code/lib/core-client/package.json +++ b/code/lib/core-client/package.json @@ -50,7 +50,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependenciesMeta": { "typescript": { diff --git a/code/lib/core-common/package.json b/code/lib/core-common/package.json index fcbf75b0b89d..a81bf5560997 100644 --- a/code/lib/core-common/package.json +++ b/code/lib/core-common/package.json @@ -77,7 +77,7 @@ "@types/picomatch": "^2.3.0", "mock-fs": "^4.13.0", "type-fest": "^2.17.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/core-events/package.json b/code/lib/core-events/package.json index 21bb8647646c..d75b53ea8a5e 100644 --- a/code/lib/core-events/package.json +++ b/code/lib/core-events/package.json @@ -42,7 +42,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/core-server/package.json b/code/lib/core-server/package.json index aaad3d77b142..8b965838aa81 100644 --- a/code/lib/core-server/package.json +++ b/code/lib/core-server/package.json @@ -85,7 +85,7 @@ "jest-os-detection": "^1.3.1", "jest-specific-snapshot": "^4.0.0", "ts-jest": "^26.4.4", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "webpack": "5" }, "peerDependencies": { diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index 9d99e9818f26..7936a4b0a9b5 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -49,7 +49,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.8.4", + "typescript": "~4.6.3", "webpack": "5" }, "publishConfig": { diff --git a/code/lib/csf-plugin/package.json b/code/lib/csf-plugin/package.json index cbf328cd1581..2af68bc379d0 100644 --- a/code/lib/csf-plugin/package.json +++ b/code/lib/csf-plugin/package.json @@ -46,7 +46,7 @@ "unplugin": "^0.10.2" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/csf-tools/package.json b/code/lib/csf-tools/package.json index 2f9379f32ee4..23827b33f3e1 100644 --- a/code/lib/csf-tools/package.json +++ b/code/lib/csf-tools/package.json @@ -54,7 +54,7 @@ "@babel/traverse": "^7.12.11", "@types/fs-extra": "^9.0.6", "js-yaml": "^3.14.1", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/docs-tools/package.json b/code/lib/docs-tools/package.json index 9b6755a52c48..83455a4301db 100644 --- a/code/lib/docs-tools/package.json +++ b/code/lib/docs-tools/package.json @@ -52,7 +52,7 @@ "devDependencies": { "jest-specific-snapshot": "^4.0.0", "require-from-string": "^2.0.2", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/instrumenter/package.json b/code/lib/instrumenter/package.json index 65a5b81ad97b..52201a05a346 100644 --- a/code/lib/instrumenter/package.json +++ b/code/lib/instrumenter/package.json @@ -50,7 +50,7 @@ "global": "^4.4.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/node-logger/package.json b/code/lib/node-logger/package.json index 63e21d1ff546..0d525c544841 100644 --- a/code/lib/node-logger/package.json +++ b/code/lib/node-logger/package.json @@ -49,7 +49,7 @@ }, "devDependencies": { "@types/pretty-hrtime": "^1.0.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/postinstall/package.json b/code/lib/postinstall/package.json index d0ab71f38a7f..fddaef27a739 100644 --- a/code/lib/postinstall/package.json +++ b/code/lib/postinstall/package.json @@ -46,7 +46,7 @@ "jest": "^26.6.3", "jest-specific-snapshot": "^4.0.0", "jscodeshift": "^0.13.1", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/preview-web/package.json b/code/lib/preview-web/package.json index bdb7ec1574f6..d7b6a3ed83bb 100644 --- a/code/lib/preview-web/package.json +++ b/code/lib/preview-web/package.json @@ -60,7 +60,7 @@ "@storybook/channel-postmessage": "7.0.0-alpha.47", "react": "16.14.0", "ts-jest": "^28.0.8", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/router/package.json b/code/lib/router/package.json index d41d7088108b..ad75ea56600f 100644 --- a/code/lib/router/package.json +++ b/code/lib/router/package.json @@ -58,7 +58,7 @@ "react-router-dom": "6.0.2", "ts-dedent": "^2.0.0", "ts-node": "^10.4.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/source-loader/package.json b/code/lib/source-loader/package.json index 856de66ccca4..9eef875da2f5 100644 --- a/code/lib/source-loader/package.json +++ b/code/lib/source-loader/package.json @@ -51,7 +51,7 @@ }, "devDependencies": { "jest-specific-snapshot": "^4.0.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/store/package.json b/code/lib/store/package.json index 5ad7f5dd6297..337fbbc3ea3a 100644 --- a/code/lib/store/package.json +++ b/code/lib/store/package.json @@ -57,7 +57,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/telemetry/package.json b/code/lib/telemetry/package.json index 83b3a13e133a..54f17f017829 100644 --- a/code/lib/telemetry/package.json +++ b/code/lib/telemetry/package.json @@ -53,7 +53,7 @@ "read-pkg-up": "^7.0.1" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/lib/theming/package.json b/code/lib/theming/package.json index e050a0f13618..d22d00a5b794 100644 --- a/code/lib/theming/package.json +++ b/code/lib/theming/package.json @@ -63,7 +63,7 @@ "global": "^4.4.0", "polished": "^4.2.2", "ts-dedent": "^2.0.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/lib/types/package.json b/code/lib/types/package.json index e8e449e7b963..3c837664f5eb 100644 --- a/code/lib/types/package.json +++ b/code/lib/types/package.json @@ -50,7 +50,7 @@ "@storybook/csf": "next", "@types/node": "^16.0.0", "synchronous-promise": "^2.0.15", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/package.json b/code/package.json index a64b6d66e8b8..041f52e6755e 100644 --- a/code/package.json +++ b/code/package.json @@ -117,7 +117,7 @@ "esbuild": "^0.14.48", "eslint": "^8.26.0", "serialize-javascript": "^3.1.0", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "webpack": "5" }, "dependencies": { @@ -338,7 +338,7 @@ "ts-jest": "^26.4.4", "ts-node": "^10.4.0", "tsup": "^6.2.2", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "util": "^0.12.4", "vite": "^3.1.7", "wait-on": "^5.2.1", diff --git a/code/presets/html-webpack/package.json b/code/presets/html-webpack/package.json index 8543b462b069..13ed7efd851e 100644 --- a/code/presets/html-webpack/package.json +++ b/code/presets/html-webpack/package.json @@ -58,7 +58,7 @@ "webpack": "5" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "*" diff --git a/code/presets/preact-webpack/package.json b/code/presets/preact-webpack/package.json index df7bf92cdf0d..a27970e6b6c7 100644 --- a/code/presets/preact-webpack/package.json +++ b/code/presets/preact-webpack/package.json @@ -58,7 +58,7 @@ }, "devDependencies": { "preact": "^10.5.13", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/presets/react-webpack/package.json b/code/presets/react-webpack/package.json index 81aa9cad3551..5fec867c0ae7 100644 --- a/code/presets/react-webpack/package.json +++ b/code/presets/react-webpack/package.json @@ -89,7 +89,7 @@ }, "devDependencies": { "@types/util-deprecate": "^1.0.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "^7.11.5", diff --git a/code/presets/server-webpack/package.json b/code/presets/server-webpack/package.json index 207b00aaba5b..715ff99fd4fc 100644 --- a/code/presets/server-webpack/package.json +++ b/code/presets/server-webpack/package.json @@ -69,7 +69,7 @@ "devDependencies": { "fs-extra": "^9.0.1", "jest-specific-snapshot": "^4.0.0", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "yaml": "^1.10.0" }, "engines": { diff --git a/code/presets/svelte-webpack/package.json b/code/presets/svelte-webpack/package.json index b387c9fcc179..e4747efb9d3b 100644 --- a/code/presets/svelte-webpack/package.json +++ b/code/presets/svelte-webpack/package.json @@ -75,7 +75,7 @@ "devDependencies": { "svelte": "^3.31.2", "svelte-loader": "^3.1.2", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/presets/vue-webpack/package.json b/code/presets/vue-webpack/package.json index 546179a48667..a2bd6bfe95c3 100644 --- a/code/presets/vue-webpack/package.json +++ b/code/presets/vue-webpack/package.json @@ -71,7 +71,7 @@ "webpack": "5" }, "devDependencies": { - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vue": "^2.6.12", "vue-loader": "^15.7.0", "vue-template-compiler": "^2.6.14", diff --git a/code/presets/vue3-webpack/package.json b/code/presets/vue3-webpack/package.json index cee1fb97c6cf..a883af45e493 100644 --- a/code/presets/vue3-webpack/package.json +++ b/code/presets/vue3-webpack/package.json @@ -73,7 +73,7 @@ }, "devDependencies": { "@vue/compiler-sfc": "^3.2.33", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vue": "^3.2.33" }, "peerDependencies": { diff --git a/code/presets/web-components-webpack/package.json b/code/presets/web-components-webpack/package.json index 8375955d6fcc..64945ebc1a8e 100644 --- a/code/presets/web-components-webpack/package.json +++ b/code/presets/web-components-webpack/package.json @@ -64,7 +64,7 @@ }, "devDependencies": { "lit-html": "2.0.2", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "lit-html": "^1.4.1 || ^2.0.0" diff --git a/code/renderers/html/package.json b/code/renderers/html/package.json index 97b8c9a2c990..5fa591cd8b8b 100644 --- a/code/renderers/html/package.json +++ b/code/renderers/html/package.json @@ -63,7 +63,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "*" diff --git a/code/renderers/preact/package.json b/code/renderers/preact/package.json index c5b3757ef189..690ec7da696f 100644 --- a/code/renderers/preact/package.json +++ b/code/renderers/preact/package.json @@ -62,7 +62,7 @@ }, "devDependencies": { "preact": "^10.5.13", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "preact": "^8.0.0||^10.0.0" diff --git a/code/renderers/react/package.json b/code/renderers/react/package.json index 3dc637462c55..6abb292ed5c3 100644 --- a/code/renderers/react/package.json +++ b/code/renderers/react/package.json @@ -80,7 +80,7 @@ "expect-type": "^0.14.2", "jest-specific-snapshot": "^4.0.0", "require-from-string": "^2.0.2", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/renderers/server/package.json b/code/renderers/server/package.json index 223fa6dedf3b..fe56f38fd9c2 100644 --- a/code/renderers/server/package.json +++ b/code/renderers/server/package.json @@ -62,7 +62,7 @@ "ts-dedent": "^2.0.0" }, "devDependencies": { - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "engines": { "node": ">=10.13.0" diff --git a/code/renderers/svelte/package.json b/code/renderers/svelte/package.json index 955a2fddce59..6c4187f5a242 100644 --- a/code/renderers/svelte/package.json +++ b/code/renderers/svelte/package.json @@ -71,7 +71,7 @@ "expect-type": "^0.14.2", "svelte": "^3.31.2", "svelte-check": "^2.9.2", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "@babel/core": "*", diff --git a/code/renderers/vue/package.json b/code/renderers/vue/package.json index 06c8e8bcf8d3..8a3043975ac5 100644 --- a/code/renderers/vue/package.json +++ b/code/renderers/vue/package.json @@ -64,7 +64,7 @@ "type-fest": "2.19.0" }, "devDependencies": { - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vue": "2.6.14", "vue-tsc": "^1.0.9" }, diff --git a/code/renderers/vue3/package.json b/code/renderers/vue3/package.json index e13c77b86bf0..c2bba2f61ab2 100644 --- a/code/renderers/vue3/package.json +++ b/code/renderers/vue3/package.json @@ -64,7 +64,7 @@ }, "devDependencies": { "@digitak/esrun": "^3.2.2", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "vue": "^3.2.41", "vue-tsc": "^1.0.8" }, diff --git a/code/renderers/web-components/package.json b/code/renderers/web-components/package.json index a18f19f298fd..e14b64898c30 100644 --- a/code/renderers/web-components/package.json +++ b/code/renderers/web-components/package.json @@ -69,7 +69,7 @@ "devDependencies": { "lit": "2.3.1", "lit-html": "2.0.2", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "lit-html": "^1.4.1 || ^2.0.0" diff --git a/code/ui/components/package.json b/code/ui/components/package.json index 5a5500435651..a20ba4625b43 100644 --- a/code/ui/components/package.json +++ b/code/ui/components/package.json @@ -72,7 +72,7 @@ "react-syntax-highlighter": "^15.4.5", "react-textarea-autosize": "^8.3.0", "ts-dedent": "^2.0.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/code/ui/manager/package.json b/code/ui/manager/package.json index 27fd1cf4e7c8..e0293adbcafa 100644 --- a/code/ui/manager/package.json +++ b/code/ui/manager/package.json @@ -87,7 +87,7 @@ "shelljs": "^0.8.5", "store2": "^2.12.0", "ts-dedent": "^2.0.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "publishConfig": { "access": "public" diff --git a/code/yarn.lock b/code/yarn.lock index 57de4a2df1c4..38af9d7e00c3 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5406,7 +5406,7 @@ __metadata: global: ^4.4.0 lodash: ^4.17.21 react-sizeme: ^3.0.1 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5438,7 +5438,7 @@ __metadata: react-inspector: ^6.0.0 telejson: ^6.0.8 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 uuid-browser: ^3.1.0 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5465,7 +5465,7 @@ __metadata: global: ^4.4.0 memoizerific: ^1.11.3 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5534,7 +5534,7 @@ __metadata: remark-external-links: ^8.0.0 remark-slug: ^6.0.0 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5567,7 +5567,7 @@ __metadata: "@storybook/vue": 7.0.0-alpha.47 "@types/jest": ^26.0.16 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": ^7.9.6 peerDependenciesMeta: @@ -5606,7 +5606,7 @@ __metadata: "@storybook/core-events": 7.0.0-alpha.47 "@types/webpack-env": ^1.16.0 global: ^4.4.0 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -5632,7 +5632,7 @@ __metadata: jest-mock: ^27.0.6 polished: ^4.2.2 ts-dedent: ^2.2.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5656,7 +5656,7 @@ __metadata: "@storybook/theming": 7.0.0-alpha.47 global: ^4.4.0 react-sizeme: ^3.0.1 - typescript: ~4.8.4 + typescript: ~4.6.3 upath: ^1.2.0 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5682,7 +5682,7 @@ __metadata: global: ^4.4.0 prop-types: ^15.7.2 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5705,7 +5705,7 @@ __metadata: "@storybook/core-events": 7.0.0-alpha.47 "@storybook/types": 7.0.0-alpha.47 global: ^4.4.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5729,7 +5729,7 @@ __metadata: "@storybook/types": 7.0.0-alpha.47 global: ^4.4.0 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5868,7 +5868,7 @@ __metadata: estraverse: ^5.2.0 prop-types: ^15.7.2 react-syntax-highlighter: ^15.5.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5905,7 +5905,7 @@ __metadata: "@storybook/client-logger": 7.0.0-alpha.47 "@storybook/components": 7.0.0-alpha.47 "@storybook/theming": 7.0.0-alpha.47 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -5930,7 +5930,7 @@ __metadata: global: ^4.4.0 memoizerific: ^1.11.3 prop-types: ^15.7.2 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6033,7 +6033,7 @@ __metadata: tmp: ^0.2.1 ts-dedent: ^2.0.0 tsconfig-paths-webpack-plugin: ^3.5.2 - typescript: ~4.8.4 + typescript: ~4.6.3 util-deprecate: ^1.0.2 webpack: 5 zone.js: ^0.11.0 @@ -6087,7 +6087,7 @@ __metadata: store2: ^2.12.0 telejson: ^6.0.8 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6182,7 +6182,7 @@ __metadata: fs-extra: ^9.0.1 process: ^0.11.10 slash: ^3.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 util: ^0.12.4 languageName: unknown linkType: soft @@ -6209,7 +6209,7 @@ __metadata: glob-promise: ^4.2.0 magic-string: ^0.26.1 slash: ^3.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 vite: ^3.1.3 languageName: unknown linkType: soft @@ -6256,7 +6256,7 @@ __metadata: style-loader: ^3.3.1 terser-webpack-plugin: ^5.3.1 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 util: ^0.12.4 util-deprecate: ^1.0.2 webpack: 5 @@ -6282,7 +6282,7 @@ __metadata: global: ^4.4.0 qs: ^6.10.0 telejson: ^6.0.8 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -6294,7 +6294,7 @@ __metadata: "@storybook/client-logger": 7.0.0-alpha.47 global: ^4.4.0 telejson: ^6.0.8 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -6302,7 +6302,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/channels@workspace:lib/channels" dependencies: - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -6361,7 +6361,7 @@ __metadata: shelljs: ^0.8.5 strip-json-comments: ^3.1.1 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 update-notifier: ^6.0.2 util-deprecate: ^1.0.2 bin: @@ -6386,7 +6386,7 @@ __metadata: qs: ^6.10.0 synchronous-promise: ^2.0.15 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6399,7 +6399,7 @@ __metadata: resolution: "@storybook/client-logger@workspace:lib/client-logger" dependencies: global: ^4.4.0 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -6430,7 +6430,7 @@ __metadata: lodash: ^4.17.21 prettier: ">=2.2.1 <=3.0.0" recast: ^0.19.0 - typescript: ~4.8.4 + typescript: ~4.6.3 util: ^0.12.4 languageName: unknown linkType: soft @@ -6457,7 +6457,7 @@ __metadata: react-syntax-highlighter: ^15.4.5 react-textarea-autosize: ^8.3.0 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6481,7 +6481,7 @@ __metadata: "@storybook/store": 7.0.0-alpha.47 "@storybook/types": 7.0.0-alpha.47 global: ^4.4.0 - typescript: ~4.8.4 + typescript: ~4.6.3 util-deprecate: ^1.0.2 peerDependenciesMeta: typescript: @@ -6521,7 +6521,7 @@ __metadata: telejson: ^6.0.8 ts-dedent: ^2.0.0 type-fest: ^2.17.0 - typescript: ~4.8.4 + typescript: ~4.6.3 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6536,7 +6536,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/core-events@workspace:lib/core-events" dependencies: - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -6600,7 +6600,7 @@ __metadata: telejson: ^6.0.8 ts-dedent: ^2.0.0 ts-jest: ^26.4.4 - typescript: ~4.8.4 + typescript: ~4.6.3 util-deprecate: ^1.0.2 watchpack: ^2.2.0 webpack: 5 @@ -6625,7 +6625,7 @@ __metadata: "@storybook/types": 7.0.0-alpha.47 "@types/node": ^16.0.0 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 webpack: 5 languageName: unknown linkType: soft @@ -6635,7 +6635,7 @@ __metadata: resolution: "@storybook/csf-plugin@workspace:lib/csf-plugin" dependencies: "@storybook/csf-tools": 7.0.0-alpha.47 - typescript: ~4.8.4 + typescript: ~4.6.3 unplugin: ^0.10.2 languageName: unknown linkType: soft @@ -6654,7 +6654,7 @@ __metadata: fs-extra: ^9.0.1 js-yaml: ^3.14.1 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -6711,7 +6711,7 @@ __metadata: jest-specific-snapshot: ^4.0.0 lodash: ^4.17.21 require-from-string: ^2.0.2 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -6731,7 +6731,7 @@ __metadata: react-dom: 16.14.0 read-pkg-up: ^7.0.1 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": "*" "@types/ember__component": 4.0.8 @@ -6771,7 +6771,7 @@ __metadata: global: ^4.4.0 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": "*" languageName: unknown @@ -6791,7 +6791,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": "*" languageName: unknown @@ -6807,7 +6807,7 @@ __metadata: "@storybook/core-events": 7.0.0-alpha.47 core-js: ^3.8.2 global: ^4.4.0 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -6930,7 +6930,7 @@ __metadata: shelljs: ^0.8.5 store2: ^2.12.0 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -6978,7 +6978,7 @@ __metadata: ts-dedent: ^2.0.0 tsconfig-paths: ^4.0.0 tsconfig-paths-webpack-plugin: ^3.5.2 - typescript: ~4.8.4 + typescript: ~4.6.3 webpack: ^5.65.0 peerDependencies: "@babel/core": ^7.11.5 @@ -7006,7 +7006,7 @@ __metadata: chalk: ^4.1.0 npmlog: ^5.0.1 pretty-hrtime: ^1.0.3 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -7017,7 +7017,7 @@ __metadata: jest: ^26.6.3 jest-specific-snapshot: ^4.0.0 jscodeshift: ^0.13.1 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -7033,7 +7033,7 @@ __metadata: preact: ^10.5.13 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": "*" preact: ^8.0.0||^10.0.0 @@ -7053,7 +7053,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: preact: ^8.0.0||^10.0.0 languageName: unknown @@ -7068,7 +7068,7 @@ __metadata: html-loader: ^3.1.0 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.8.4 + typescript: ~4.6.3 webpack: 5 peerDependencies: "@babel/core": "*" @@ -7085,7 +7085,7 @@ __metadata: preact: ^10.5.13 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": "*" preact: ^8.0.0||^10.0.0 @@ -7112,7 +7112,7 @@ __metadata: fs-extra: ^9.0.1 react-refresh: ^0.11.0 semver: ^7.3.7 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": ^7.11.5 jest-specific-snapshot: ^4.0.0 @@ -7143,7 +7143,7 @@ __metadata: react-dom: 16.14.0 safe-identifier: ^0.4.1 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 yaml: ^1.10.0 yaml-loader: ^0.8.0 languageName: unknown @@ -7161,7 +7161,7 @@ __metadata: svelte-loader: ^3.1.2 sveltedoc-parser: ^4.2.1 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": "*" svelte: ^3.1.0 @@ -7179,7 +7179,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-loader: ^9.2.8 - typescript: ~4.8.4 + typescript: ~4.6.3 vue: ^2.6.12 vue-docgen-api: ^4.44.23 vue-docgen-loader: ^1.5.1 @@ -7207,7 +7207,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-loader: ^9.2.8 - typescript: ~4.8.4 + typescript: ~4.6.3 vue: ^3.2.33 vue-docgen-api: ^4.46.0 vue-docgen-loader: ^1.5.1 @@ -7235,7 +7235,7 @@ __metadata: lit-html: 2.0.2 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: lit-html: ^1.4.1 || ^2.0.0 languageName: unknown @@ -7260,7 +7260,7 @@ __metadata: synchronous-promise: ^2.0.15 ts-dedent: ^2.0.0 ts-jest: ^28.0.8 - typescript: ~4.8.4 + typescript: ~4.6.3 util-deprecate: ^1.0.2 languageName: unknown linkType: soft @@ -7301,7 +7301,7 @@ __metadata: ast-types: ^0.14.2 magic-string: ^0.26.1 react-docgen: ^6.0.0-alpha.3 - typescript: ~4.8.4 + typescript: ~4.6.3 vite: ^3.1.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7318,7 +7318,7 @@ __metadata: "@storybook/react": 7.0.0-alpha.47 "@types/node": ^16.0.0 jest-specific-snapshot: ^4.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": ^7.11.5 react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7360,7 +7360,7 @@ __metadata: require-from-string: ^2.0.2 ts-dedent: ^2.0.0 type-fest: ^2.19.0 - typescript: ~4.8.4 + typescript: ~4.6.3 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7595,7 +7595,7 @@ __metadata: ts-loader: ^9.2.8 ts-node: ^10.4.0 tsup: ^6.2.2 - typescript: ~4.8.4 + typescript: ~4.6.3 util: ^0.12.4 verdaccio: ^4.10.0 verdaccio-auth-memory: ^9.7.2 @@ -7648,7 +7648,7 @@ __metadata: react-router-dom: 6.0.2 ts-dedent: ^2.0.0 ts-node: ^10.4.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7694,7 +7694,7 @@ __metadata: "@types/node": ^16.0.0 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -7711,7 +7711,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -7725,7 +7725,7 @@ __metadata: jest-specific-snapshot: ^4.0.0 lodash: ^4.17.21 prettier: ">=2.2.1 <=3.0.0" - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7748,7 +7748,7 @@ __metadata: slash: ^3.0.0 synchronous-promise: ^2.0.15 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7774,7 +7774,7 @@ __metadata: magic-string: ^0.26.1 svelte: ^3.0.0 sveltedoc-parser: ^4.2.1 - typescript: ~4.8.4 + typescript: ~4.6.3 vite: ^3.1.3 peerDependencies: "@storybook/addon-svelte-csf": ^2.0.0 @@ -7796,7 +7796,7 @@ __metadata: react-dom: 16.14.0 svelte: ^3.48.0 svelte-loader: ^3.1.2 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": "*" svelte: ^3.48.0 @@ -7822,7 +7822,7 @@ __metadata: svelte-check: ^2.9.2 sveltedoc-parser: ^4.2.1 type-fest: 2.19.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: "@babel/core": "*" svelte: ^3.1.0 @@ -7842,7 +7842,7 @@ __metadata: isomorphic-unfetch: ^3.1.0 nanoid: ^3.3.1 read-pkg-up: ^7.0.1 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -7877,7 +7877,7 @@ __metadata: memoizerific: ^1.11.3 polished: ^4.2.2 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -7911,7 +7911,7 @@ __metadata: express: ^4.17.1 file-system-cache: ^2.0.0 synchronous-promise: ^2.0.15 - typescript: ~4.8.4 + typescript: ~4.6.3 languageName: unknown linkType: soft @@ -7929,7 +7929,7 @@ __metadata: "@storybook/preview-web": 7.0.0-alpha.47 "@storybook/vue": 7.0.0-alpha.47 magic-string: ^0.26.1 - typescript: ~4.8.4 + typescript: ~4.6.3 vite: ^3.1.3 vue: ^2.7.10 vue-docgen-api: ^4.40.0 @@ -7949,7 +7949,7 @@ __metadata: "@types/node": ^16.0.0 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.8.4 + typescript: ~4.6.3 vue: ^2.6.12 vue-loader: ^15.7.0 vue-template-compiler: ^2.6.14 @@ -7978,7 +7978,7 @@ __metadata: "@types/node": ^16.0.0 "@vitejs/plugin-vue": ^3.0.0 magic-string: ^0.26.1 - typescript: ~4.8.4 + typescript: ~4.6.3 vite: ^3.1.3 vue-docgen-api: ^4.40.0 languageName: unknown @@ -7996,7 +7996,7 @@ __metadata: "@vue/compiler-sfc": 3.0.0 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.8.4 + typescript: ~4.6.3 vue: 3.0.0 peerDependencies: "@babel/core": "*" @@ -8021,7 +8021,7 @@ __metadata: react-dom: 16.14.0 ts-dedent: ^2.0.0 type-fest: 2.19.0 - typescript: ~4.8.4 + typescript: ~4.6.3 vue: ^3.2.41 vue-tsc: ^1.0.8 peerDependencies: @@ -8049,7 +8049,7 @@ __metadata: react-dom: 16.14.0 ts-dedent: ^2.0.0 type-fest: 2.19.0 - typescript: ~4.8.4 + typescript: ~4.6.3 vue: 2.6.14 vue-tsc: ^1.0.9 peerDependencies: @@ -8078,7 +8078,7 @@ __metadata: "@storybook/web-components": 7.0.0-alpha.47 "@types/node": ^16.0.0 magic-string: ^0.26.1 - typescript: ~4.8.4 + typescript: ~4.6.3 vite: ^3.1.0 languageName: unknown linkType: soft @@ -8096,7 +8096,7 @@ __metadata: lit-html: 2.0.2 react: 16.14.0 react-dom: 16.14.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: lit-html: ^1.4.1 || ^2.0.0 languageName: unknown @@ -8120,7 +8120,7 @@ __metadata: react: 16.14.0 react-dom: 16.14.0 ts-dedent: ^2.0.0 - typescript: ~4.8.4 + typescript: ~4.6.3 peerDependencies: lit-html: ^1.4.1 || ^2.0.0 languageName: unknown @@ -31502,7 +31502,7 @@ __metadata: resolution: "sb@workspace:lib/cli-sb" dependencies: "@storybook/cli": 7.0.0-alpha.47 - typescript: ~4.8.4 + typescript: ~4.6.3 bin: sb: ./index.js languageName: unknown @@ -32627,7 +32627,7 @@ __metadata: resolution: "storybook@workspace:lib/cli-storybook" dependencies: "@storybook/cli": 7.0.0-alpha.47 - typescript: ~4.8.4 + typescript: ~4.6.3 bin: sb: ./index.js storybook: ./index.js @@ -34386,23 +34386,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~4.8.4": - version: 4.8.4 - resolution: "typescript@npm:4.8.4" +"typescript@npm:~4.6.3": + version: 4.6.4 + resolution: "typescript@npm:4.6.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 663bf455b21ac024e719bb8c6a07bcaaa027a9943abfb58a694b59789e7d08578badb5556170267ad480e31786b8b4c8ab3c9c0e597d3b8df39af800e43c6ed5 + checksum: 92e2c0328485a4f7bd7435f5b105f03addff32f867e241dc3be8c372ed801a138c732d9a55697696d2f82a80dd6ad4bddff1ad6b0d1884bf4a24b92e71094c44 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~4.8.4#~builtin": - version: 4.8.4 - resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin::version=4.8.4&hash=701156" +"typescript@patch:typescript@npm%3A~4.6.3#~builtin": + version: 4.6.4 + resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin::version=4.6.4&hash=701156" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: bfba046abb25c2f417899ad724e41034433094fb25bbbec401291bf7f6f11f5b7de0e4b2a5bcb6c8af4e62615482a3a0b1160763a3f478896a06f9851186f4fb + checksum: 0e3fa814d454942a689daf4c00f82328d323e7ecd4077e3265d45375e64642611631f4c882a71be87774468ba03793e9b8ff4bccfac3018194a9e36d8f72c251 languageName: node linkType: hard From 8dda382b9a591a208cb9e084f04c00247f520a64 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 4 Nov 2022 11:31:11 -0400 Subject: [PATCH 028/258] Revert "Fix TS 4.8 errors" This reverts commit 0add1a99b434309ce0ffda2daf998812caae254a. --- code/addons/viewport/src/shortcuts.ts | 11 +++-------- code/lib/store/src/args.ts | 6 ++---- code/renderers/react/src/testing-api.ts | 2 +- scripts/prepare/bundle.ts | 8 ++++---- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/code/addons/viewport/src/shortcuts.ts b/code/addons/viewport/src/shortcuts.ts index 6e9b7302b1c1..779726eb9e23 100644 --- a/code/addons/viewport/src/shortcuts.ts +++ b/code/addons/viewport/src/shortcuts.ts @@ -1,11 +1,6 @@ import type { API } from '@storybook/api'; import { ADDON_ID } from './constants'; -type State = { - selected: string; - isRotated: boolean; -}; - const getCurrentViewportIndex = (viewportsKeys: string[], current: string): number => viewportsKeys.indexOf(current); @@ -29,7 +24,7 @@ export const registerShortcuts = async (api: API, setState: any, viewportsKeys: defaultShortcut: ['shift', 'V'], actionName: 'previous', action: () => { - const { selected, isRotated } = api.getAddonState(ADDON_ID); + const { selected, isRotated } = api.getAddonState(ADDON_ID); setState({ selected: getPreviousViewport(viewportsKeys, selected), isRotated, @@ -42,7 +37,7 @@ export const registerShortcuts = async (api: API, setState: any, viewportsKeys: defaultShortcut: ['V'], actionName: 'next', action: () => { - const { selected, isRotated } = api.getAddonState(ADDON_ID); + const { selected, isRotated } = api.getAddonState(ADDON_ID); setState({ selected: getNextViewport(viewportsKeys, selected), isRotated, @@ -55,7 +50,7 @@ export const registerShortcuts = async (api: API, setState: any, viewportsKeys: defaultShortcut: ['alt', 'V'], actionName: 'reset', action: () => { - const { isRotated } = api.getAddonState(ADDON_ID); + const { isRotated } = api.getAddonState(ADDON_ID); setState({ selected: 'reset', isRotated, diff --git a/code/lib/store/src/args.ts b/code/lib/store/src/args.ts index a119be4bfe80..842c46c84f24 100644 --- a/code/lib/store/src/args.ts +++ b/code/lib/store/src/args.ts @@ -152,7 +152,7 @@ export const deepDiff = (value: any, update: any): any => { }; export const NO_TARGET_NAME = ''; -export function groupArgsByTarget({ +export function groupArgsByTarget({ args, argTypes, }: StoryContext) { @@ -166,8 +166,6 @@ export function groupArgsByTarget({ return groupedArgs; } -export function noTargetArgs( - context: StoryContext -) { +export function noTargetArgs(context: StoryContext) { return groupArgsByTarget(context)[NO_TARGET_NAME]; } diff --git a/code/renderers/react/src/testing-api.ts b/code/renderers/react/src/testing-api.ts index 3b148c15e084..c1213f837eb7 100644 --- a/code/renderers/react/src/testing-api.ts +++ b/code/renderers/react/src/testing-api.ts @@ -80,7 +80,7 @@ const defaultProjectAnnotations: ProjectAnnotations = { * @param [projectAnnotations] - e.g. (import * as projectAnnotations from '../.storybook/preview') this can be applied automatically if you use `setProjectAnnotations` in your setup files. * @param [exportsName] - in case your story does not contain a name and you want it to have a name. */ -export function composeStory( +export function composeStory( story: Store_ComposedStory, componentAnnotations: Meta, projectAnnotations?: ProjectAnnotations, diff --git a/scripts/prepare/bundle.ts b/scripts/prepare/bundle.ts index 323b5fced4ff..9689079b4c66 100755 --- a/scripts/prepare/bundle.ts +++ b/scripts/prepare/bundle.ts @@ -37,12 +37,12 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { entries.map(async (file: string) => { console.log(`skipping generating types for ${file}`); const { name: entryName, dir } = path.parse(file); - + const pathName = join(process.cwd(), dir.replace('./src', 'dist'), `${entryName}.d.ts`); const srcName = join(process.cwd(), file); - + const rel = relative(dirname(pathName), dirname(srcName)); - + await fs.ensureFile(pathName); await fs.writeFile( pathName, @@ -54,7 +54,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { }) ); } - + const tsConfigPath = join(cwd, 'tsconfig.json'); const tsConfigExists = await fs.pathExists(tsConfigPath); await Promise.all([ From 744051b9ead09b57f28c4575c2ed99b47cbe1caf Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 4 Nov 2022 12:04:33 -0400 Subject: [PATCH 029/258] Revert "Update typescript in /scripts too" This reverts commit 8c62083bed4cca662204e9b443f59cf7dac7c4c1. --- scripts/package.json | 4 ++-- scripts/tsconfig.json | 2 +- scripts/yarn.lock | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/package.json b/scripts/package.json index 8ccd71553de5..e7190c1c757e 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -33,7 +33,7 @@ "esbuild": "^0.14.48", "eslint": "^8.26.0", "serialize-javascript": "^3.1.0", - "typescript": "~4.8.4" + "typescript": "~4.6.3" }, "dependencies": { "@babel/cli": "^7.17.6", @@ -171,7 +171,7 @@ "ts-jest": "^26.4.4", "ts-node": "^10.4.0", "tsup": "^6.2.2", - "typescript": "~4.8.4", + "typescript": "~4.6.3", "util": "^0.12.4", "wait-on": "^5.2.1", "window-size": "^1.1.1", diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index 1b54a8f32716..19b4e68d4278 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -57,4 +57,4 @@ ] } } -} +} \ No newline at end of file diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 9c4d3f2c51fc..fb167307ddc9 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -3457,7 +3457,7 @@ __metadata: ts-loader: ^9.2.8 ts-node: ^10.4.0 tsup: ^6.2.2 - typescript: ~4.8.4 + typescript: ~4.6.3 util: ^0.12.4 verdaccio: ^4.10.0 verdaccio-auth-memory: ^9.7.2 @@ -18809,23 +18809,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:~4.8.4": - version: 4.8.4 - resolution: "typescript@npm:4.8.4" +"typescript@npm:~4.6.3": + version: 4.6.4 + resolution: "typescript@npm:4.6.4" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 663bf455b21ac024e719bb8c6a07bcaaa027a9943abfb58a694b59789e7d08578badb5556170267ad480e31786b8b4c8ab3c9c0e597d3b8df39af800e43c6ed5 + checksum: 92e2c0328485a4f7bd7435f5b105f03addff32f867e241dc3be8c372ed801a138c732d9a55697696d2f82a80dd6ad4bddff1ad6b0d1884bf4a24b92e71094c44 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A~4.8.4#~builtin": - version: 4.8.4 - resolution: "typescript@patch:typescript@npm%3A4.8.4#~builtin::version=4.8.4&hash=701156" +"typescript@patch:typescript@npm%3A~4.6.3#~builtin": + version: 4.6.4 + resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin::version=4.6.4&hash=701156" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: bfba046abb25c2f417899ad724e41034433094fb25bbbec401291bf7f6f11f5b7de0e4b2a5bcb6c8af4e62615482a3a0b1160763a3f478896a06f9851186f4fb + checksum: 0e3fa814d454942a689daf4c00f82328d323e7ecd4077e3265d45375e64642611631f4c882a71be87774468ba03793e9b8ff4bccfac3018194a9e36d8f72c251 languageName: node linkType: hard From e9d30c89c81daf0e06beab524de7325ddae22aea Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 4 Nov 2022 14:36:14 -0400 Subject: [PATCH 030/258] Update hasDocsOrControls to account for new path --- code/lib/docs-tools/src/hasDocsOrControls.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/docs-tools/src/hasDocsOrControls.ts b/code/lib/docs-tools/src/hasDocsOrControls.ts index d460666d7bc3..b1585ee534d7 100644 --- a/code/lib/docs-tools/src/hasDocsOrControls.ts +++ b/code/lib/docs-tools/src/hasDocsOrControls.ts @@ -1,7 +1,7 @@ import type { Options } from '@storybook/types'; // `addons/x` is for the monorepo, `addon-x` is for normal usage -const packageRe = /(addons\/|addon-)(docs|controls)/; +const packageRe = /(addons\/|addon-|addon-essentials\/)(docs|controls)/; export const hasDocsOrControls = (options: Options) => options.presetsList?.some((preset) => packageRe.test(preset.name)); From 232756990cbf9d55ef17e90c98b0d6a2ee3fe26c Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 4 Nov 2022 14:37:00 -0400 Subject: [PATCH 031/258] Fix builder-webpack5 exports paths --- code/lib/builder-webpack5/package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/lib/builder-webpack5/package.json b/code/lib/builder-webpack5/package.json index 269253ceac03..476a26908374 100644 --- a/code/lib/builder-webpack5/package.json +++ b/code/lib/builder-webpack5/package.json @@ -25,15 +25,15 @@ "import": "./dist/index.mjs", "types": "./dist/index.d.ts" }, - "./presets/custom-webpack-preset.js": { - "require": "./presets/custom-webpack-preset.js", - "import": "./presets/custom-webpack-preset.mjs", - "types": "./presets/custom-webpack-preset.d.ts" + "./presets/custom-webpack-preset": { + "require": "./dist/presets/custom-webpack-preset.js", + "import": "./dist/presets/custom-webpack-preset.mjs", + "types": "./dist/presets/custom-webpack-preset.d.ts" }, - "./presets/preview-preset.js": { - "require": "./presets/preview-preset.js", - "import": "./presets/preview-preset.mjs", - "types": "./presets/preview-preset.d.ts" + "./presets/preview-preset": { + "require": "./dist/presets/preview-preset.js", + "import": "./dist/presets/preview-preset.mjs", + "types": "./dist/presets/preview-preset.d.ts" }, "./templates/virtualModuleModernEntry.js.handlebars": "./templates/virtualModuleModernEntry.js.handlebars", "./package.json": "./package.json" From 4af0653c72ea02abad17e20f675f5a837b7eb6b3 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 4 Nov 2022 15:32:23 -0400 Subject: [PATCH 032/258] Remove unrelated change --- code/addons/a11y/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json index 64232fda8cd7..8c6d1d8e168f 100644 --- a/code/addons/a11y/package.json +++ b/code/addons/a11y/package.json @@ -36,7 +36,7 @@ "import": "./dist/manager.mjs", "types": "./dist/manager.d.ts" }, - "./dist/preview": { + "./preview": { "require": "./dist/preview.js", "import": "./dist/preview.mjs", "types": "./dist/preview.d.ts" From 47e5c57ace1c39b6f701d976349f948686d4ef8a Mon Sep 17 00:00:00 2001 From: Ryan Kent Date: Mon, 7 Nov 2022 15:07:59 -0500 Subject: [PATCH 033/258] Remove transform style override in addon-panel div --- code/ui/components/src/addon-panel/addon-panel.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/ui/components/src/addon-panel/addon-panel.tsx b/code/ui/components/src/addon-panel/addon-panel.tsx index 9e8bb2f49ac8..89e32c0b8592 100644 --- a/code/ui/components/src/addon-panel/addon-panel.tsx +++ b/code/ui/components/src/addon-panel/addon-panel.tsx @@ -25,10 +25,7 @@ export interface AddonPanelProps { export const AddonPanel = ({ active, children }: AddonPanelProps) => { return ( - // the transform is to prevent a bug where the content would be invisible // the hidden attribute is an valid html element that's both accessible and works to visually hide content - + ); }; From b79386896bce3666b7188c0248218248c73adb26 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 8 Nov 2022 10:13:08 -0500 Subject: [PATCH 034/258] Maintain WP back-compat by using tuple of [bare, absolute] --- .../builder-vite/src/codegen-iframe-script.ts | 14 ++++----- .../src/codegen-modern-iframe-script.ts | 15 +++++----- .../src/utils/process-preview-annotation.ts | 21 ++++++++++++++ .../src/preview/iframe-webpack.config.ts | 10 ++++++- code/lib/core-common/src/presets.ts | 29 ++++++++++++------- code/lib/types/src/modules/core-common.ts | 2 +- 6 files changed, 62 insertions(+), 29 deletions(-) create mode 100644 code/lib/builder-vite/src/utils/process-preview-annotation.ts diff --git a/code/lib/builder-vite/src/codegen-iframe-script.ts b/code/lib/builder-vite/src/codegen-iframe-script.ts index 04e29c1a07f7..0ea7e2e79ca7 100644 --- a/code/lib/builder-vite/src/codegen-iframe-script.ts +++ b/code/lib/builder-vite/src/codegen-iframe-script.ts @@ -2,14 +2,7 @@ import { isAbsolute, resolve } from 'path'; import { getRendererName } from '@storybook/core-common'; import { virtualPreviewFile, virtualStoriesFile } from './virtual-file-names'; import type { ExtendedOptions } from './types'; - -function resolveRelativePath(path: string) { - // resolve relative paths into absolute paths, but don't resolve "bare" imports - if (path?.startsWith('./') || path?.startsWith('../')) { - return resolve(path); - } - return path; -} +import { processPreviewAnnotation } from './utils/process-preview-annotation'; export async function generateIframeScriptCode(options: ExtendedOptions) { const { presets } = options; @@ -22,7 +15,10 @@ export async function generateIframeScriptCode(options: ExtendedOptions) { const absoluteFilesToImport = (files: string[], name: string) => files - .map((el, i) => `import ${name ? `* as ${name}_${i} from ` : ''}'${resolveRelativePath(el)}'`) + .map( + (el, i) => + `import ${name ? `* as ${name}_${i} from ` : ''}'${processPreviewAnnotation(el)}'` + ) .join('\n'); const importArray = (name: string, length: number) => diff --git a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts index 7c9120e6c49a..2136a7b826d7 100644 --- a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts +++ b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts @@ -2,22 +2,21 @@ import { resolve } from 'path'; import { loadPreviewOrConfigFile, getFrameworkName } from '@storybook/core-common'; import { virtualStoriesFile, virtualAddonSetupFile } from './virtual-file-names'; import type { ExtendedOptions } from './types'; +import { processPreviewAnnotation } from './utils/process-preview-annotation'; export async function generateModernIframeScriptCode(options: ExtendedOptions) { const { presets, configDir } = options; const frameworkName = await getFrameworkName(options); const previewOrConfigFile = loadPreviewOrConfigFile({ configDir }); - const previewAnnotations = await presets.apply('previewAnnotations', [], options); + const previewAnnotations = await presets.apply<(string | string[])[]>( + 'previewAnnotations', + [], + options + ); const relativePreviewAnnotations = [...previewAnnotations, previewOrConfigFile] .filter(Boolean) - .map((configEntry) => { - // resolve relative paths into absolute paths, but don't resolve "bare" imports - if (configEntry?.startsWith('./') || configEntry?.startsWith('../')) { - return resolve(configEntry); - } - return configEntry; - }); + .map(processPreviewAnnotation); // eslint-disable-next-line @typescript-eslint/no-shadow const generateHMRHandler = (frameworkName: string): string => { diff --git a/code/lib/builder-vite/src/utils/process-preview-annotation.ts b/code/lib/builder-vite/src/utils/process-preview-annotation.ts new file mode 100644 index 000000000000..6d7c51746453 --- /dev/null +++ b/code/lib/builder-vite/src/utils/process-preview-annotation.ts @@ -0,0 +1,21 @@ +import { resolve } from 'path'; + +/** + * Preview annotations can take several forms, and vite needs them to be a bit more restrained. + * For node_modules, we want bare imports (so vite can process them), and for files in the user's source, + * we want absolute paths. + */ +export function processPreviewAnnotation(path: string | string[] | undefined) { + // If entry is a tuple, take the first, which is the non-absolute path. + // This is so that webpack can use an absolute path (the second item in the tuple), and + // continue supporting super-addons in pnp/pnpm without requiring them to re-export their + // sub-addons as we do in addon-essentials. + if (Array.isArray(path)) { + return path[0]; + } + // resolve relative paths into absolute paths, but don't resolve "bare" imports + if (path?.startsWith('./') || path?.startsWith('../')) { + return resolve(path); + } + return path; +} diff --git a/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts b/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts index ac29c5ad5d95..efc2f555e50b 100644 --- a/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts +++ b/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts @@ -82,7 +82,15 @@ export default async ( const docsOptions = await presets.apply('docs'); const previewAnnotations = [ - ...(await presets.apply('previewAnnotations', [], options)), + ...(await presets.apply('previewAnnotations', [], options)).map((entry) => { + // If entry is a tuple, take the second, which is the absolute path. + // This is to maintain back-compat with community addons that bundle other addons. + // The vite builder uses the first element of the tuple, which is the bare import. + if (Array.isArray(entry)) { + return entry[1]; + } + return entry; + }), loadPreviewOrConfigFile(options), ].filter(Boolean); const entries = (await presets.apply('entries', [], options)) as string[]; diff --git a/code/lib/core-common/src/presets.ts b/code/lib/core-common/src/presets.ts index 8aadd7ad2a6b..0bde5df63641 100644 --- a/code/lib/core-common/src/presets.ts +++ b/code/lib/core-common/src/presets.ts @@ -86,16 +86,19 @@ export const resolveAddonName = ( return undefined; }; - const path = name; + // This is used to maintain back-compat with community addons that do not re-export their sub-addons but reference + // the sub-addon name directly. We need to turn it into an absolute path so that webpack can serve it up correctly + // when yarn pnp or pnpm is being used. Vite will be broken in such cases, because it does not process absolute paths, + // and it will try to import from the bare import, breaking in pnp/pnpm. + const absolutizeExport = (exportName: string) => { + return resolve(`${name}${exportName}`); + }; - // We don't want to resolve an import path (e.g. '@addons/foo/preview') to the file on disk, - // because you are not allowed to import arbitrary files in packages in Vite. - // Instead we check if the export exists and "absolutize" it. - const managerFile = checkExists(`/manager`); - const registerFile = checkExists(`/register`) || checkExists(`/register-panel`); + const managerFile = absolutizeExport(`/manager`); + const registerFile = absolutizeExport(`/register`) || absolutizeExport(`/register-panel`); const previewFile = checkExists(`/preview`); - // Presets are imported by node, so therefore fine to be a path on disk (at this stage anyway) - const presetFile = resolve(`${path}/preset`); + const previewFileAbsolute = absolutizeExport('/preview'); + const presetFile = absolutizeExport(`/preset`); if (!(managerFile || previewFile) && presetFile) { return { @@ -117,9 +120,15 @@ export const resolveAddonName = ( return { type: 'virtual', - name: path, + name, ...(managerEntries.length ? { managerEntries } : {}), - ...(previewFile ? { previewAnnotations: [previewFile] } : {}), + ...(previewFile + ? { + previewAnnotations: [ + previewFileAbsolute ? [previewFile, previewFileAbsolute] : [previewFile], + ], + } + : {}), ...(presetFile ? { presets: [{ name: presetFile, options }] } : {}), }; } diff --git a/code/lib/types/src/modules/core-common.ts b/code/lib/types/src/modules/core-common.ts index 5cc04e9c630e..381cd337ba95 100644 --- a/code/lib/types/src/modules/core-common.ts +++ b/code/lib/types/src/modules/core-common.ts @@ -466,7 +466,7 @@ export interface CoreCommon_ResolvedAddonVirtual { type: 'virtual'; name: string; managerEntries?: string[]; - previewAnnotations?: string[]; + previewAnnotations?: (string | string[])[]; presets?: (string | { name: string; options?: any })[]; } From 5bcd1e38b95a104cd330b4d4e7c5abd720de6b4d Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 8 Nov 2022 10:18:49 -0500 Subject: [PATCH 035/258] Add warning for super-addons not re-exporting their sub-addons --- code/lib/core-common/src/presets.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/code/lib/core-common/src/presets.ts b/code/lib/core-common/src/presets.ts index 0bde5df63641..2de9a4ccce56 100644 --- a/code/lib/core-common/src/presets.ts +++ b/code/lib/core-common/src/presets.ts @@ -136,7 +136,7 @@ export const resolveAddonName = ( if (resolved) { return { type: 'presets', - name: resolved, + name, }; } @@ -201,6 +201,19 @@ export async function loadPreset( const subPresets = resolvePresetFunction(presetsInput, presetOptions, storybookOptions); const subAddons = resolvePresetFunction(addonsInput, presetOptions, storybookOptions); + // Addons that specify different sub-addons are a problem for vite with yarn pnp and pnpm + // Alert the user if an addon is using this pattern. We aren't positive what the final solution will be, + // maybe re-exporting as we do in addon-essentials, maybe something else. For now, we just want to add awareness. + if ( + !name.startsWith('/') && + subAddons.length && + subAddons.some((subAddon) => !subAddon.startsWith('/') && !subAddon.startsWith(name)) + ) { + console.warn( + `Storybook addons that reference sub-addons by name are deprecated, but will continue to work in 7.0. Please check ${name}.` + ); + } + return [ ...(await loadPresets([...subPresets], level + 1, storybookOptions)), ...(await loadPresets( From 4931ec82bbf6d0800fe73fb9a695406679aa6c3a Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 8 Nov 2022 10:30:09 -0500 Subject: [PATCH 036/258] Fix deepscan --- code/lib/builder-vite/src/codegen-modern-iframe-script.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts index 2136a7b826d7..82ea182f2c2f 100644 --- a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts +++ b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts @@ -1,4 +1,3 @@ -import { resolve } from 'path'; import { loadPreviewOrConfigFile, getFrameworkName } from '@storybook/core-common'; import { virtualStoriesFile, virtualAddonSetupFile } from './virtual-file-names'; import type { ExtendedOptions } from './types'; From deb3b3512d2ec5ff1aa104ff6e57576ce409452f Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 8 Nov 2022 11:15:59 -0500 Subject: [PATCH 037/258] Remove warning --- code/lib/core-common/src/presets.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/code/lib/core-common/src/presets.ts b/code/lib/core-common/src/presets.ts index 2de9a4ccce56..fbb0052b31a3 100644 --- a/code/lib/core-common/src/presets.ts +++ b/code/lib/core-common/src/presets.ts @@ -136,7 +136,7 @@ export const resolveAddonName = ( if (resolved) { return { type: 'presets', - name, + name: resolved, }; } @@ -201,19 +201,6 @@ export async function loadPreset( const subPresets = resolvePresetFunction(presetsInput, presetOptions, storybookOptions); const subAddons = resolvePresetFunction(addonsInput, presetOptions, storybookOptions); - // Addons that specify different sub-addons are a problem for vite with yarn pnp and pnpm - // Alert the user if an addon is using this pattern. We aren't positive what the final solution will be, - // maybe re-exporting as we do in addon-essentials, maybe something else. For now, we just want to add awareness. - if ( - !name.startsWith('/') && - subAddons.length && - subAddons.some((subAddon) => !subAddon.startsWith('/') && !subAddon.startsWith(name)) - ) { - console.warn( - `Storybook addons that reference sub-addons by name are deprecated, but will continue to work in 7.0. Please check ${name}.` - ); - } - return [ ...(await loadPresets([...subPresets], level + 1, storybookOptions)), ...(await loadPresets( @@ -240,7 +227,7 @@ export async function loadPreset( logger.warn(warning); logger.error(e); - + console.log('something went terribly wrong', e); return []; } } From 4e15f69a039cfff38917d24354962d09b07e11cb Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 8 Nov 2022 17:01:35 -0500 Subject: [PATCH 038/258] Fix addon handling in SSv6 --- code/lib/builder-vite/src/codegen-iframe-script.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/code/lib/builder-vite/src/codegen-iframe-script.ts b/code/lib/builder-vite/src/codegen-iframe-script.ts index 18888a1b8c63..f81dc1ace576 100644 --- a/code/lib/builder-vite/src/codegen-iframe-script.ts +++ b/code/lib/builder-vite/src/codegen-iframe-script.ts @@ -1,5 +1,4 @@ -import { isAbsolute, resolve } from 'path'; -import { getRendererName } from '@storybook/core-common'; +import { getRendererName, getFrameworkName } from '@storybook/core-common'; import { virtualPreviewFile, virtualStoriesFile } from './virtual-file-names'; import type { ExtendedOptions } from './types'; import { processPreviewAnnotation } from './utils/process-preview-annotation'; @@ -8,12 +7,9 @@ export async function generateIframeScriptCode(options: ExtendedOptions) { const { presets } = options; const rendererName = await getRendererName(options); const previewAnnotations = await presets.apply('previewAnnotations', [], options); - const resolvedPreviewAnnotations = previewAnnotations.map((entry) => - isAbsolute(entry) ? entry : resolve(entry) - ); - const configEntries = [...resolvedPreviewAnnotations].filter(Boolean); + const configEntries = [...previewAnnotations].filter(Boolean); - const absoluteFilesToImport = (files: string[], name: string) => + const filesToImport = (files: string[], name: string) => files .map( (el, i) => @@ -34,7 +30,7 @@ export async function generateIframeScriptCode(options: ExtendedOptions) { import * as clientApi from "@storybook/client-api"; import { logger } from '@storybook/client-logger'; - ${absoluteFilesToImport(configEntries, 'config')} + ${filesToImport(configEntries, 'config')} import * as preview from '${virtualPreviewFile}'; import { configStories } from '${virtualStoriesFile}'; From 0813b241bc66c5f1a81e9d8578140f5a6546e2ef Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 8 Nov 2022 17:20:48 -0500 Subject: [PATCH 039/258] Fix pnpm storybook module imports for SSv6 --- code/frameworks/react-vite/src/index.ts | 7 ++++++- code/frameworks/svelte-vite/src/index.ts | 7 ++++++- code/frameworks/vue-vite/src/index.ts | 7 ++++++- code/frameworks/vue3-vite/src/index.ts | 7 ++++++- code/frameworks/web-components-vite/src/index.ts | 7 ++++++- code/lib/builder-vite/src/codegen-iframe-script.ts | 6 +++--- 6 files changed, 33 insertions(+), 8 deletions(-) diff --git a/code/frameworks/react-vite/src/index.ts b/code/frameworks/react-vite/src/index.ts index 8fbdfff5e6e2..067a9d564f75 100644 --- a/code/frameworks/react-vite/src/index.ts +++ b/code/frameworks/react-vite/src/index.ts @@ -1,8 +1,13 @@ // exports for builder-vite +import * as clientApi from '@storybook/client-api'; + +// client-api exposes both a class, and individual named exports. +// The class is used in StoryStoreV7 and the individual exports in SSv6 +const { ClientApi } = clientApi; export { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; export { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; export { addons } from '@storybook/addons'; export { composeConfigs, PreviewWeb } from '@storybook/preview-web'; -export { ClientApi } from '@storybook/client-api'; +export { clientApi, ClientApi }; export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/svelte-vite/src/index.ts b/code/frameworks/svelte-vite/src/index.ts index 8fbdfff5e6e2..067a9d564f75 100644 --- a/code/frameworks/svelte-vite/src/index.ts +++ b/code/frameworks/svelte-vite/src/index.ts @@ -1,8 +1,13 @@ // exports for builder-vite +import * as clientApi from '@storybook/client-api'; + +// client-api exposes both a class, and individual named exports. +// The class is used in StoryStoreV7 and the individual exports in SSv6 +const { ClientApi } = clientApi; export { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; export { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; export { addons } from '@storybook/addons'; export { composeConfigs, PreviewWeb } from '@storybook/preview-web'; -export { ClientApi } from '@storybook/client-api'; +export { clientApi, ClientApi }; export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/vue-vite/src/index.ts b/code/frameworks/vue-vite/src/index.ts index 8fbdfff5e6e2..067a9d564f75 100644 --- a/code/frameworks/vue-vite/src/index.ts +++ b/code/frameworks/vue-vite/src/index.ts @@ -1,8 +1,13 @@ // exports for builder-vite +import * as clientApi from '@storybook/client-api'; + +// client-api exposes both a class, and individual named exports. +// The class is used in StoryStoreV7 and the individual exports in SSv6 +const { ClientApi } = clientApi; export { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; export { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; export { addons } from '@storybook/addons'; export { composeConfigs, PreviewWeb } from '@storybook/preview-web'; -export { ClientApi } from '@storybook/client-api'; +export { clientApi, ClientApi }; export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/vue3-vite/src/index.ts b/code/frameworks/vue3-vite/src/index.ts index 8fbdfff5e6e2..067a9d564f75 100644 --- a/code/frameworks/vue3-vite/src/index.ts +++ b/code/frameworks/vue3-vite/src/index.ts @@ -1,8 +1,13 @@ // exports for builder-vite +import * as clientApi from '@storybook/client-api'; + +// client-api exposes both a class, and individual named exports. +// The class is used in StoryStoreV7 and the individual exports in SSv6 +const { ClientApi } = clientApi; export { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; export { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; export { addons } from '@storybook/addons'; export { composeConfigs, PreviewWeb } from '@storybook/preview-web'; -export { ClientApi } from '@storybook/client-api'; +export { clientApi, ClientApi }; export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/web-components-vite/src/index.ts b/code/frameworks/web-components-vite/src/index.ts index 8fbdfff5e6e2..067a9d564f75 100644 --- a/code/frameworks/web-components-vite/src/index.ts +++ b/code/frameworks/web-components-vite/src/index.ts @@ -1,8 +1,13 @@ // exports for builder-vite +import * as clientApi from '@storybook/client-api'; + +// client-api exposes both a class, and individual named exports. +// The class is used in StoryStoreV7 and the individual exports in SSv6 +const { ClientApi } = clientApi; export { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; export { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; export { addons } from '@storybook/addons'; export { composeConfigs, PreviewWeb } from '@storybook/preview-web'; -export { ClientApi } from '@storybook/client-api'; +export { clientApi, ClientApi }; export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/lib/builder-vite/src/codegen-iframe-script.ts b/code/lib/builder-vite/src/codegen-iframe-script.ts index f81dc1ace576..6df6d55d22cc 100644 --- a/code/lib/builder-vite/src/codegen-iframe-script.ts +++ b/code/lib/builder-vite/src/codegen-iframe-script.ts @@ -6,6 +6,8 @@ import { processPreviewAnnotation } from './utils/process-preview-annotation'; export async function generateIframeScriptCode(options: ExtendedOptions) { const { presets } = options; const rendererName = await getRendererName(options); + const frameworkName = await getFrameworkName(options); + const previewAnnotations = await presets.apply('previewAnnotations', [], options); const configEntries = [...previewAnnotations].filter(Boolean); @@ -27,9 +29,7 @@ export async function generateIframeScriptCode(options: ExtendedOptions) { // Ensure that the client API is initialized by the framework before any other iframe code // is loaded. That way our client-apis can assume the existence of the API+store import { configure } from '${rendererName}'; - - import * as clientApi from "@storybook/client-api"; - import { logger } from '@storybook/client-logger'; + import { clientApi } from '${frameworkName}'; ${filesToImport(configEntries, 'config')} import * as preview from '${virtualPreviewFile}'; import { configStories } from '${virtualStoriesFile}'; From 0428198fa66dee4776c36f6ce6386a42d48e757f Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 8 Nov 2022 17:21:56 -0500 Subject: [PATCH 040/258] Remove errant console.log --- code/lib/core-common/src/presets.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/code/lib/core-common/src/presets.ts b/code/lib/core-common/src/presets.ts index fbb0052b31a3..48151ad7d55e 100644 --- a/code/lib/core-common/src/presets.ts +++ b/code/lib/core-common/src/presets.ts @@ -227,7 +227,6 @@ export async function loadPreset( logger.warn(warning); logger.error(e); - console.log('something went terribly wrong', e); return []; } } From 9d9a92d78aa37092d39bc12f2e44ffd8ae53ce77 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 8 Nov 2022 19:21:27 -0500 Subject: [PATCH 041/258] Use an object instead of tuple for previewAnnotations --- .../builder-vite/src/codegen-iframe-script.ts | 16 +++++----- .../src/codegen-modern-iframe-script.ts | 3 +- .../src/utils/process-preview-annotation.ts | 30 +++++++++++++------ .../src/preview/iframe-webpack.config.ts | 21 +++++++------ code/lib/core-common/src/presets.ts | 12 +++++--- code/lib/types/src/modules/core-common.ts | 4 ++- 6 files changed, 54 insertions(+), 32 deletions(-) diff --git a/code/lib/builder-vite/src/codegen-iframe-script.ts b/code/lib/builder-vite/src/codegen-iframe-script.ts index 6df6d55d22cc..fdfe0249bce5 100644 --- a/code/lib/builder-vite/src/codegen-iframe-script.ts +++ b/code/lib/builder-vite/src/codegen-iframe-script.ts @@ -1,4 +1,5 @@ import { getRendererName, getFrameworkName } from '@storybook/core-common'; +import type { PreviewAnnotation } from '@storybook/types'; import { virtualPreviewFile, virtualStoriesFile } from './virtual-file-names'; import type { ExtendedOptions } from './types'; import { processPreviewAnnotation } from './utils/process-preview-annotation'; @@ -8,16 +9,15 @@ export async function generateIframeScriptCode(options: ExtendedOptions) { const rendererName = await getRendererName(options); const frameworkName = await getFrameworkName(options); - const previewAnnotations = await presets.apply('previewAnnotations', [], options); - const configEntries = [...previewAnnotations].filter(Boolean); + const previewAnnotations = await presets.apply( + 'previewAnnotations', + [], + options + ); + const configEntries = [...previewAnnotations].filter(Boolean).map(processPreviewAnnotation); const filesToImport = (files: string[], name: string) => - files - .map( - (el, i) => - `import ${name ? `* as ${name}_${i} from ` : ''}'${processPreviewAnnotation(el)}'` - ) - .join('\n'); + files.map((el, i) => `import ${name ? `* as ${name}_${i} from ` : ''}'${el}'`).join('\n'); const importArray = (name: string, length: number) => new Array(length).fill(0).map((_, i) => `${name}_${i}`); diff --git a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts index 82ea182f2c2f..c1c7aa6a4444 100644 --- a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts +++ b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts @@ -1,4 +1,5 @@ import { loadPreviewOrConfigFile, getFrameworkName } from '@storybook/core-common'; +import type { PreviewAnnotation } from '@storybook/types'; import { virtualStoriesFile, virtualAddonSetupFile } from './virtual-file-names'; import type { ExtendedOptions } from './types'; import { processPreviewAnnotation } from './utils/process-preview-annotation'; @@ -8,7 +9,7 @@ export async function generateModernIframeScriptCode(options: ExtendedOptions) { const frameworkName = await getFrameworkName(options); const previewOrConfigFile = loadPreviewOrConfigFile({ configDir }); - const previewAnnotations = await presets.apply<(string | string[])[]>( + const previewAnnotations = await presets.apply( 'previewAnnotations', [], options diff --git a/code/lib/builder-vite/src/utils/process-preview-annotation.ts b/code/lib/builder-vite/src/utils/process-preview-annotation.ts index 6d7c51746453..ecf811293ce5 100644 --- a/code/lib/builder-vite/src/utils/process-preview-annotation.ts +++ b/code/lib/builder-vite/src/utils/process-preview-annotation.ts @@ -1,21 +1,33 @@ +import type { PreviewAnnotation } from '@storybook/types'; import { resolve } from 'path'; /** - * Preview annotations can take several forms, and vite needs them to be a bit more restrained. - * For node_modules, we want bare imports (so vite can process them), and for files in the user's source, + * Preview annotations can take several forms, and vite needs them to be + * a bit more restrained. + * + * For node_modules, we want bare imports (so vite can process them), + * and for files in the user's source, * we want absolute paths. */ -export function processPreviewAnnotation(path: string | string[] | undefined) { - // If entry is a tuple, take the first, which is the non-absolute path. - // This is so that webpack can use an absolute path (the second item in the tuple), and - // continue supporting super-addons in pnp/pnpm without requiring them to re-export their - // sub-addons as we do in addon-essentials. - if (Array.isArray(path)) { - return path[0]; +export function processPreviewAnnotation(path: PreviewAnnotation | undefined) { + // If entry is an object, take the first, which is the + // bare (non-absolute) specifier. + // This is so that webpack can use an absolute path, and + // continue supporting super-addons in pnp/pnpm without + // requiring them to re-export their sub-addons as we do + // in addon-essentials. + if (typeof path === 'object') { + return path.bare; } // resolve relative paths into absolute paths, but don't resolve "bare" imports if (path?.startsWith('./') || path?.startsWith('../')) { return resolve(path); } + // This should not occur, since we use `.filter(Boolean)` prior to + // calling this function, but this makes typescript happy + if (!path) { + throw new Error('Could not determine path for previewAnnotation'); + } + return path; } diff --git a/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts b/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts index efc2f555e50b..a16e9ba8c91e 100644 --- a/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts +++ b/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts @@ -7,7 +7,7 @@ import TerserWebpackPlugin from 'terser-webpack-plugin'; import VirtualModulePlugin from 'webpack-virtual-modules'; import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; -import type { Options, CoreConfig, DocsOptions } from '@storybook/types'; +import type { Options, CoreConfig, DocsOptions, PreviewAnnotation } from '@storybook/types'; import { getRendererName, stringifyProcessEnvs, @@ -82,15 +82,18 @@ export default async ( const docsOptions = await presets.apply('docs'); const previewAnnotations = [ - ...(await presets.apply('previewAnnotations', [], options)).map((entry) => { - // If entry is a tuple, take the second, which is the absolute path. - // This is to maintain back-compat with community addons that bundle other addons. - // The vite builder uses the first element of the tuple, which is the bare import. - if (Array.isArray(entry)) { - return entry[1]; + ...(await presets.apply('previewAnnotations', [], options)).map( + (entry) => { + // If entry is an object, use the absolute import specifier. + // This is to maintain back-compat with community addons that bundle other addons + // and package managers that "hide" sub dependencies (e.g. pnpm / yarn pnp) + // The vite builder uses the bare import specifier. + if (typeof entry === 'object') { + return entry.absolute; + } + return entry; } - return entry; - }), + ), loadPreviewOrConfigFile(options), ].filter(Boolean); const entries = (await presets.apply('entries', [], options)) as string[]; diff --git a/code/lib/core-common/src/presets.ts b/code/lib/core-common/src/presets.ts index 48151ad7d55e..7a3f2ba529ff 100644 --- a/code/lib/core-common/src/presets.ts +++ b/code/lib/core-common/src/presets.ts @@ -86,9 +86,11 @@ export const resolveAddonName = ( return undefined; }; - // This is used to maintain back-compat with community addons that do not re-export their sub-addons but reference - // the sub-addon name directly. We need to turn it into an absolute path so that webpack can serve it up correctly - // when yarn pnp or pnpm is being used. Vite will be broken in such cases, because it does not process absolute paths, + // This is used to maintain back-compat with community addons that do not + // re-export their sub-addons but reference the sub-addon name directly. + // We need to turn it into an absolute path so that webpack can + // serve it up correctly when yarn pnp or pnpm is being used. + // Vite will be broken in such cases, because it does not process absolute paths, // and it will try to import from the bare import, breaking in pnp/pnpm. const absolutizeExport = (exportName: string) => { return resolve(`${name}${exportName}`); @@ -125,7 +127,9 @@ export const resolveAddonName = ( ...(previewFile ? { previewAnnotations: [ - previewFileAbsolute ? [previewFile, previewFileAbsolute] : [previewFile], + previewFileAbsolute + ? { bare: previewFile, absolute: previewFileAbsolute } + : previewFile, ], } : {}), diff --git a/code/lib/types/src/modules/core-common.ts b/code/lib/types/src/modules/core-common.ts index 381cd337ba95..c18b53afb1a7 100644 --- a/code/lib/types/src/modules/core-common.ts +++ b/code/lib/types/src/modules/core-common.ts @@ -462,11 +462,13 @@ export interface CoreCommon_ResolvedAddonPreset { name: string; } +export type PreviewAnnotation = string | { bare: string; absolute: string }; + export interface CoreCommon_ResolvedAddonVirtual { type: 'virtual'; name: string; managerEntries?: string[]; - previewAnnotations?: (string | string[])[]; + previewAnnotations?: PreviewAnnotation[]; presets?: (string | { name: string; options?: any })[]; } From 11414a72cd8598bae3500a80b68a77440070c2c6 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Wed, 9 Nov 2022 09:27:06 +0100 Subject: [PATCH 042/258] improve junit feedback for abritary code errors --- scripts/task.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/task.ts b/scripts/task.ts index cb8d9412e6e6..b40697dac358 100644 --- a/scripts/task.ts +++ b/scripts/task.ts @@ -177,11 +177,18 @@ async function writeJunitXml( taskKey: TaskKey, templateKey: TemplateKey, startTime: Date, - err?: Error + err?: Error, + systemError?: boolean ) { + let errorData = {}; + if (err) { + // we want to distinguish whether the error comes from the tests we are running or from arbitrary code + errorData = systemError ? { systemErr: [err.stack] } : { errors: [err] }; + } + const name = `${taskKey} - ${templateKey}`; const time = (Date.now() - +startTime) / 1000; - const testCase = { name, assertions: 1, time, ...(err && { errors: [err] }) }; + const testCase = { name, assertions: 1, time, ...errorData }; const suite = { name, timestamp: startTime, time, testCases: [testCase] }; const junitXml = getJunitXml({ time, name, suites: [suite] }); const path = getJunitFilename(taskKey); @@ -282,7 +289,7 @@ async function runTask(task: Task, details: TemplateDetails, optionValues: Passe const hasJunitFile = await pathExists(junitFilename); // If there's a non-test related error (junit report has not been reported already), we report the general failure in a junit report if (junitFilename && !hasJunitFile) { - await writeJunitXml(getTaskKey(task), details.key, startTime, err); + await writeJunitXml(getTaskKey(task), details.key, startTime, err, true); } throw err; From b477e759745fdd929c562b8a98fa3ca2b7afdb9e Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Wed, 9 Nov 2022 10:27:03 +0100 Subject: [PATCH 043/258] force an error for test purposes --- scripts/tasks/build.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/tasks/build.ts b/scripts/tasks/build.ts index 8f6acedc2322..18c27e7c5784 100644 --- a/scripts/tasks/build.ts +++ b/scripts/tasks/build.ts @@ -9,6 +9,7 @@ export const build: Task = { return pathExists(builtSandboxDir); }, async run({ sandboxDir }, { dryRun, debug }) { + throw new Error('Problems!'); return exec(`yarn build-storybook --quiet`, { cwd: sandboxDir }, { dryRun, debug }); }, }; From 947b0c349f5890c1d3d42384d1c8f8ee73c24664 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Wed, 9 Nov 2022 10:58:11 +0100 Subject: [PATCH 044/258] switch from systemError to just error with a stack --- scripts/task.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/task.ts b/scripts/task.ts index b40697dac358..b65b7372e926 100644 --- a/scripts/task.ts +++ b/scripts/task.ts @@ -183,7 +183,7 @@ async function writeJunitXml( let errorData = {}; if (err) { // we want to distinguish whether the error comes from the tests we are running or from arbitrary code - errorData = systemError ? { systemErr: [err.stack] } : { errors: [err] }; + errorData = systemError ? { errors: [{ message: err.stack }] } : { errors: [err] }; } const name = `${taskKey} - ${templateKey}`; From e796e2f59abaa5da57487adf05f68238ac54a91e Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Wed, 9 Nov 2022 11:13:51 +0100 Subject: [PATCH 045/258] remove artificial error --- scripts/tasks/build.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/tasks/build.ts b/scripts/tasks/build.ts index 18c27e7c5784..8f6acedc2322 100644 --- a/scripts/tasks/build.ts +++ b/scripts/tasks/build.ts @@ -9,7 +9,6 @@ export const build: Task = { return pathExists(builtSandboxDir); }, async run({ sandboxDir }, { dryRun, debug }) { - throw new Error('Problems!'); return exec(`yarn build-storybook --quiet`, { cwd: sandboxDir }, { dryRun, debug }); }, }; From bc47cc4ff1b05115360d0b0a7d0c69a5079c2b04 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 9 Nov 2022 15:27:38 +0100 Subject: [PATCH 046/258] convert addon-docs to use ts-up --- code/addons/docs/package.json | 45 ++++++++++++++----- code/addons/docs/preset.js | 2 +- code/addons/docs/preview.js | 2 +- code/addons/docs/src/DocsRenderer.tsx | 1 + code/addons/docs/src/blocks.ts | 1 - code/addons/docs/src/index.ts | 2 +- code/addons/docs/src/shared.ts | 28 ------------ code/addons/essentials/package.json | 38 ---------------- code/ui/blocks/package.json | 22 +++++---- code/ui/blocks/src/blocks/Heading.tsx | 2 +- code/ui/blocks/src/blocks/Subheading.tsx | 2 +- code/ui/blocks/src/blocks/enhanceSource.ts | 5 +-- .../src/blocks/external/ExternalPreview.ts | 2 +- code/ui/blocks/src/blocks/mdx.tsx | 2 +- .../src/components/ArgsTable/ArgJsDoc.tsx | 2 +- .../src/components/ArgsTable/ArgRow.tsx | 6 +-- .../src/components/ArgsTable/ArgValue.tsx | 2 +- .../src/components/ArgsTable/ArgsTable.tsx | 4 +- .../ArgsTable/NoControlsWarning.tsx | 2 +- .../src/components/ArgsTable/SectionRow.tsx | 4 +- .../components/ArgsTable/TabbedArgsTable.tsx | 2 +- .../ui/blocks/src/components/ColorPalette.tsx | 4 +- code/ui/blocks/src/components/Description.tsx | 4 +- code/ui/blocks/src/components/DocsPage.tsx | 4 +- code/ui/blocks/src/components/EmptyBlock.tsx | 4 +- code/ui/blocks/src/components/IconGallery.tsx | 2 +- code/ui/blocks/src/components/Preview.tsx | 6 +-- code/ui/blocks/src/components/Source.tsx | 2 +- code/ui/blocks/src/components/Story.tsx | 2 +- code/ui/blocks/src/components/Title.tsx | 2 +- code/ui/blocks/src/components/Toolbar.tsx | 1 + code/ui/blocks/src/components/Typeset.tsx | 4 +- code/ui/blocks/src/controls/Boolean.tsx | 4 +- code/ui/blocks/src/controls/Color.tsx | 6 +-- code/ui/blocks/src/controls/Date.tsx | 2 +- code/ui/blocks/src/controls/Files.tsx | 2 +- code/ui/blocks/src/controls/Number.tsx | 2 +- code/ui/blocks/src/controls/Object.tsx | 2 +- code/ui/blocks/src/controls/Range.tsx | 2 +- code/ui/blocks/src/controls/Text.tsx | 2 +- .../ui/blocks/src/controls/options/Select.tsx | 2 +- .../react-editable-json-tree/JsonNodes.tsx | 6 --- 42 files changed, 94 insertions(+), 147 deletions(-) delete mode 100644 code/addons/docs/src/blocks.ts delete mode 100644 code/addons/docs/src/shared.ts diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 912874857cd0..4f927a07d114 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -24,9 +24,31 @@ "url": "https://opencollective.com/storybook" }, "license": "MIT", - "main": "dist/cjs/index.js", - "module": "dist/esm/index.js", - "types": "dist/types/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./svelte/HOC.svelte": "./svelte/HOC.svelte", + "./ember/index.js": "./ember/index.js", + "./web-components/index.js": "./web-components/index.js", + "./jest-transform-mdx.js": "./jest-transform-mdx.js", + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", "files": [ "dist/**/*", "angular/**/*", @@ -46,29 +68,21 @@ ], "scripts": { "check": "../../../scripts/node_modules/.bin/tsc --noEmit", - "prep": "node ../../../scripts/prepare.js" + "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { "@babel/plugin-transform-react-jsx": "^7.12.12", "@jest/transform": "^26.6.2", "@mdx-js/react": "^2.1.5", - "@storybook/addons": "7.0.0-alpha.48", - "@storybook/api": "7.0.0-alpha.48", "@storybook/blocks": "7.0.0-alpha.48", "@storybook/components": "7.0.0-alpha.48", - "@storybook/core-common": "7.0.0-alpha.48", - "@storybook/core-events": "7.0.0-alpha.48", "@storybook/csf-plugin": "7.0.0-alpha.48", "@storybook/csf-tools": "7.0.0-alpha.48", - "@storybook/docs-tools": "7.0.0-alpha.48", "@storybook/mdx2-csf": "next", "@storybook/node-logger": "7.0.0-alpha.48", "@storybook/postinstall": "7.0.0-alpha.48", "@storybook/preview-web": "7.0.0-alpha.48", - "@storybook/store": "7.0.0-alpha.48", - "@storybook/theming": "7.0.0-alpha.48", "@storybook/types": "7.0.0-alpha.48", - "dequal": "^2.0.2", "fs-extra": "^9.0.1", "global": "^4.4.0", "remark-external-links": "^8.0.0", @@ -94,6 +108,13 @@ "publishConfig": { "access": "public" }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts", + "./src/preview.ts" + ] + }, "gitHead": "b58a29b785462f8a8b711b6bb2d7223fd6dc17fd", "storybook": { "displayName": "Docs", diff --git a/code/addons/docs/preset.js b/code/addons/docs/preset.js index e45ac5b4cec0..a83f95279e7f 100644 --- a/code/addons/docs/preset.js +++ b/code/addons/docs/preset.js @@ -1 +1 @@ -module.exports = require('./dist/cjs/preset'); +module.exports = require('./dist/preset'); diff --git a/code/addons/docs/preview.js b/code/addons/docs/preview.js index e726cab5a1b6..49ad602f79f4 100644 --- a/code/addons/docs/preview.js +++ b/code/addons/docs/preview.js @@ -1 +1 @@ -export * from './dist/esm/preview'; +export * from './dist/preview'; diff --git a/code/addons/docs/src/DocsRenderer.tsx b/code/addons/docs/src/DocsRenderer.tsx index fb55fcb33f06..7da390037fc1 100644 --- a/code/addons/docs/src/DocsRenderer.tsx +++ b/code/addons/docs/src/DocsRenderer.tsx @@ -33,6 +33,7 @@ export class DocsRenderer { ...defaultComponents, ...docsParameter?.components, }; + ReactDOM.render( diff --git a/code/addons/docs/src/blocks.ts b/code/addons/docs/src/blocks.ts deleted file mode 100644 index 119f7ce62757..000000000000 --- a/code/addons/docs/src/blocks.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '@storybook/blocks'; diff --git a/code/addons/docs/src/index.ts b/code/addons/docs/src/index.ts index 807e2656e5b8..b74399955f12 100644 --- a/code/addons/docs/src/index.ts +++ b/code/addons/docs/src/index.ts @@ -1,2 +1,2 @@ -export * from './blocks'; +export * from '@storybook/blocks'; export { DocsRenderer } from './DocsRenderer'; diff --git a/code/addons/docs/src/shared.ts b/code/addons/docs/src/shared.ts deleted file mode 100644 index 178bf46ca387..000000000000 --- a/code/addons/docs/src/shared.ts +++ /dev/null @@ -1,28 +0,0 @@ -export const ADDON_ID = 'storybook/docs'; -export const PANEL_ID = `${ADDON_ID}/panel`; -export const PARAM_KEY = `docs`; - -export const SNIPPET_RENDERED = `${ADDON_ID}/snippet-rendered`; - -export enum SourceType { - /** - * AUTO is the default - * - * Use the CODE logic if: - * - the user has set a custom source snippet in `docs.source.code` story parameter - * - the story is not an args-based story - * - * Use the DYNAMIC rendered snippet if the story is an args story - */ - AUTO = 'auto', - - /** - * Render the code extracted by source-loader - */ - CODE = 'code', - - /** - * Render dynamically-rendered source snippet from the story's virtual DOM (currently React only) - */ - DYNAMIC = 'dynamic', -} diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json index 7445ad9c83d3..8fbdf1b5fda0 100644 --- a/code/addons/essentials/package.json +++ b/code/addons/essentials/package.json @@ -65,44 +65,6 @@ "peerDependencies": { "@babel/core": "^7.9.6" }, - "peerDependenciesMeta": { - "@storybook/angular": { - "optional": true - }, - "@storybook/html": { - "optional": true - }, - "@storybook/vue": { - "optional": true - }, - "@storybook/vue3": { - "optional": true - }, - "@storybook/web-components": { - "optional": true - }, - "lit": { - "optional": true - }, - "lit-html": { - "optional": true - }, - "react": { - "optional": true - }, - "react-dom": { - "optional": true - }, - "svelte": { - "optional": true - }, - "sveltedoc-parser": { - "optional": true - }, - "vue": { - "optional": true - } - }, "publishConfig": { "access": "public" }, diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index cc047e6a9a3e..fbab6e9ef3ad 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -38,13 +38,12 @@ "*.d.ts" ], "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { - "@storybook/api": "7.0.0-alpha.48", "@storybook/channels": "7.0.0-alpha.48", "@storybook/client-logger": "7.0.0-alpha.48", - "@storybook/components": "7.0.0-alpha.48", "@storybook/core-events": "7.0.0-alpha.48", "@storybook/csf": "next", "@storybook/docs-tools": "7.0.0-alpha.48", @@ -53,24 +52,23 @@ "@storybook/theming": "7.0.0-alpha.48", "@storybook/types": "7.0.0-alpha.48", "@types/lodash": "^4.14.167", - "color-convert": "^2.0.1", "dequal": "^2.0.2", "global": "^4.4.0", "lodash": "^4.17.21", - "markdown-to-jsx": "^7.1.3", - "memoizerific": "^1.11.3", - "polished": "^4.2.2", - "react-colorful": "^5.1.2", - "ts-dedent": "^2.0.0", - "util-deprecate": "^1.0.2" + "memoizerific": "^1.11.3" }, "devDependencies": { "@storybook/addon-actions": "7.0.0-alpha.48", - "@storybook/addons": "7.0.0-alpha.48", - "@types/color-convert": "^2.0.0" + "@storybook/components": "7.0.0-alpha.48", + "@types/color-convert": "^2.0.0", + "color-convert": "^2.0.1", + "markdown-to-jsx": "^7.1.3", + "polished": "^4.2.2", + "react-colorful": "^5.1.2" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" }, "publishConfig": { "access": "public" diff --git a/code/ui/blocks/src/blocks/Heading.tsx b/code/ui/blocks/src/blocks/Heading.tsx index 8f2535fc3d44..351680e53c57 100644 --- a/code/ui/blocks/src/blocks/Heading.tsx +++ b/code/ui/blocks/src/blocks/Heading.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import React from 'react'; -import { H2 } from '@storybook/components'; +import { H2 } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { HeaderMdx } from './mdx'; export interface HeadingProps { diff --git a/code/ui/blocks/src/blocks/Subheading.tsx b/code/ui/blocks/src/blocks/Subheading.tsx index 857facdda25f..026d92244905 100644 --- a/code/ui/blocks/src/blocks/Subheading.tsx +++ b/code/ui/blocks/src/blocks/Subheading.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import React from 'react'; -import { H3 } from '@storybook/components'; +import { H3 } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { HeaderMdx } from './mdx'; import type { HeadingProps } from './Heading'; diff --git a/code/ui/blocks/src/blocks/enhanceSource.ts b/code/ui/blocks/src/blocks/enhanceSource.ts index 704d36abdba9..05d912f8e81e 100644 --- a/code/ui/blocks/src/blocks/enhanceSource.ts +++ b/code/ui/blocks/src/blocks/enhanceSource.ts @@ -1,5 +1,4 @@ -import type { Parameters } from '@storybook/types'; -import type { Story } from '@storybook/store'; +import type { Parameters, Store_Story } from '@storybook/types'; import { combineParameters } from '@storybook/store'; // ============================================================ @@ -77,7 +76,7 @@ const extract = (targetId: string, { source, locationsMap }: StorySource) => { return extractSource(location, lines); }; -export const enhanceSource = (story: Story): Parameters => { +export const enhanceSource = (story: Store_Story): Parameters => { const { id, parameters } = story; const { storySource, docs = {} } = parameters; const { transformSource } = docs; diff --git a/code/ui/blocks/src/blocks/external/ExternalPreview.ts b/code/ui/blocks/src/blocks/external/ExternalPreview.ts index 3f11aa9bdf46..2c9955af00d4 100644 --- a/code/ui/blocks/src/blocks/external/ExternalPreview.ts +++ b/code/ui/blocks/src/blocks/external/ExternalPreview.ts @@ -36,7 +36,7 @@ export class ExternalPreview extends P private moduleExportsByImportPath: Record = {}; - constructor(public projectAnnotations: ProjectAnnotations) { + constructor(public projectAnnotations: ProjectAnnotations) { super(new Channel()); this.initialize({ diff --git a/code/ui/blocks/src/blocks/mdx.tsx b/code/ui/blocks/src/blocks/mdx.tsx index c7e14328a6ac..a0f66b528465 100644 --- a/code/ui/blocks/src/blocks/mdx.tsx +++ b/code/ui/blocks/src/blocks/mdx.tsx @@ -1,7 +1,7 @@ import type { FC, SyntheticEvent } from 'react'; import React, { useContext } from 'react'; import { NAVIGATE_URL } from '@storybook/core-events'; -import { Code, components } from '@storybook/components'; +import { Code, components } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import global from 'global'; import { styled } from '@storybook/theming'; import { Source } from '../components'; diff --git a/code/ui/blocks/src/components/ArgsTable/ArgJsDoc.tsx b/code/ui/blocks/src/components/ArgsTable/ArgJsDoc.tsx index 2533f06842aa..1609bf8616d3 100644 --- a/code/ui/blocks/src/components/ArgsTable/ArgJsDoc.tsx +++ b/code/ui/blocks/src/components/ArgsTable/ArgJsDoc.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import React from 'react'; import { styled } from '@storybook/theming'; -import { codeCommon } from '@storybook/components'; +import { codeCommon } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import type { JsDocTags } from './types'; interface ArgJsDocArgs { diff --git a/code/ui/blocks/src/components/ArgsTable/ArgRow.tsx b/code/ui/blocks/src/components/ArgsTable/ArgRow.tsx index ea5f856c0027..1bc6a19ac0a5 100644 --- a/code/ui/blocks/src/components/ArgsTable/ArgRow.tsx +++ b/code/ui/blocks/src/components/ArgsTable/ArgRow.tsx @@ -1,9 +1,9 @@ import type { FC } from 'react'; import React from 'react'; -import Markdown from 'markdown-to-jsx'; -import { transparentize } from 'polished'; +import Markdown from 'markdown-to-jsx'; // eslint-disable-line import/no-extraneous-dependencies +import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies import { styled } from '@storybook/theming'; -import { codeCommon } from '@storybook/components'; +import { codeCommon } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import type { ArgType, Args, TableAnnotation } from './types'; import { ArgJsDoc } from './ArgJsDoc'; import { ArgValue } from './ArgValue'; diff --git a/code/ui/blocks/src/components/ArgsTable/ArgValue.tsx b/code/ui/blocks/src/components/ArgsTable/ArgValue.tsx index 2a101f5c71e0..96c978f24723 100644 --- a/code/ui/blocks/src/components/ArgsTable/ArgValue.tsx +++ b/code/ui/blocks/src/components/ArgsTable/ArgValue.tsx @@ -3,7 +3,7 @@ import React, { useState } from 'react'; import memoize from 'memoizerific'; import uniq from 'lodash/uniq'; import { styled } from '@storybook/theming'; -import { WithTooltipPure, Icons, SyntaxHighlighter, codeCommon } from '@storybook/components'; +import { WithTooltipPure, Icons, SyntaxHighlighter, codeCommon } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import type { PropSummaryValue } from './types'; interface ArgValueProps { diff --git a/code/ui/blocks/src/components/ArgsTable/ArgsTable.tsx b/code/ui/blocks/src/components/ArgsTable/ArgsTable.tsx index d950828b2e74..15e8e7588c82 100644 --- a/code/ui/blocks/src/components/ArgsTable/ArgsTable.tsx +++ b/code/ui/blocks/src/components/ArgsTable/ArgsTable.tsx @@ -2,10 +2,10 @@ import type { FC } from 'react'; import React from 'react'; import pickBy from 'lodash/pickBy'; import { styled } from '@storybook/theming'; -import { opacify, transparentize, darken, lighten } from 'polished'; +import { opacify, transparentize, darken, lighten } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies import { includeConditionalArg } from '@storybook/csf'; import { once } from '@storybook/client-logger'; -import { IconButton, Icons, Link, ResetWrapper } from '@storybook/components'; +import { IconButton, Icons, Link, ResetWrapper } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { ArgRow } from './ArgRow'; import { SectionRow } from './SectionRow'; diff --git a/code/ui/blocks/src/components/ArgsTable/NoControlsWarning.tsx b/code/ui/blocks/src/components/ArgsTable/NoControlsWarning.tsx index 5347cad17d42..19eaec60a3ba 100644 --- a/code/ui/blocks/src/components/ArgsTable/NoControlsWarning.tsx +++ b/code/ui/blocks/src/components/ArgsTable/NoControlsWarning.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { styled } from '@storybook/theming'; -import { Link } from '@storybook/components'; +import { Link } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies const NoControlsWrapper = styled.div(({ theme }) => ({ background: theme.background.warning, diff --git a/code/ui/blocks/src/components/ArgsTable/SectionRow.tsx b/code/ui/blocks/src/components/ArgsTable/SectionRow.tsx index 5504c9411da1..2dbe5f70545e 100644 --- a/code/ui/blocks/src/components/ArgsTable/SectionRow.tsx +++ b/code/ui/blocks/src/components/ArgsTable/SectionRow.tsx @@ -1,8 +1,8 @@ import type { FC } from 'react'; import React, { useState } from 'react'; -import { transparentize } from 'polished'; +import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies import { styled } from '@storybook/theming'; -import { Icons } from '@storybook/components'; +import { Icons } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies type Level = 'section' | 'subsection'; diff --git a/code/ui/blocks/src/components/ArgsTable/TabbedArgsTable.tsx b/code/ui/blocks/src/components/ArgsTable/TabbedArgsTable.tsx index 99a1b46f902c..50f4871b81f8 100644 --- a/code/ui/blocks/src/components/ArgsTable/TabbedArgsTable.tsx +++ b/code/ui/blocks/src/components/ArgsTable/TabbedArgsTable.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import React from 'react'; -import { TabsState } from '@storybook/components'; +import { TabsState } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import type { ArgsTableProps, SortType } from './ArgsTable'; // eslint-disable-next-line import/no-cycle diff --git a/code/ui/blocks/src/components/ColorPalette.tsx b/code/ui/blocks/src/components/ColorPalette.tsx index 5e018b24388e..488c71b04ad9 100644 --- a/code/ui/blocks/src/components/ColorPalette.tsx +++ b/code/ui/blocks/src/components/ColorPalette.tsx @@ -1,8 +1,8 @@ import type { FunctionComponent } from 'react'; import React from 'react'; -import { transparentize } from 'polished'; +import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies import { styled } from '@storybook/theming'; -import { ResetWrapper } from '@storybook/components'; +import { ResetWrapper } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { getBlockBackgroundStyle } from './BlockBackgroundStyles'; diff --git a/code/ui/blocks/src/components/Description.tsx b/code/ui/blocks/src/components/Description.tsx index fa8d5fff5ae5..fc6f07dc8139 100644 --- a/code/ui/blocks/src/components/Description.tsx +++ b/code/ui/blocks/src/components/Description.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import React from 'react'; -import Markdown from 'markdown-to-jsx'; -import { components, ResetWrapper } from '@storybook/components'; +import Markdown from 'markdown-to-jsx'; // eslint-disable-line import/no-extraneous-dependencies +import { components, ResetWrapper } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies export interface DescriptionProps { markdown: string; diff --git a/code/ui/blocks/src/components/DocsPage.tsx b/code/ui/blocks/src/components/DocsPage.tsx index 651c8c9c6a4f..089a02ecbd62 100644 --- a/code/ui/blocks/src/components/DocsPage.tsx +++ b/code/ui/blocks/src/components/DocsPage.tsx @@ -1,6 +1,6 @@ -import { withReset } from '@storybook/components'; +import { withReset } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { styled } from '@storybook/theming'; -import { transparentize } from 'polished'; +import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies import type { FC } from 'react'; import React from 'react'; diff --git a/code/ui/blocks/src/components/EmptyBlock.tsx b/code/ui/blocks/src/components/EmptyBlock.tsx index 41e84c48070b..47f7bb15b434 100644 --- a/code/ui/blocks/src/components/EmptyBlock.tsx +++ b/code/ui/blocks/src/components/EmptyBlock.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { transparentize } from 'polished'; +import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies import { styled } from '@storybook/theming'; -import { withReset } from '@storybook/components'; +import { withReset } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies const Wrapper = styled.div(withReset, ({ theme }) => ({ backgroundColor: theme.base === 'light' ? 'rgba(0,0,0,.01)' : 'rgba(255,255,255,.01)', diff --git a/code/ui/blocks/src/components/IconGallery.tsx b/code/ui/blocks/src/components/IconGallery.tsx index 22456d889ae2..cf27be34a3eb 100644 --- a/code/ui/blocks/src/components/IconGallery.tsx +++ b/code/ui/blocks/src/components/IconGallery.tsx @@ -1,7 +1,7 @@ import type { FunctionComponent } from 'react'; import React from 'react'; import { styled } from '@storybook/theming'; -import { ResetWrapper } from '@storybook/components'; +import { ResetWrapper } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { getBlockBackgroundStyle } from './BlockBackgroundStyles'; diff --git a/code/ui/blocks/src/components/Preview.tsx b/code/ui/blocks/src/components/Preview.tsx index f93ba28cdf2f..96865be5dd46 100644 --- a/code/ui/blocks/src/components/Preview.tsx +++ b/code/ui/blocks/src/components/Preview.tsx @@ -1,10 +1,10 @@ import type { ClipboardEvent, FC, ReactElement, ReactNode } from 'react'; import React, { Children, useCallback, useState } from 'react'; -import { darken } from 'polished'; +import { darken } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies import { styled } from '@storybook/theming'; import global from 'global'; -import { ActionBar, Zoom } from '@storybook/components'; +import { ActionBar, Zoom } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import type { ActionItem } from '@storybook/components'; import type { SourceProps } from '.'; @@ -218,7 +218,7 @@ export const Preview: FC = ({ const { window: globalWindow } = global; const copyToClipboard = useCallback(async (text: string) => { - const { createCopyToClipboardFunction } = await import('@storybook/components'); + const { createCopyToClipboardFunction } = await import('@storybook/components'); // eslint-disable-line import/no-extraneous-dependencies createCopyToClipboardFunction(); }, []); diff --git a/code/ui/blocks/src/components/Source.tsx b/code/ui/blocks/src/components/Source.tsx index 26dc904b1b18..730dfc6c24a9 100644 --- a/code/ui/blocks/src/components/Source.tsx +++ b/code/ui/blocks/src/components/Source.tsx @@ -1,7 +1,7 @@ import type { ComponentProps, FunctionComponent } from 'react'; import React from 'react'; import { styled, ThemeProvider, convert, themes } from '@storybook/theming'; -import { SyntaxHighlighter } from '@storybook/components'; +import { SyntaxHighlighter } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { EmptyBlock } from './EmptyBlock'; diff --git a/code/ui/blocks/src/components/Story.tsx b/code/ui/blocks/src/components/Story.tsx index 4719a8ab6f4f..11570922cc1f 100644 --- a/code/ui/blocks/src/components/Story.tsx +++ b/code/ui/blocks/src/components/Story.tsx @@ -2,7 +2,7 @@ import global from 'global'; import type { ElementType, FunctionComponent } from 'react'; import React, { createElement, Fragment } from 'react'; import type { Parameters } from '@storybook/types'; -import { Loader, getStoryHref } from '@storybook/components'; +import { Loader, getStoryHref } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies // eslint-disable-next-line import/no-cycle import { EmptyBlock } from '.'; import { IFrame } from './IFrame'; diff --git a/code/ui/blocks/src/components/Title.tsx b/code/ui/blocks/src/components/Title.tsx index bbff95701d41..20e1db72310d 100644 --- a/code/ui/blocks/src/components/Title.tsx +++ b/code/ui/blocks/src/components/Title.tsx @@ -1,6 +1,6 @@ import type { Theme } from '@storybook/theming'; import { styled } from '@storybook/theming'; -import { withReset } from '@storybook/components'; +import { withReset } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies const breakpoint = 600; diff --git a/code/ui/blocks/src/components/Toolbar.tsx b/code/ui/blocks/src/components/Toolbar.tsx index 0838f19f1818..df1c70dff877 100644 --- a/code/ui/blocks/src/components/Toolbar.tsx +++ b/code/ui/blocks/src/components/Toolbar.tsx @@ -1,6 +1,7 @@ import type { FC, MouseEvent } from 'react'; import React, { Fragment } from 'react'; import { styled } from '@storybook/theming'; +// eslint-disable-next-line import/no-extraneous-dependencies import { FlexBar, Icons, diff --git a/code/ui/blocks/src/components/Typeset.tsx b/code/ui/blocks/src/components/Typeset.tsx index 35f0dda5f31d..4ecf8ab70929 100644 --- a/code/ui/blocks/src/components/Typeset.tsx +++ b/code/ui/blocks/src/components/Typeset.tsx @@ -1,8 +1,8 @@ import type { FC } from 'react'; import React from 'react'; -import { transparentize } from 'polished'; +import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies import { styled } from '@storybook/theming'; -import { withReset } from '@storybook/components'; +import { withReset } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { getBlockBackgroundStyle } from './BlockBackgroundStyles'; const Label = styled.div(({ theme }) => ({ diff --git a/code/ui/blocks/src/controls/Boolean.tsx b/code/ui/blocks/src/controls/Boolean.tsx index 8abec1e34902..8bd205b8373c 100644 --- a/code/ui/blocks/src/controls/Boolean.tsx +++ b/code/ui/blocks/src/controls/Boolean.tsx @@ -1,10 +1,10 @@ import type { FC } from 'react'; import React, { useCallback } from 'react'; -import { opacify, transparentize } from 'polished'; +import { opacify, transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies import { styled } from '@storybook/theming'; -import { Form } from '@storybook/components'; +import { Form } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { getControlId, getControlSetterButtonId } from './helpers'; import type { ControlProps, BooleanValue, BooleanConfig } from './types'; diff --git a/code/ui/blocks/src/controls/Color.tsx b/code/ui/blocks/src/controls/Color.tsx index 3fa5a655e224..995c4d1152b1 100644 --- a/code/ui/blocks/src/controls/Color.tsx +++ b/code/ui/blocks/src/controls/Color.tsx @@ -1,10 +1,10 @@ import type { FC, ChangeEvent, FocusEvent } from 'react'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { HexColorPicker, HslaStringColorPicker, RgbaStringColorPicker } from 'react-colorful'; -import convert from 'color-convert'; +import { HexColorPicker, HslaStringColorPicker, RgbaStringColorPicker } from 'react-colorful'; // eslint-disable-line import/no-extraneous-dependencies +import convert from 'color-convert'; // eslint-disable-line import/no-extraneous-dependencies import throttle from 'lodash/throttle'; import { styled } from '@storybook/theming'; -import { TooltipNote, WithTooltip, Form, Icons } from '@storybook/components'; +import { TooltipNote, WithTooltip, Form, Icons } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import type { ControlProps, ColorValue, ColorConfig, PresetColor } from './types'; import { getControlId } from './helpers'; diff --git a/code/ui/blocks/src/controls/Date.tsx b/code/ui/blocks/src/controls/Date.tsx index 0baf920593db..a850fff46b13 100644 --- a/code/ui/blocks/src/controls/Date.tsx +++ b/code/ui/blocks/src/controls/Date.tsx @@ -1,7 +1,7 @@ import type { FC, ChangeEvent, RefObject } from 'react'; import React, { useState, useRef, useEffect } from 'react'; import { styled } from '@storybook/theming'; -import { Form } from '@storybook/components'; +import { Form } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import type { ControlProps, DateValue, DateConfig } from './types'; import { getControlId } from './helpers'; diff --git a/code/ui/blocks/src/controls/Files.tsx b/code/ui/blocks/src/controls/Files.tsx index 2354703c2917..eb80b40fe8d1 100644 --- a/code/ui/blocks/src/controls/Files.tsx +++ b/code/ui/blocks/src/controls/Files.tsx @@ -1,7 +1,7 @@ import type { ChangeEvent, FC } from 'react'; import React from 'react'; import { styled } from '@storybook/theming'; -import { Form } from '@storybook/components'; +import { Form } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import type { ControlProps } from './types'; import { getControlId } from './helpers'; diff --git a/code/ui/blocks/src/controls/Number.tsx b/code/ui/blocks/src/controls/Number.tsx index 551d5fb7417e..42a8ae2129dd 100644 --- a/code/ui/blocks/src/controls/Number.tsx +++ b/code/ui/blocks/src/controls/Number.tsx @@ -1,7 +1,7 @@ import type { FC, ChangeEvent } from 'react'; import React, { useState, useCallback, useEffect, useRef } from 'react'; import { styled } from '@storybook/theming'; -import { Form } from '@storybook/components'; +import { Form } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { getControlId, getControlSetterButtonId } from './helpers'; import type { ControlProps, NumberValue, NumberConfig } from './types'; diff --git a/code/ui/blocks/src/controls/Object.tsx b/code/ui/blocks/src/controls/Object.tsx index fbd0a91ab9ad..e628afee6ec6 100644 --- a/code/ui/blocks/src/controls/Object.tsx +++ b/code/ui/blocks/src/controls/Object.tsx @@ -3,7 +3,7 @@ import cloneDeep from 'lodash/cloneDeep'; import type { ComponentProps, SyntheticEvent, FC, FocusEvent } from 'react'; import React, { useCallback, useMemo, useState, useEffect, useRef } from 'react'; import { styled, useTheme, type Theme } from '@storybook/theming'; -import { Form, Icons, type IconsProps, IconButton } from '@storybook/components'; +import { Form, Icons, type IconsProps, IconButton } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { JsonTree, getObjectType } from './react-editable-json-tree'; import { getControlId, getControlSetterButtonId } from './helpers'; import type { ControlProps, ObjectValue, ObjectConfig } from './types'; diff --git a/code/ui/blocks/src/controls/Range.tsx b/code/ui/blocks/src/controls/Range.tsx index adf0aafd11f8..0c5459ca6f06 100644 --- a/code/ui/blocks/src/controls/Range.tsx +++ b/code/ui/blocks/src/controls/Range.tsx @@ -2,7 +2,7 @@ import type { FC, ChangeEvent } from 'react'; import React, { useMemo } from 'react'; import { styled } from '@storybook/theming'; -import { lighten, darken, rgba } from 'polished'; +import { lighten, darken, rgba } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies import { getControlId } from './helpers'; import type { ControlProps, NumberValue, RangeConfig } from './types'; diff --git a/code/ui/blocks/src/controls/Text.tsx b/code/ui/blocks/src/controls/Text.tsx index d7a1e312784d..ec7d45643abe 100644 --- a/code/ui/blocks/src/controls/Text.tsx +++ b/code/ui/blocks/src/controls/Text.tsx @@ -1,7 +1,7 @@ import type { FC, ChangeEvent } from 'react'; import React, { useCallback, useState } from 'react'; import { styled } from '@storybook/theming'; -import { Form } from '@storybook/components'; +import { Form } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import { getControlId, getControlSetterButtonId } from './helpers'; import type { ControlProps, TextValue, TextConfig } from './types'; diff --git a/code/ui/blocks/src/controls/options/Select.tsx b/code/ui/blocks/src/controls/options/Select.tsx index f033c131bd71..ffca796a50eb 100644 --- a/code/ui/blocks/src/controls/options/Select.tsx +++ b/code/ui/blocks/src/controls/options/Select.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { styled } from '@storybook/theming'; import type { CSSObject } from '@storybook/theming'; import { logger } from '@storybook/client-logger'; -import { Icons } from '@storybook/components'; +import { Icons } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies import type { ControlProps, OptionsSelection, NormalizedOptionsConfig } from '../types'; diff --git a/code/ui/blocks/src/controls/react-editable-json-tree/JsonNodes.tsx b/code/ui/blocks/src/controls/react-editable-json-tree/JsonNodes.tsx index c78738a2aff0..541a2423d6d1 100644 --- a/code/ui/blocks/src/controls/react-editable-json-tree/JsonNodes.tsx +++ b/code/ui/blocks/src/controls/react-editable-json-tree/JsonNodes.tsx @@ -1086,7 +1086,6 @@ export class JsonObject extends Component { onChildUpdate(childKey: string, childData: any) { const { data, keyPath } = this.state; // Update data - // @ts-expect-error (Converted from ts-ignore) data[childKey] = childData; // Put new data this.setState({ @@ -1117,7 +1116,6 @@ export class JsonObject extends Component { beforeAddAction(key, keyPath, deep, newValue) .then(() => { // Update data - // @ts-expect-error (Converted from ts-ignore) data[key] = newValue; this.setState({ data, @@ -1143,7 +1141,6 @@ export class JsonObject extends Component { return () => { const { beforeRemoveAction, logger } = this.props; const { data, keyPath, nextDeep: deep } = this.state; - // @ts-expect-error (Converted from ts-ignore) const oldValue = data[key]; // Before Remove Action beforeRemoveAction(key, keyPath, deep, oldValue) @@ -1156,7 +1153,6 @@ export class JsonObject extends Component { type: deltaTypes.REMOVE_DELTA_TYPE, }; - // @ts-expect-error (Converted from ts-ignore) delete data[key]; this.setState({ data }); @@ -1182,14 +1178,12 @@ export class JsonObject extends Component { const { data, keyPath, nextDeep: deep } = this.state; // Old value - // @ts-expect-error (Converted from ts-ignore) const oldValue = data[key]; // Before update action beforeUpdateAction(key, keyPath, deep, oldValue, value) .then(() => { // Update value - // @ts-expect-error (Converted from ts-ignore) data[key] = value; // Set state this.setState({ From 68a1520b34a2cb7832cd58f1aa236768ff2a6b0f Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 9 Nov 2022 15:59:35 +0100 Subject: [PATCH 047/258] fix lockfile --- code/yarn.lock | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/code/yarn.lock b/code/yarn.lock index 94bd1fa12d23..59716c2a898e 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -5501,23 +5501,15 @@ __metadata: "@babel/plugin-transform-react-jsx": ^7.12.12 "@jest/transform": ^26.6.2 "@mdx-js/react": ^2.1.5 - "@storybook/addons": 7.0.0-alpha.48 - "@storybook/api": 7.0.0-alpha.48 "@storybook/blocks": 7.0.0-alpha.48 "@storybook/components": 7.0.0-alpha.48 - "@storybook/core-common": 7.0.0-alpha.48 - "@storybook/core-events": 7.0.0-alpha.48 "@storybook/csf-plugin": 7.0.0-alpha.48 "@storybook/csf-tools": 7.0.0-alpha.48 - "@storybook/docs-tools": 7.0.0-alpha.48 "@storybook/mdx2-csf": next "@storybook/node-logger": 7.0.0-alpha.48 "@storybook/postinstall": 7.0.0-alpha.48 "@storybook/preview-web": 7.0.0-alpha.48 - "@storybook/store": 7.0.0-alpha.48 - "@storybook/theming": 7.0.0-alpha.48 "@storybook/types": 7.0.0-alpha.48 - dequal: ^2.0.2 fs-extra: ^9.0.1 global: ^4.4.0 remark-external-links: ^8.0.0 @@ -5559,31 +5551,6 @@ __metadata: typescript: ~4.6.3 peerDependencies: "@babel/core": ^7.9.6 - peerDependenciesMeta: - "@storybook/angular": - optional: true - "@storybook/html": - optional: true - "@storybook/vue": - optional: true - "@storybook/vue3": - optional: true - "@storybook/web-components": - optional: true - lit: - optional: true - lit-html: - optional: true - react: - optional: true - react-dom: - optional: true - svelte: - optional: true - sveltedoc-parser: - optional: true - vue: - optional: true languageName: unknown linkType: soft @@ -6124,8 +6091,6 @@ __metadata: resolution: "@storybook/blocks@workspace:ui/blocks" dependencies: "@storybook/addon-actions": 7.0.0-alpha.48 - "@storybook/addons": 7.0.0-alpha.48 - "@storybook/api": 7.0.0-alpha.48 "@storybook/channels": 7.0.0-alpha.48 "@storybook/client-logger": 7.0.0-alpha.48 "@storybook/components": 7.0.0-alpha.48 @@ -6146,10 +6111,9 @@ __metadata: memoizerific: ^1.11.3 polished: ^4.2.2 react-colorful: ^5.1.2 - ts-dedent: ^2.0.0 - util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 languageName: unknown linkType: soft From 5033b32fe1c6f79ffb401bec0398cc53fc81c1bd Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 9 Nov 2022 16:20:24 +0100 Subject: [PATCH 048/258] add extra export --- code/addons/docs/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 4f927a07d114..09505e3ae536 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -42,6 +42,7 @@ }, "./svelte/HOC.svelte": "./svelte/HOC.svelte", "./ember/index.js": "./ember/index.js", + "./angular/index.js": "./angular/index.js", "./web-components/index.js": "./web-components/index.js", "./jest-transform-mdx.js": "./jest-transform-mdx.js", "./package.json": "./package.json" From 10cfd908665560fe0642652ef57e11b9de0fd175 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 9 Nov 2022 17:00:09 +0100 Subject: [PATCH 049/258] fixes --- code/addons/docs/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 09505e3ae536..0d04b9bd0431 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -41,7 +41,9 @@ "types": "./dist/preset.d.ts" }, "./svelte/HOC.svelte": "./svelte/HOC.svelte", + "./ember": "./ember/index.js", "./ember/index.js": "./ember/index.js", + "./angular": "./angular/index.js", "./angular/index.js": "./angular/index.js", "./web-components/index.js": "./web-components/index.js", "./jest-transform-mdx.js": "./jest-transform-mdx.js", From 7f1d82bf62a4f7eefeb75f8eca10827df54be162 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 9 Nov 2022 17:17:35 +0100 Subject: [PATCH 050/258] bump it to a bigger runner --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ef32f6fb4984..22621bd9b616 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -378,7 +378,7 @@ jobs: yarn coverage chromatic-internal-storybooks: executor: - class: medium + class: medium+ name: sb_node_16_browsers steps: # switched this to the CircleCI helper to get the full git history for TurboSnap From 27c7b85f11cf37e348f2ac726312abde4ebc734c Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Thu, 10 Nov 2022 01:21:44 +0800 Subject: [PATCH 051/258] Build: Upgrade bench to `next` --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ef32f6fb4984..4bed5dc41544 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -248,7 +248,7 @@ jobs: cd ../cra-bench rm -rf node_modules mkdir node_modules - npx -p @storybook/bench@0.7.6--canary.14.6702e4f.0 sb-bench 'yarn install' --label cra + npx -p @storybook/bench@next sb-bench 'yarn install' --label cra - run: name: prep artifacts when: always @@ -288,7 +288,7 @@ jobs: cd ../react-vite-bench rm -rf node_modules mkdir node_modules - npx -p @storybook/bench@0.7.6--canary.14.6702e4f.0 sb-bench 'yarn install' --label react-vite + npx -p @storybook/bench@next sb-bench 'yarn install' --label react-vite - run: name: prep artifacts when: always From bca3cba0e87918dd7054783860e84de2bf984155 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 10 Nov 2022 10:22:07 +0100 Subject: [PATCH 052/258] fix --- code/addons/docs/package.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/addons/docs/package.json b/code/addons/docs/package.json index 0d04b9bd0431..cc68b2b3873e 100644 --- a/code/addons/docs/package.json +++ b/code/addons/docs/package.json @@ -40,6 +40,16 @@ "import": "./dist/preset.mjs", "types": "./dist/preset.d.ts" }, + "./dist/preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./dist/preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, "./svelte/HOC.svelte": "./svelte/HOC.svelte", "./ember": "./ember/index.js", "./ember/index.js": "./ember/index.js", From a255e097f92821066bf2516fb43fa0a8a43dfe8c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 10 Nov 2022 10:28:16 +0100 Subject: [PATCH 053/258] oops --- code/addons/docs/src/preset.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/docs/src/preset.ts b/code/addons/docs/src/preset.ts index ea530d2ae670..4172b8be14cf 100644 --- a/code/addons/docs/src/preset.ts +++ b/code/addons/docs/src/preset.ts @@ -190,7 +190,7 @@ const docs = (docsOptions: DocsOptions) => { * something down the dependency chain is using typescript namespaces, which are not supported by rollup-plugin-dts */ const webpackX = webpack as any; -const storyIndexersX = webpack as any; +const storyIndexersX = storyIndexers as any; const docsX = docs as any; export { webpackX as webpack, storyIndexersX as storyIndexers, docsX as docs }; From 6b7c45b61fc34d83b9d97b24b57d2693a17a3762 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 10 Nov 2022 10:43:59 +0100 Subject: [PATCH 054/258] fix linting --- code/addons/essentials/src/docs/preset.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/code/addons/essentials/src/docs/preset.ts b/code/addons/essentials/src/docs/preset.ts index 2f73e99c7e58..dca808a37dd7 100644 --- a/code/addons/essentials/src/docs/preset.ts +++ b/code/addons/essentials/src/docs/preset.ts @@ -1 +1,2 @@ +/* eslint-disable import/export */ export * from '@storybook/addon-docs/dist/preset'; From 7cd13d3b4157078d0c7f0623cdfe4607c471ce8d Mon Sep 17 00:00:00 2001 From: Han Yeong-woo Date: Fri, 11 Nov 2022 00:40:06 +0900 Subject: [PATCH 055/258] Fix import url on windows --- code/frameworks/nextjs/src/config/webpack.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/frameworks/nextjs/src/config/webpack.ts b/code/frameworks/nextjs/src/config/webpack.ts index 2bd4ba751691..924b9311795c 100644 --- a/code/frameworks/nextjs/src/config/webpack.ts +++ b/code/frameworks/nextjs/src/config/webpack.ts @@ -5,6 +5,7 @@ import { pathExists } from 'fs-extra'; import type { NextConfig } from 'next'; import dedent from 'ts-dedent'; import { DefinePlugin } from 'webpack'; +import { pathToFileURL } from 'node:url'; import { addScopedAlias } from '../utils'; export const configureConfig = async ({ @@ -60,7 +61,7 @@ const resolveNextConfig = async ({ ); } - const nextConfigExport = await import(nextConfigFile); + const nextConfigExport = await import(pathToFileURL(nextConfigFile).href); const nextConfig = typeof nextConfigExport === 'function' From 9fc90597d9445e852b3324ccc39f7c8b47ea1758 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 10 Nov 2022 17:00:44 +0100 Subject: [PATCH 056/258] revert bundling in components into blocks --- code/ui/blocks/package.json | 18 +++++++++++------- scripts/prepare/bundle.ts | 12 +++++++----- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json index fbab6e9ef3ad..72c46be00fa6 100644 --- a/code/ui/blocks/package.json +++ b/code/ui/blocks/package.json @@ -42,8 +42,10 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { + "@storybook/api": "7.0.0-alpha.48", "@storybook/channels": "7.0.0-alpha.48", "@storybook/client-logger": "7.0.0-alpha.48", + "@storybook/components": "7.0.0-alpha.48", "@storybook/core-events": "7.0.0-alpha.48", "@storybook/csf": "next", "@storybook/docs-tools": "7.0.0-alpha.48", @@ -52,19 +54,21 @@ "@storybook/theming": "7.0.0-alpha.48", "@storybook/types": "7.0.0-alpha.48", "@types/lodash": "^4.14.167", + "color-convert": "^2.0.1", "dequal": "^2.0.2", "global": "^4.4.0", "lodash": "^4.17.21", - "memoizerific": "^1.11.3" + "markdown-to-jsx": "^7.1.3", + "memoizerific": "^1.11.3", + "polished": "^4.2.2", + "react-colorful": "^5.1.2", + "ts-dedent": "^2.0.0", + "util-deprecate": "^1.0.2" }, "devDependencies": { "@storybook/addon-actions": "7.0.0-alpha.48", - "@storybook/components": "7.0.0-alpha.48", - "@types/color-convert": "^2.0.0", - "color-convert": "^2.0.1", - "markdown-to-jsx": "^7.1.3", - "polished": "^4.2.2", - "react-colorful": "^5.1.2" + "@storybook/addons": "7.0.0-alpha.48", + "@types/color-convert": "^2.0.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", diff --git a/scripts/prepare/bundle.ts b/scripts/prepare/bundle.ts index b5dd30121603..b75f6a55e1b6 100755 --- a/scripts/prepare/bundle.ts +++ b/scripts/prepare/bundle.ts @@ -37,12 +37,14 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { entries.map(async (file: string) => { console.log(`skipping generating types for ${file}`); const { name: entryName, dir } = path.parse(file); - + const pathName = join(process.cwd(), dir.replace('./src', 'dist'), `${entryName}.d.ts`); const srcName = join(process.cwd(), file); - - const rel = relative(dirname(pathName), dirname(srcName)).split(path.sep).join(path.posix.sep); - + + const rel = relative(dirname(pathName), dirname(srcName)) + .split(path.sep) + .join(path.posix.sep); + await fs.ensureFile(pathName); await fs.writeFile( pathName, @@ -54,7 +56,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { }) ); } - + const tsConfigPath = join(cwd, 'tsconfig.json'); const tsConfigExists = await fs.pathExists(tsConfigPath); await Promise.all([ From c761a0a984cb8a76e8a4daf3b5b6b4f4762aa338 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 10 Nov 2022 17:05:03 +0100 Subject: [PATCH 057/258] fix lockfile --- code/yarn.lock | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/yarn.lock b/code/yarn.lock index 59716c2a898e..23f0dcdb2b89 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -6091,6 +6091,8 @@ __metadata: resolution: "@storybook/blocks@workspace:ui/blocks" dependencies: "@storybook/addon-actions": 7.0.0-alpha.48 + "@storybook/addons": 7.0.0-alpha.48 + "@storybook/api": 7.0.0-alpha.48 "@storybook/channels": 7.0.0-alpha.48 "@storybook/client-logger": 7.0.0-alpha.48 "@storybook/components": 7.0.0-alpha.48 @@ -6111,6 +6113,8 @@ __metadata: memoizerific: ^1.11.3 polished: ^4.2.2 react-colorful: ^5.1.2 + ts-dedent: ^2.0.0 + util-deprecate: ^1.0.2 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 From 0d29947358480b290bedbd3d616d342ddbf8e665 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 13:44:11 -0500 Subject: [PATCH 058/258] Create separate jest configs for browser and node --- code/jest.config.base.js | 118 +++++++++++++++++++++++ code/jest.config.browser.js | 9 ++ code/jest.config.node.js | 7 ++ code/{jest.init.ts => jest.init.base.ts} | 48 +-------- code/jest.init.browser.ts | 48 +++++++++ 5 files changed, 183 insertions(+), 47 deletions(-) create mode 100644 code/jest.config.base.js create mode 100644 code/jest.config.browser.js create mode 100644 code/jest.config.node.js rename code/{jest.init.ts => jest.init.base.ts} (66%) create mode 100644 code/jest.init.browser.ts diff --git a/code/jest.config.base.js b/code/jest.config.base.js new file mode 100644 index 000000000000..494e040c1023 --- /dev/null +++ b/code/jest.config.base.js @@ -0,0 +1,118 @@ +const os = require('os'); +const path = require('path'); + +// TODO Revisit this test later, when we have a windows machine @valentinpalkovic +const skipOnWindows = [ + 'lib/core-server/src/utils/stories-json.test.ts', + 'lib/core-server/src/utils/StoryIndexGenerator.test.ts', + 'lib/cli/src/helpers.test.ts', + 'lib/core-server/src/utils/__tests__/server-statics.test.ts', + 'lib/core-common/src/utils/__tests__/template.test.ts', + 'addons/storyshots/storyshots-core/src/frameworks/configure.test.ts', + 'lib/core-common/src/utils/__tests__/interpret-files.test.ts', + 'lib/builder-manager/src/utils/files.test.ts', + 'lib/cli/src/helpers.test.ts', + 'lib/core-server/src/utils/__tests__/server-statics.test.ts', + 'lib/core-common/src/utils/__tests__/template.test.ts', + 'addons/storyshots/storyshots-core/src/frameworks/configure.test.ts', + 'lib/core-common/src/utils/__tests__/interpret-files.test.ts', + 'lib/builder-manager/src/utils/files.test.ts', +]; + +module.exports = { + cacheDirectory: path.resolve('.cache/jest'), + clearMocks: true, + moduleNameMapper: { + // non-js files + '\\.(jpg|jpeg|png|apng|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': + '/__mocks__/fileMock.js', + '\\.(css|scss|stylesheet)$': '/__mocks__/styleMock.js', + '\\.(md)$': '/__mocks__/htmlMock.js', + + // core-js v2 to v3 mapping + 'core-js/modules/es6.(.*)': 'core-js/modules/es.$1', + 'core-js/modules/es7.(.*)': 'core-js/modules/esnext.$1', + 'core-js/library/fn/(.*)': `core-js/features/$1`, + 'core-js/es5/(.*)': `core-js/es/$1`, + 'core-js/es6/(.*)': `core-js/es/$1`, + 'core-js/es7/reflect': `core-js/proposals/reflect-metadata`, + 'core-js/es7/(.*)': `core-js/proposals/$1`, + 'core-js/object$/': `core-js/es/object`, + 'core-js/object/(.*)': `core-js/es/object/$1`, + 'babel-runtime/core-js/(.*)': `core-js/es/$1`, + // 'babel-runtime/core-js/object/assign' + 'core-js/library/fn/object/assign': 'core-js/es/object/assign', + }, + transform: { + '^.+\\.stories\\.[jt]sx?$': '@storybook/addon-storyshots/injectFileName', + '^.+\\.[jt]sx?$': path.resolve('../scripts/utils/jest-transform-js.js'), + '^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx', + }, + transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid|lit-html|@mdx-js)'], + testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], + testPathIgnorePatterns: [ + '/storybook-static/', + '/node_modules/', + '/dist/', + '/prebuilt/', + '/template/', + 'addon-jest.test.js', + '/examples/*/src/*.*', + '/examples/*/src/*/*.*', + '/examples/*/src/*/*/*.*', + // TODO: Can not get svelte-jester to work, but also not necessary for this test, as it is run by tsc/svelte-check. + '/renderers/svelte/src/public-types.test.ts', + '/renderers/vue/src/public-types.test.ts', + '/renderers/vue3/src/public-types.test.ts', + ...(process.platform === 'win32' ? skipOnWindows : []), + ], + collectCoverage: false, + collectCoverageFrom: [ + 'frameworks/*/src/**/*.{js,jsx,ts,tsx}', + 'lib/*/src/**/*.{js,jsx,ts,tsx}', + 'renderers/*/src/**/*.{js,jsx,ts,tsx}', + 'addons/*/src/**/*.{js,jsx,ts,tsx}', + ], + coveragePathIgnorePatterns: [ + '/node_modules/', + '/cli/test/', + '/dist/', + '/prebuilt/', + '/generators/', + '/template/', + '/dll/', + '/__mocks__ /', + '/__mockdata__/', + '/__mocks-ng-workspace__/', + '/__testfixtures__/', + '^.*\\.stories\\.[jt]sx?$', + 'typings.d.ts$', + ], + globals: { + PREVIEW_URL: undefined, + SNAPSHOT_OS: os.platform() === 'win32' ? 'windows' : 'posix', + }, + snapshotSerializers: [ + '@emotion/jest/serializer', + 'enzyme-to-json/serializer', + 'jest-serializer-html', + ], + coverageDirectory: 'coverage', + coverageReporters: ['lcov'], + testEnvironmentOptions: { + url: 'http://localhost', + }, + modulePathIgnorePatterns: [ + // + '/dist/.*/__mocks__/', + '/storybook-static/', + '/template/', + ], + moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'], + watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], + reporters: ['default', 'jest-junit'], + snapshotFormat: { + escapeString: true, + printBasicPrototype: true, + }, +}; diff --git a/code/jest.config.browser.js b/code/jest.config.browser.js new file mode 100644 index 000000000000..2e94523b8eff --- /dev/null +++ b/code/jest.config.browser.js @@ -0,0 +1,9 @@ +const path = require('path'); +const baseConfig = require('./jest.config.base'); + +module.exports = { + ...baseConfig, + setupFilesAfterEnv: [path.resolve('./jest.init.browser.ts')], + testEnvironment: 'jest-environment-jsdom', + setupFiles: ['raf/polyfill'], +}; diff --git a/code/jest.config.node.js b/code/jest.config.node.js new file mode 100644 index 000000000000..54acf2670929 --- /dev/null +++ b/code/jest.config.node.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('./jest.config.base'); + +module.exports = { + ...baseConfig, + setupFilesAfterEnv: [path.resolve('./jest.init.base.ts')], +}; diff --git a/code/jest.init.ts b/code/jest.init.base.ts similarity index 66% rename from code/jest.init.ts rename to code/jest.init.base.ts index b87aae751a2b..929a2b0373a3 100644 --- a/code/jest.init.ts +++ b/code/jest.init.base.ts @@ -1,4 +1,4 @@ -import 'jest-enzyme/lib/index'; +// import 'jest-enzyme/lib/index'; import '@testing-library/jest-dom'; // setup file @@ -8,8 +8,6 @@ import Adapter from 'enzyme-adapter-react-16'; // @ts-expect-error (Converted from ts-ignore) import regeneratorRuntime from 'regenerator-runtime'; import registerRequireContextHook from '@storybook/babel-plugin-require-context-hook/register'; -import EventEmitter from 'events'; -import { webcrypto } from 'node:crypto'; registerRequireContextHook(); @@ -59,47 +57,3 @@ const throwError = (message: any) => throwMessage('error: ', message); global.console.error = throwError; global.console.warn = throwWarning; - -// Mock for matchMedia since it's not yet implemented in JSDOM (https://jestjs.io/docs/en/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom) -global.window.matchMedia = jest.fn().mockImplementation((query) => { - return { - matches: false, - media: query, - onchange: null, - addListener: jest.fn(), // deprecated - removeListener: jest.fn(), // deprecated - addEventListener: jest.fn(), - removeEventListener: jest.fn(), - dispatchEvent: jest.fn(), - }; -}); -class EventSourceMock { - static sources: EventSourceMock[] = []; - - static reset() { - this.sources = []; - } - - emitter: EventEmitter; - - constructor() { - this.emitter = new EventEmitter(); - EventSourceMock.sources.push(this); - } - - addEventListener(event: string, cb: (data: any) => void) { - this.emitter.on(event, cb); - } - - emit(event: string, data: any) { - this.emitter.emit(event, data); - } -} - -global.window.EventSource = EventSourceMock as any; - -Object.defineProperty(window, 'crypto', { - get() { - return webcrypto; - }, -}); diff --git a/code/jest.init.browser.ts b/code/jest.init.browser.ts new file mode 100644 index 000000000000..0ad9f9d2e7ac --- /dev/null +++ b/code/jest.init.browser.ts @@ -0,0 +1,48 @@ +import './jest.init.base'; +import EventEmitter from 'events'; +import { webcrypto } from 'node:crypto'; + +// Mock for matchMedia since it's not yet implemented in JSDOM (https://jestjs.io/docs/en/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom) +global.window.matchMedia = jest.fn().mockImplementation((query) => { + return { + matches: false, + media: query, + onchange: null, + addListener: jest.fn(), // deprecated + removeListener: jest.fn(), // deprecated + addEventListener: jest.fn(), + removeEventListener: jest.fn(), + dispatchEvent: jest.fn(), + }; +}); + +class EventSourceMock { + static sources: EventSourceMock[] = []; + + static reset() { + this.sources = []; + } + + emitter: EventEmitter; + + constructor() { + this.emitter = new EventEmitter(); + EventSourceMock.sources.push(this); + } + + addEventListener(event: string, cb: (data: any) => void) { + this.emitter.on(event, cb); + } + + emit(event: string, data: any) { + this.emitter.emit(event, data); + } +} + +global.window.EventSource = EventSourceMock as any; + +Object.defineProperty(window, 'crypto', { + get() { + return webcrypto; + }, +}); From dfb9384de6982bb41bbfd256603e6579cbd5a517 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 13:46:42 -0500 Subject: [PATCH 059/258] Create separate jest projects in /lib This allows us to run some projects with node, and others with browser environment --- code/jest.config.js | 115 +------------------- code/lib/addons/jest.config.js | 6 + code/lib/api/jest.config.js | 6 + code/lib/builder-manager/jest.config.js | 6 + code/lib/builder-vite/jest.config.js | 6 + code/lib/builder-webpack5/jest.config.js | 6 + code/lib/channel-postmessage/jest.config.js | 6 + code/lib/channel-websocket/jest.config.js | 6 + code/lib/channels/jest.config.js | 6 + code/lib/cli/jest.config.js | 6 + code/lib/client-api/jest.config.js | 6 + code/lib/client-logger/jest.config.js | 6 + code/lib/codemod/jest.config.js | 6 + code/lib/core-client/jest.config.js | 6 + code/lib/core-common/jest.config.js | 6 + code/lib/core-events/jest.config.js | 6 + code/lib/core-server/jest.config.js | 6 + code/lib/core-webpack/jest.config.js | 6 + code/lib/csf-plugin/jest.config.js | 6 + code/lib/csf-tools/jest.config.js | 6 + code/lib/docs-tools/jest.config.js | 6 + code/lib/instrumenter/jest.config.js | 6 + code/lib/node-logger/jest.config.js | 6 + code/lib/postinstall/jest.config.js | 6 + code/lib/preview-web/jest.config.js | 6 + code/lib/router/jest.config.js | 6 + code/lib/source-loader/jest.config.js | 6 + code/lib/store/jest.config.js | 6 + code/lib/telemetry/jest.config.js | 6 + code/lib/theming/jest.config.js | 6 + 30 files changed, 175 insertions(+), 114 deletions(-) create mode 100644 code/lib/addons/jest.config.js create mode 100644 code/lib/api/jest.config.js create mode 100644 code/lib/builder-manager/jest.config.js create mode 100644 code/lib/builder-vite/jest.config.js create mode 100644 code/lib/builder-webpack5/jest.config.js create mode 100644 code/lib/channel-postmessage/jest.config.js create mode 100644 code/lib/channel-websocket/jest.config.js create mode 100644 code/lib/channels/jest.config.js create mode 100644 code/lib/cli/jest.config.js create mode 100644 code/lib/client-api/jest.config.js create mode 100644 code/lib/client-logger/jest.config.js create mode 100644 code/lib/codemod/jest.config.js create mode 100644 code/lib/core-client/jest.config.js create mode 100644 code/lib/core-common/jest.config.js create mode 100644 code/lib/core-events/jest.config.js create mode 100644 code/lib/core-server/jest.config.js create mode 100644 code/lib/core-webpack/jest.config.js create mode 100644 code/lib/csf-plugin/jest.config.js create mode 100644 code/lib/csf-tools/jest.config.js create mode 100644 code/lib/docs-tools/jest.config.js create mode 100644 code/lib/instrumenter/jest.config.js create mode 100644 code/lib/node-logger/jest.config.js create mode 100644 code/lib/postinstall/jest.config.js create mode 100644 code/lib/preview-web/jest.config.js create mode 100644 code/lib/router/jest.config.js create mode 100644 code/lib/source-loader/jest.config.js create mode 100644 code/lib/store/jest.config.js create mode 100644 code/lib/telemetry/jest.config.js create mode 100644 code/lib/theming/jest.config.js diff --git a/code/jest.config.js b/code/jest.config.js index 90b0a2cb5cce..4b57c9686398 100644 --- a/code/jest.config.js +++ b/code/jest.config.js @@ -1,116 +1,3 @@ -const os = require('os'); - -// TODO Revisit this test later, when we have a windows machine @valentinpalkovic -const skipOnWindows = [ - 'lib/core-server/src/utils/stories-json.test.ts', - 'lib/core-server/src/utils/StoryIndexGenerator.test.ts', - 'lib/cli/src/helpers.test.ts', - 'lib/core-server/src/utils/__tests__/server-statics.test.ts', - 'lib/core-common/src/utils/__tests__/template.test.ts', - 'addons/storyshots/storyshots-core/src/frameworks/configure.test.ts', - 'lib/core-common/src/utils/__tests__/interpret-files.test.ts', - 'lib/builder-manager/src/utils/files.test.ts', - 'lib/cli/src/helpers.test.ts', - 'lib/core-server/src/utils/__tests__/server-statics.test.ts', - 'lib/core-common/src/utils/__tests__/template.test.ts', - 'addons/storyshots/storyshots-core/src/frameworks/configure.test.ts', - 'lib/core-common/src/utils/__tests__/interpret-files.test.ts', - 'lib/builder-manager/src/utils/files.test.ts', -]; - module.exports = { - cacheDirectory: '.cache/jest', - clearMocks: true, - moduleNameMapper: { - // non-js files - '\\.(jpg|jpeg|png|apng|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': - '/__mocks__/fileMock.js', - '\\.(css|scss|stylesheet)$': '/__mocks__/styleMock.js', - '\\.(md)$': '/__mocks__/htmlMock.js', - - // core-js v2 to v3 mapping - 'core-js/modules/es6.(.*)': 'core-js/modules/es.$1', - 'core-js/modules/es7.(.*)': 'core-js/modules/esnext.$1', - 'core-js/library/fn/(.*)': `core-js/features/$1`, - 'core-js/es5/(.*)': `core-js/es/$1`, - 'core-js/es6/(.*)': `core-js/es/$1`, - 'core-js/es7/reflect': `core-js/proposals/reflect-metadata`, - 'core-js/es7/(.*)': `core-js/proposals/$1`, - 'core-js/object$/': `core-js/es/object`, - 'core-js/object/(.*)': `core-js/es/object/$1`, - 'babel-runtime/core-js/(.*)': `core-js/es/$1`, - // 'babel-runtime/core-js/object/assign' - 'core-js/library/fn/object/assign': 'core-js/es/object/assign', - }, - projects: [''], - roots: ['/addons', '/frameworks', '/lib', '/renderers'], - transform: { - '^.+\\.stories\\.[jt]sx?$': '@storybook/addon-storyshots/injectFileName', - '^.+\\.[jt]sx?$': '/../scripts/utils/jest-transform-js.js', - '^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx', - }, - transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid|lit-html|@mdx-js)'], - testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], - testPathIgnorePatterns: [ - '/storybook-static/', - '/node_modules/', - '/dist/', - '/prebuilt/', - '/template/', - 'addon-jest.test.js', - '/examples/*/src/*.*', - '/examples/*/src/*/*.*', - '/examples/*/src/*/*/*.*', - // TODO: Can not get svelte-jester to work, but also not necessary for this test, as it is run by tsc/svelte-check. - '/renderers/svelte/src/public-types.test.ts', - '/renderers/vue/src/public-types.test.ts', - '/renderers/vue3/src/public-types.test.ts', - ...(process.platform === 'win32' ? skipOnWindows : []), - ], - collectCoverage: false, - collectCoverageFrom: [ - 'frameworks/*/src/**/*.{js,jsx,ts,tsx}', - 'lib/*/src/**/*.{js,jsx,ts,tsx}', - 'renderers/*/src/**/*.{js,jsx,ts,tsx}', - 'addons/*/src/**/*.{js,jsx,ts,tsx}', - ], - coveragePathIgnorePatterns: [ - '/node_modules/', - '/cli/test/', - '/dist/', - '/prebuilt/', - '/generators/', - '/template/', - '/dll/', - '/__mocks__ /', - '/__mockdata__/', - '/__mocks-ng-workspace__/', - '/__testfixtures__/', - '^.*\\.stories\\.[jt]sx?$', - 'typings.d.ts$', - ], - globals: { - PREVIEW_URL: undefined, - SNAPSHOT_OS: os.platform() === 'win32' ? 'windows' : 'posix', - }, - snapshotSerializers: [ - '@emotion/jest/serializer', - 'enzyme-to-json/serializer', - 'jest-serializer-html', - ], - coverageDirectory: 'coverage', - setupFilesAfterEnv: ['./jest.init.ts'], - coverageReporters: ['lcov'], - testEnvironment: 'jest-environment-jsdom', - setupFiles: ['raf/polyfill'], - testURL: 'http://localhost', - modulePathIgnorePatterns: [ - // - '/dist/.*/__mocks__/', - '/storybook-static/', - '/template/', - ], - moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'], - watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], - reporters: ['default', 'jest-junit'], + projects: ['/lib/*'], }; diff --git a/code/lib/addons/jest.config.js b/code/lib/addons/jest.config.js new file mode 100644 index 000000000000..3354aafd016a --- /dev/null +++ b/code/lib/addons/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'addons', +}; diff --git a/code/lib/api/jest.config.js b/code/lib/api/jest.config.js new file mode 100644 index 000000000000..715970cc4659 --- /dev/null +++ b/code/lib/api/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'api', +}; diff --git a/code/lib/builder-manager/jest.config.js b/code/lib/builder-manager/jest.config.js new file mode 100644 index 000000000000..18f9c50fb9aa --- /dev/null +++ b/code/lib/builder-manager/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'builder-manager', +}; diff --git a/code/lib/builder-vite/jest.config.js b/code/lib/builder-vite/jest.config.js new file mode 100644 index 000000000000..1dc179b08408 --- /dev/null +++ b/code/lib/builder-vite/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'builder-vite', +}; diff --git a/code/lib/builder-webpack5/jest.config.js b/code/lib/builder-webpack5/jest.config.js new file mode 100644 index 000000000000..bd15dc0f815a --- /dev/null +++ b/code/lib/builder-webpack5/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'builder-webpack5', +}; diff --git a/code/lib/channel-postmessage/jest.config.js b/code/lib/channel-postmessage/jest.config.js new file mode 100644 index 000000000000..5627a0b97ec2 --- /dev/null +++ b/code/lib/channel-postmessage/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'channel-postmessage', +}; diff --git a/code/lib/channel-websocket/jest.config.js b/code/lib/channel-websocket/jest.config.js new file mode 100644 index 000000000000..24548addcb2b --- /dev/null +++ b/code/lib/channel-websocket/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'channel-websocket', +}; diff --git a/code/lib/channels/jest.config.js b/code/lib/channels/jest.config.js new file mode 100644 index 000000000000..383553b228d4 --- /dev/null +++ b/code/lib/channels/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'channels', +}; diff --git a/code/lib/cli/jest.config.js b/code/lib/cli/jest.config.js new file mode 100644 index 000000000000..8112772ca053 --- /dev/null +++ b/code/lib/cli/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'cli', +}; diff --git a/code/lib/client-api/jest.config.js b/code/lib/client-api/jest.config.js new file mode 100644 index 000000000000..f7c7b3e452fe --- /dev/null +++ b/code/lib/client-api/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'client-api', +}; diff --git a/code/lib/client-logger/jest.config.js b/code/lib/client-logger/jest.config.js new file mode 100644 index 000000000000..48a8120e6ac5 --- /dev/null +++ b/code/lib/client-logger/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'client-logger', +}; diff --git a/code/lib/codemod/jest.config.js b/code/lib/codemod/jest.config.js new file mode 100644 index 000000000000..ee1c76c59fc6 --- /dev/null +++ b/code/lib/codemod/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'codemod', +}; diff --git a/code/lib/core-client/jest.config.js b/code/lib/core-client/jest.config.js new file mode 100644 index 000000000000..1ca60fc306f8 --- /dev/null +++ b/code/lib/core-client/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'core-client', +}; diff --git a/code/lib/core-common/jest.config.js b/code/lib/core-common/jest.config.js new file mode 100644 index 000000000000..cb3617d323c2 --- /dev/null +++ b/code/lib/core-common/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'core-common', +}; diff --git a/code/lib/core-events/jest.config.js b/code/lib/core-events/jest.config.js new file mode 100644 index 000000000000..fd437808dea7 --- /dev/null +++ b/code/lib/core-events/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'core-events', +}; diff --git a/code/lib/core-server/jest.config.js b/code/lib/core-server/jest.config.js new file mode 100644 index 000000000000..a11e8d504d67 --- /dev/null +++ b/code/lib/core-server/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'core-server', +}; diff --git a/code/lib/core-webpack/jest.config.js b/code/lib/core-webpack/jest.config.js new file mode 100644 index 000000000000..13a5afe2473f --- /dev/null +++ b/code/lib/core-webpack/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'core-webpack', +}; diff --git a/code/lib/csf-plugin/jest.config.js b/code/lib/csf-plugin/jest.config.js new file mode 100644 index 000000000000..aef17e5b36fd --- /dev/null +++ b/code/lib/csf-plugin/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'csf-plugin', +}; diff --git a/code/lib/csf-tools/jest.config.js b/code/lib/csf-tools/jest.config.js new file mode 100644 index 000000000000..516ff99ded8a --- /dev/null +++ b/code/lib/csf-tools/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'csf-tools', +}; diff --git a/code/lib/docs-tools/jest.config.js b/code/lib/docs-tools/jest.config.js new file mode 100644 index 000000000000..67a0e0d9102f --- /dev/null +++ b/code/lib/docs-tools/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'docs-tools', +}; diff --git a/code/lib/instrumenter/jest.config.js b/code/lib/instrumenter/jest.config.js new file mode 100644 index 000000000000..dfcba9243cdd --- /dev/null +++ b/code/lib/instrumenter/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'instrumenter', +}; diff --git a/code/lib/node-logger/jest.config.js b/code/lib/node-logger/jest.config.js new file mode 100644 index 000000000000..b1a5187c047a --- /dev/null +++ b/code/lib/node-logger/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'node-logger', +}; diff --git a/code/lib/postinstall/jest.config.js b/code/lib/postinstall/jest.config.js new file mode 100644 index 000000000000..bbb1f56efeca --- /dev/null +++ b/code/lib/postinstall/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'postinstall', +}; diff --git a/code/lib/preview-web/jest.config.js b/code/lib/preview-web/jest.config.js new file mode 100644 index 000000000000..aaaa4707b09f --- /dev/null +++ b/code/lib/preview-web/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'preview-web', +}; diff --git a/code/lib/router/jest.config.js b/code/lib/router/jest.config.js new file mode 100644 index 000000000000..5a57c1662bda --- /dev/null +++ b/code/lib/router/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'router', +}; diff --git a/code/lib/source-loader/jest.config.js b/code/lib/source-loader/jest.config.js new file mode 100644 index 000000000000..74e7cecae6f8 --- /dev/null +++ b/code/lib/source-loader/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'source-loader', +}; diff --git a/code/lib/store/jest.config.js b/code/lib/store/jest.config.js new file mode 100644 index 000000000000..b53d1d6072f8 --- /dev/null +++ b/code/lib/store/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'store', +}; diff --git a/code/lib/telemetry/jest.config.js b/code/lib/telemetry/jest.config.js new file mode 100644 index 000000000000..89d8d4cd72b3 --- /dev/null +++ b/code/lib/telemetry/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'telemetry', +}; diff --git a/code/lib/theming/jest.config.js b/code/lib/theming/jest.config.js new file mode 100644 index 000000000000..5f5a1b1cd84e --- /dev/null +++ b/code/lib/theming/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'theming', +}; From 8e0511563039959e1f2a93e1784f1d8a85838841 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 13:47:30 -0500 Subject: [PATCH 060/258] Update a few jest package stragglers --- code/lib/codemod/package.json | 2 +- code/lib/postinstall/package.json | 2 +- code/yarn.lock | 740 +-------------------------- scripts/package.json | 2 +- scripts/yarn.lock | 820 ++---------------------------- 5 files changed, 60 insertions(+), 1506 deletions(-) diff --git a/code/lib/codemod/package.json b/code/lib/codemod/package.json index 61a87d4def31..e0c8232c0297 100644 --- a/code/lib/codemod/package.json +++ b/code/lib/codemod/package.json @@ -51,7 +51,7 @@ "util": "^0.12.4" }, "devDependencies": { - "jest": "^26.6.3", + "jest": "^28.0.0", "jest-specific-snapshot": "^4.0.0", "typescript": "~4.6.3" }, diff --git a/code/lib/postinstall/package.json b/code/lib/postinstall/package.json index 914ed77992a7..67fb5f110840 100644 --- a/code/lib/postinstall/package.json +++ b/code/lib/postinstall/package.json @@ -43,7 +43,7 @@ "prep": "../../../scripts/prepare/bundle.ts" }, "devDependencies": { - "jest": "^26.6.3", + "jest": "^28.0.0", "jest-specific-snapshot": "^4.0.0", "jscodeshift": "^0.13.1", "typescript": "~4.6.3" diff --git a/code/yarn.lock b/code/yarn.lock index 409e71341ac6..beafd1667b36 100644 --- a/code/yarn.lock +++ b/code/yarn.lock @@ -2130,7 +2130,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.12.11, @babel/traverse@npm:^7.16.10, @babel/traverse@npm:^7.19.0, @babel/traverse@npm:^7.19.1, @babel/traverse@npm:^7.19.4, @babel/traverse@npm:^7.19.6, @babel/traverse@npm:^7.4.3, @babel/traverse@npm:^7.4.5, @babel/traverse@npm:^7.7.0, @babel/traverse@npm:^7.7.2, @babel/traverse@npm:^7.8.6": +"@babel/traverse@npm:^7.1.6, @babel/traverse@npm:^7.12.11, @babel/traverse@npm:^7.16.10, @babel/traverse@npm:^7.19.0, @babel/traverse@npm:^7.19.1, @babel/traverse@npm:^7.19.4, @babel/traverse@npm:^7.19.6, @babel/traverse@npm:^7.4.3, @babel/traverse@npm:^7.4.5, @babel/traverse@npm:^7.7.0, @babel/traverse@npm:^7.7.2, @babel/traverse@npm:^7.8.6": version: 7.19.6 resolution: "@babel/traverse@npm:7.19.6" dependencies: @@ -2872,20 +2872,6 @@ __metadata: languageName: node linkType: hard -"@jest/console@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/console@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - "@types/node": "*" - chalk: ^4.0.0 - jest-message-util: ^26.6.2 - jest-util: ^26.6.2 - slash: ^3.0.0 - checksum: e85a68b1ef49e5ecadb0055812c2493a92592b5206c26e78ce6b21869aff2847e4c808beae1dd353738c24fd51fa9d5bf135ced62931844a5d57f9ff4f40743a - languageName: node - linkType: hard - "@jest/console@npm:^27.5.1": version: 27.5.1 resolution: "@jest/console@npm:27.5.1" @@ -2914,42 +2900,6 @@ __metadata: languageName: node linkType: hard -"@jest/core@npm:^26.6.3": - version: 26.6.3 - resolution: "@jest/core@npm:26.6.3" - dependencies: - "@jest/console": ^26.6.2 - "@jest/reporters": ^26.6.2 - "@jest/test-result": ^26.6.2 - "@jest/transform": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - ansi-escapes: ^4.2.1 - chalk: ^4.0.0 - exit: ^0.1.2 - graceful-fs: ^4.2.4 - jest-changed-files: ^26.6.2 - jest-config: ^26.6.3 - jest-haste-map: ^26.6.2 - jest-message-util: ^26.6.2 - jest-regex-util: ^26.0.0 - jest-resolve: ^26.6.2 - jest-resolve-dependencies: ^26.6.3 - jest-runner: ^26.6.3 - jest-runtime: ^26.6.3 - jest-snapshot: ^26.6.2 - jest-util: ^26.6.2 - jest-validate: ^26.6.2 - jest-watcher: ^26.6.2 - micromatch: ^4.0.2 - p-each-series: ^2.1.0 - rimraf: ^3.0.0 - slash: ^3.0.0 - strip-ansi: ^6.0.0 - checksum: 3a4816997f1e206e0dfc6ad236f53b8a554a9b705aa78a62bc754697b8adf8314187a5ac8cfbd31ee6a38feec1412dc17c85cefe39e6d9e21f5e7e2697452e7e - languageName: node - linkType: hard - "@jest/core@npm:^28.1.3": version: 28.1.3 resolution: "@jest/core@npm:28.1.3" @@ -3004,18 +2954,6 @@ __metadata: languageName: node linkType: hard -"@jest/environment@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/environment@npm:26.6.2" - dependencies: - "@jest/fake-timers": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - jest-mock: ^26.6.2 - checksum: b489afb2fa9bbde360f222bc905abd9abd77ae5802b16ca7a34d018405ad7df57a506c01efae8ff8b566c211314ec74b3f37a1cb850623e15eb1e6d020582197 - languageName: node - linkType: hard - "@jest/environment@npm:^28.1.3": version: 28.1.3 resolution: "@jest/environment@npm:28.1.3" @@ -3067,20 +3005,6 @@ __metadata: languageName: node linkType: hard -"@jest/fake-timers@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/fake-timers@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - "@sinonjs/fake-timers": ^6.0.1 - "@types/node": "*" - jest-message-util: ^26.6.2 - jest-mock: ^26.6.2 - jest-util: ^26.6.2 - checksum: 861b033ead8c749f0fecffb84cbe88603291d9db66129494d0059dee101616a2aa646fc32c8cab468826eeb32647d2b0b4f72869f048163cb3406ddd2902ece0 - languageName: node - linkType: hard - "@jest/fake-timers@npm:^28.1.3": version: 28.1.3 resolution: "@jest/fake-timers@npm:28.1.3" @@ -3095,17 +3019,6 @@ __metadata: languageName: node linkType: hard -"@jest/globals@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/globals@npm:26.6.2" - dependencies: - "@jest/environment": ^26.6.2 - "@jest/types": ^26.6.2 - expect: ^26.6.2 - checksum: 6516baa19339a62c8f5eeb2ef3871bfa5bd5645016f1eb87dbe52a37658e7b33b836a1325ba40db250df5d06c08dd1cb1532fbfac5712f4041561525b59bb03f - languageName: node - linkType: hard - "@jest/globals@npm:^28.0.0, @jest/globals@npm:^28.1.3": version: 28.1.3 resolution: "@jest/globals@npm:28.1.3" @@ -3155,42 +3068,6 @@ __metadata: languageName: node linkType: hard -"@jest/reporters@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/reporters@npm:26.6.2" - dependencies: - "@bcoe/v8-coverage": ^0.2.3 - "@jest/console": ^26.6.2 - "@jest/test-result": ^26.6.2 - "@jest/transform": ^26.6.2 - "@jest/types": ^26.6.2 - chalk: ^4.0.0 - collect-v8-coverage: ^1.0.0 - exit: ^0.1.2 - glob: ^7.1.2 - graceful-fs: ^4.2.4 - istanbul-lib-coverage: ^3.0.0 - istanbul-lib-instrument: ^4.0.3 - istanbul-lib-report: ^3.0.0 - istanbul-lib-source-maps: ^4.0.0 - istanbul-reports: ^3.0.2 - jest-haste-map: ^26.6.2 - jest-resolve: ^26.6.2 - jest-util: ^26.6.2 - jest-worker: ^26.6.2 - node-notifier: ^8.0.0 - slash: ^3.0.0 - source-map: ^0.6.0 - string-length: ^4.0.1 - terminal-link: ^2.0.0 - v8-to-istanbul: ^7.0.0 - dependenciesMeta: - node-notifier: - optional: true - checksum: 311f8c467fc2e810ca884cd9ef032c6c58a88c4c54b41a7c85ae6da5a27b3d4c7042938f62611cf19a336a0d487976b348b8f3414cced2802b815d81bf7c1d5f - languageName: node - linkType: hard - "@jest/reporters@npm:^28.1.3": version: 28.1.3 resolution: "@jest/reporters@npm:28.1.3" @@ -3258,17 +3135,6 @@ __metadata: languageName: node linkType: hard -"@jest/source-map@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/source-map@npm:26.6.2" - dependencies: - callsites: ^3.0.0 - graceful-fs: ^4.2.4 - source-map: ^0.6.0 - checksum: fad0b35abf71b9e35b63d4ea7ddafb227a176fa44b84b8efc749ec3911991203f4a58019dd403af8380de4de752f0d40c9fe4c69f76a0866d266e964a02042cb - languageName: node - linkType: hard - "@jest/source-map@npm:^28.1.2": version: 28.1.2 resolution: "@jest/source-map@npm:28.1.2" @@ -3303,18 +3169,6 @@ __metadata: languageName: node linkType: hard -"@jest/test-result@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/test-result@npm:26.6.2" - dependencies: - "@jest/console": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/istanbul-lib-coverage": ^2.0.0 - collect-v8-coverage: ^1.0.0 - checksum: 4b6f480ebf917f2f6beb5ebefc1c6dedaa768030706f184be9a545e3ad457bde802bae78c50e06f68310084921fb048e030a8eca2adfd7df9f46a6663abb0b98 - languageName: node - linkType: hard - "@jest/test-result@npm:^27.5.1": version: 27.5.1 resolution: "@jest/test-result@npm:27.5.1" @@ -3339,19 +3193,6 @@ __metadata: languageName: node linkType: hard -"@jest/test-sequencer@npm:^26.6.3": - version: 26.6.3 - resolution: "@jest/test-sequencer@npm:26.6.3" - dependencies: - "@jest/test-result": ^26.6.2 - graceful-fs: ^4.2.4 - jest-haste-map: ^26.6.2 - jest-runner: ^26.6.3 - jest-runtime: ^26.6.3 - checksum: 670cf1161a22716f8396baf2a2d9d1741ad169f8a0115f6b0c4f88f2cfc29fec9179bbcfd87f579a46a69b38af47abd5656fb7ded5face06c3960d8e1cdbbdae - languageName: node - linkType: hard - "@jest/test-sequencer@npm:^28.1.1, @jest/test-sequencer@npm:^28.1.3": version: 28.1.3 resolution: "@jest/test-sequencer@npm:28.1.3" @@ -3388,29 +3229,6 @@ __metadata: languageName: node linkType: hard -"@jest/transform@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/transform@npm:26.6.2" - dependencies: - "@babel/core": ^7.1.0 - "@jest/types": ^26.6.2 - babel-plugin-istanbul: ^6.0.0 - chalk: ^4.0.0 - convert-source-map: ^1.4.0 - fast-json-stable-stringify: ^2.0.0 - graceful-fs: ^4.2.4 - jest-haste-map: ^26.6.2 - jest-regex-util: ^26.0.0 - jest-util: ^26.6.2 - micromatch: ^4.0.2 - pirates: ^4.0.1 - slash: ^3.0.0 - source-map: ^0.6.1 - write-file-atomic: ^3.0.0 - checksum: 1a1d636528d9b122b87b870633763c67f131533fce61e5db536dfbbea0bbfe8fe130daededb686ccc230389473a2b8ece5d0e1eaf380066d8902bde48579de31 - languageName: node - linkType: hard - "@jest/transform@npm:^27.5.1": version: 27.5.1 resolution: "@jest/transform@npm:27.5.1" @@ -5291,15 +5109,6 @@ __metadata: languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^6.0.1": - version: 6.0.1 - resolution: "@sinonjs/fake-timers@npm:6.0.1" - dependencies: - "@sinonjs/commons": ^1.7.0 - checksum: a77bead4d71b40d6f7f9a3ad66a00269aa2c078260f43f594b8aed4676c6c4e7c2b642d4b8e34df314e1c971589455f7b4267ab831bf44ffdccc0bda599850ad - languageName: node - linkType: hard - "@sinonjs/fake-timers@npm:^9.1.2": version: 9.1.2 resolution: "@sinonjs/fake-timers@npm:9.1.2" @@ -6345,7 +6154,7 @@ __metadata: "@storybook/types": 7.0.0-alpha.48 cross-spawn: ^7.0.3 globby: ^11.0.2 - jest: ^26.6.3 + jest: ^28.0.0 jest-specific-snapshot: ^4.0.0 jscodeshift: ^0.13.1 lodash: ^4.17.21 @@ -6938,7 +6747,7 @@ __metadata: version: 0.0.0-use.local resolution: "@storybook/postinstall@workspace:lib/postinstall" dependencies: - jest: ^26.6.3 + jest: ^28.0.0 jest-specific-snapshot: ^4.0.0 jscodeshift: ^0.13.1 typescript: ~4.6.3 @@ -8238,7 +8047,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.1.7": +"@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14": version: 7.1.19 resolution: "@types/babel__core@npm:7.1.19" dependencies: @@ -10060,7 +9869,7 @@ __metadata: languageName: node linkType: hard -"abab@npm:^2.0.0, abab@npm:^2.0.3, abab@npm:^2.0.5, abab@npm:^2.0.6": +"abab@npm:^2.0.0, abab@npm:^2.0.5, abab@npm:^2.0.6": version: 2.0.6 resolution: "abab@npm:2.0.6" checksum: 0b245c3c3ea2598fe0025abf7cc7bb507b06949d51e8edae5d12c1b847a0a0c09639abcb94788332b4e2044ac4491c1e8f571b51c7826fd4b0bda1685ad4a278 @@ -10226,7 +10035,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.2.4, acorn@npm:^8.4.1, acorn@npm:^8.5.0, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.0": +"acorn@npm:^8.0.0, acorn@npm:^8.4.1, acorn@npm:^8.5.0, acorn@npm:^8.6.0, acorn@npm:^8.7.1, acorn@npm:^8.8.0": version: 8.8.1 resolution: "acorn@npm:8.8.1" bin: @@ -11194,24 +11003,6 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^26.6.3": - version: 26.6.3 - resolution: "babel-jest@npm:26.6.3" - dependencies: - "@jest/transform": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/babel__core": ^7.1.7 - babel-plugin-istanbul: ^6.0.0 - babel-preset-jest: ^26.6.2 - chalk: ^4.0.0 - graceful-fs: ^4.2.4 - slash: ^3.0.0 - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 355e431fbd663fd43dcf68c93edcf66e31c3295c35754739edb3ce39435fdc407de75540b310b370e6eb924af528839b6effb8de21870ad12423aac31e258221 - languageName: node - linkType: hard - "babel-jest@npm:^28.0.0, babel-jest@npm:^28.1.1, babel-jest@npm:^28.1.3": version: 28.1.3 resolution: "babel-jest@npm:28.1.3" @@ -11311,7 +11102,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-istanbul@npm:6.1.1, babel-plugin-istanbul@npm:^6.0.0, babel-plugin-istanbul@npm:^6.1.1": +"babel-plugin-istanbul@npm:6.1.1, babel-plugin-istanbul@npm:^6.1.1": version: 6.1.1 resolution: "babel-plugin-istanbul@npm:6.1.1" dependencies: @@ -11336,18 +11127,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-jest-hoist@npm:^26.6.2": - version: 26.6.2 - resolution: "babel-plugin-jest-hoist@npm:26.6.2" - dependencies: - "@babel/template": ^7.3.3 - "@babel/types": ^7.3.3 - "@types/babel__core": ^7.0.0 - "@types/babel__traverse": ^7.0.6 - checksum: 2fcddf7b338e38453d6a42c23db5b790e4188fcbffeba8ff74a62b7d64fe5a642b009a7bd780e47840c382600628de2a6486a92bb151648c64028a6c628e9bfd - languageName: node - linkType: hard - "babel-plugin-jest-hoist@npm:^28.1.3": version: 28.1.3 resolution: "babel-plugin-jest-hoist@npm:28.1.3" @@ -11492,18 +11271,6 @@ __metadata: languageName: node linkType: hard -"babel-preset-jest@npm:^26.6.2": - version: 26.6.2 - resolution: "babel-preset-jest@npm:26.6.2" - dependencies: - babel-plugin-jest-hoist: ^26.6.2 - babel-preset-current-node-syntax: ^1.0.0 - peerDependencies: - "@babel/core": ^7.0.0 - checksum: b6e0efe33b485eb2fba019026933e46d680605b3bf84a6b7378f1df8344b890f66318c49129921dd98bf5819694316312a97b50b16d9aa377faf8624f9f0db5b - languageName: node - linkType: hard - "babel-preset-jest@npm:^28.1.3": version: 28.1.3 resolution: "babel-preset-jest@npm:28.1.3" @@ -12522,7 +12289,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.0.0, camelcase@npm:^6.2.0": +"camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 0d701658219bd3116d12da3eab31acddb3f9440790c0792e0d398f0a520a6a4058018e546862b6fba89d7ae990efaeb97da71e1913e9ebf5a8b5621a3d55c710 @@ -12844,13 +12611,6 @@ __metadata: languageName: node linkType: hard -"cjs-module-lexer@npm:^0.6.0": - version: 0.6.0 - resolution: "cjs-module-lexer@npm:0.6.0" - checksum: a4fe091f5551e8580d74c0afbf767893ea0ace49f8e33eecb54ae8e325661f31d44752171b4ec52d33aca90c4d854114afe315aa6021780a3c49a0f4a67924b5 - languageName: node - linkType: hard - "cjs-module-lexer@npm:^1.0.0": version: 1.2.2 resolution: "cjs-module-lexer@npm:1.2.2" @@ -13997,7 +13757,7 @@ __metadata: languageName: node linkType: hard -"cssom@npm:^0.4.1, cssom@npm:^0.4.4": +"cssom@npm:^0.4.1": version: 0.4.4 resolution: "cssom@npm:0.4.4" checksum: 0d4fc70255ea3afbd4add79caffa3b01720929da91105340600d8c0f06c31716f933c6314c3d43b62b57c9637bc2eb35296a9e2db427e8b572ee38a4be2b5f82 @@ -14173,17 +13933,6 @@ __metadata: languageName: node linkType: hard -"data-urls@npm:^2.0.0": - version: 2.0.0 - resolution: "data-urls@npm:2.0.0" - dependencies: - abab: ^2.0.3 - whatwg-mimetype: ^2.3.0 - whatwg-url: ^8.0.0 - checksum: 1246442178eb756afb1d99e54669a119eafb3e69c73300d14089687c50c64f9feadd93c973f496224a12f89daa94267a6114aecd70e9b279c09d908c5be44d01 - languageName: node - linkType: hard - "data-urls@npm:^3.0.1": version: 3.0.2 resolution: "data-urls@npm:3.0.2" @@ -14307,7 +14056,7 @@ __metadata: languageName: node linkType: hard -"decimal.js@npm:^10.2.1, decimal.js@npm:^10.3.1": +"decimal.js@npm:^10.3.1": version: 10.4.2 resolution: "decimal.js@npm:10.4.2" checksum: 2f50de33c9c9fcd4c7ffd74cd02edecadeaa4d954e14ef721ee1d381d293c9237b1a90f54198b91f06fd5d3bb8b97079bba54fbc9ccd205d9e6bc8ffa82f6202 @@ -14877,15 +14626,6 @@ __metadata: languageName: node linkType: hard -"domexception@npm:^2.0.1": - version: 2.0.1 - resolution: "domexception@npm:2.0.1" - dependencies: - webidl-conversions: ^5.0.0 - checksum: 24a3a07b85420671bc805ead7305e0f2ec9e55f104889b64c5a9fa7d93681e514f05c65f947bd9401b3da67f77b92fe7861bd15f4d0d418c4d32e34a2cd55d38 - languageName: node - linkType: hard - "domexception@npm:^4.0.0": version: 4.0.0 resolution: "domexception@npm:4.0.0" @@ -15370,13 +15110,6 @@ __metadata: languageName: node linkType: hard -"emittery@npm:^0.7.1": - version: 0.7.2 - resolution: "emittery@npm:0.7.2" - checksum: a90d8b59a14de5f3c2bf9d9884867ab6f62d1da1363b660e1429543286f627372c07b70d78465e739f4a616ba1e6638f63c831ef0da146b89c7935f1e5a96ad5 - languageName: node - linkType: hard - "emoji-regex@npm:^7.0.1": version: 7.0.3 resolution: "emoji-regex@npm:7.0.3" @@ -16916,7 +16649,7 @@ __metadata: languageName: node linkType: hard -"execa@npm:^4.0.0, execa@npm:^4.0.2, execa@npm:^4.1.0": +"execa@npm:^4.0.2, execa@npm:^4.1.0": version: 4.1.0 resolution: "execa@npm:4.1.0" dependencies: @@ -18841,13 +18574,6 @@ __metadata: languageName: node linkType: hard -"growly@npm:^1.3.0": - version: 1.3.0 - resolution: "growly@npm:1.3.0" - checksum: 3043bd5c064e87f89e8c9b66894ed09fd882c7fa645621a543b45b72f040c7241e25061207a858ab191be2fbdac34795ff57c2a40962b154a6b2908a5e509252 - languageName: node - linkType: hard - "handle-thing@npm:^2.0.0": version: 2.0.1 resolution: "handle-thing@npm:2.0.1" @@ -19240,15 +18966,6 @@ __metadata: languageName: node linkType: hard -"html-encoding-sniffer@npm:^2.0.1": - version: 2.0.1 - resolution: "html-encoding-sniffer@npm:2.0.1" - dependencies: - whatwg-encoding: ^1.0.5 - checksum: 6dc3aa2d35a8f0c8c7906ffb665dd24a88f7004f913fafdd3541d24a4da6182ab30c4a0a81387649a1234ecb90182c4136220ed12ae3dc1a57ed68e533dea416 - languageName: node - linkType: hard - "html-encoding-sniffer@npm:^3.0.0": version: 3.0.0 resolution: "html-encoding-sniffer@npm:3.0.0" @@ -20966,18 +20683,6 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-instrument@npm:^4.0.3": - version: 4.0.3 - resolution: "istanbul-lib-instrument@npm:4.0.3" - dependencies: - "@babel/core": ^7.7.5 - "@istanbuljs/schema": ^0.1.2 - istanbul-lib-coverage: ^3.0.0 - semver: ^6.3.0 - checksum: 7f1005566a912e33e847576b2c1072d48a7c556810a54d912f3e2f0bd966171e68b30c40b0c1ce6ee9b8864de422d0c10e2d0dfd2d25b48723950cc78cd437c2 - languageName: node - linkType: hard - "istanbul-lib-instrument@npm:^5.0.4, istanbul-lib-instrument@npm:^5.1.0": version: 5.2.1 resolution: "istanbul-lib-instrument@npm:5.2.1" @@ -21013,7 +20718,7 @@ __metadata: languageName: node linkType: hard -"istanbul-reports@npm:^3.0.2, istanbul-reports@npm:^3.1.3, istanbul-reports@npm:^3.1.4": +"istanbul-reports@npm:^3.1.3, istanbul-reports@npm:^3.1.4": version: 3.1.5 resolution: "istanbul-reports@npm:3.1.5" dependencies: @@ -21055,17 +20760,6 @@ __metadata: languageName: node linkType: hard -"jest-changed-files@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-changed-files@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - execa: ^4.0.0 - throat: ^5.0.0 - checksum: 6b679ba45c3fe08f659b59e2c22b6b773436e498aa57e62694ea1f185ed3d4e439bc1831dedca3df7b28d1562eec31ae9d79c65c8caea1dd5e620419da20013d - languageName: node - linkType: hard - "jest-changed-files@npm:^28.1.3": version: 28.1.3 resolution: "jest-changed-files@npm:28.1.3" @@ -21103,29 +20797,6 @@ __metadata: languageName: node linkType: hard -"jest-cli@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-cli@npm:26.6.3" - dependencies: - "@jest/core": ^26.6.3 - "@jest/test-result": ^26.6.2 - "@jest/types": ^26.6.2 - chalk: ^4.0.0 - exit: ^0.1.2 - graceful-fs: ^4.2.4 - import-local: ^3.0.2 - is-ci: ^2.0.0 - jest-config: ^26.6.3 - jest-util: ^26.6.2 - jest-validate: ^26.6.2 - prompts: ^2.0.1 - yargs: ^15.4.1 - bin: - jest: bin/jest.js - checksum: 3f62c26b300549115bcfc0393d7d49467d414d200bb211a8843fd48d0296ddbfc5e6fe808c64ad2039127657b662e3ba3db44166341bd5db2d089bf09cf82a2c - languageName: node - linkType: hard - "jest-cli@npm:^28.1.3": version: 28.1.3 resolution: "jest-cli@npm:28.1.3" @@ -21191,37 +20862,6 @@ __metadata: languageName: node linkType: hard -"jest-config@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-config@npm:26.6.3" - dependencies: - "@babel/core": ^7.1.0 - "@jest/test-sequencer": ^26.6.3 - "@jest/types": ^26.6.2 - babel-jest: ^26.6.3 - chalk: ^4.0.0 - deepmerge: ^4.2.2 - glob: ^7.1.1 - graceful-fs: ^4.2.4 - jest-environment-jsdom: ^26.6.2 - jest-environment-node: ^26.6.2 - jest-get-type: ^26.3.0 - jest-jasmine2: ^26.6.3 - jest-regex-util: ^26.0.0 - jest-resolve: ^26.6.2 - jest-util: ^26.6.2 - jest-validate: ^26.6.2 - micromatch: ^4.0.2 - pretty-format: ^26.6.2 - peerDependencies: - ts-node: ">=9.0.0" - peerDependenciesMeta: - ts-node: - optional: true - checksum: 7ca34c8d4fa48d9af081e05a2a7a54df5ad03df14dc1edca52f162c65f54fbd3745c14512b3f9dd42b753bd90d4aec4b86a7e1fdd410780bc79d27be3af5a36e - languageName: node - linkType: hard - "jest-config@npm:^28.1.3": version: 28.1.3 resolution: "jest-config@npm:28.1.3" @@ -21308,15 +20948,6 @@ __metadata: languageName: node linkType: hard -"jest-docblock@npm:^26.0.0": - version: 26.0.0 - resolution: "jest-docblock@npm:26.0.0" - dependencies: - detect-newline: ^3.0.0 - checksum: 769c9379a906b98afd9fa2feca3a271a06bec62e26bb99e7bba4182ead955b677cbedeaa7b129653dd21ee9473604c40836651f7c4c1265e37ca2a68e01e0f8b - languageName: node - linkType: hard - "jest-docblock@npm:^28.1.1": version: 28.1.1 resolution: "jest-docblock@npm:28.1.1" @@ -21326,19 +20957,6 @@ __metadata: languageName: node linkType: hard -"jest-each@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-each@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - chalk: ^4.0.0 - jest-get-type: ^26.3.0 - jest-util: ^26.6.2 - pretty-format: ^26.6.2 - checksum: 93fca8619afba3e9f77903929a5f4ba84a4b4ab22852d062a24e7029038456b2d5bef5761afa1c3ac52a59434484f101d44beae35f3b7e5ec1a8aa695a1c879a - languageName: node - linkType: hard - "jest-each@npm:^28.1.3": version: 28.1.3 resolution: "jest-each@npm:28.1.3" @@ -21379,21 +20997,6 @@ __metadata: languageName: node linkType: hard -"jest-environment-jsdom@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-environment-jsdom@npm:26.6.2" - dependencies: - "@jest/environment": ^26.6.2 - "@jest/fake-timers": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - jest-mock: ^26.6.2 - jest-util: ^26.6.2 - jsdom: ^16.4.0 - checksum: 5bbcc49240d59e966adb690ae73bdd7cd650b401a2420837c4770dbd148ddb2d417bcfb9fe0b4f5e85fda5d5d2e93e62788b699350eb6bd924cbf6bc9c833080 - languageName: node - linkType: hard - "jest-environment-jsdom@npm:^28.0.0": version: 28.1.3 resolution: "jest-environment-jsdom@npm:28.1.3" @@ -21410,20 +21013,6 @@ __metadata: languageName: node linkType: hard -"jest-environment-node@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-environment-node@npm:26.6.2" - dependencies: - "@jest/environment": ^26.6.2 - "@jest/fake-timers": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - jest-mock: ^26.6.2 - jest-util: ^26.6.2 - checksum: 887382992bfd8110337cdc6e8a931f647d78363aa1ed777a2d9ff0f2edc468e6cc9e9b9a5d26c772534d0bd8ec41d860e433beb2d6f3c8a8a2cab3007ceec126 - languageName: node - linkType: hard - "jest-environment-node@npm:^28.1.1, jest-environment-node@npm:^28.1.3": version: 28.1.3 resolution: "jest-environment-node@npm:28.1.3" @@ -21594,32 +21183,6 @@ __metadata: languageName: node linkType: hard -"jest-jasmine2@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-jasmine2@npm:26.6.3" - dependencies: - "@babel/traverse": ^7.1.0 - "@jest/environment": ^26.6.2 - "@jest/source-map": ^26.6.2 - "@jest/test-result": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - chalk: ^4.0.0 - co: ^4.6.0 - expect: ^26.6.2 - is-generator-fn: ^2.0.0 - jest-each: ^26.6.2 - jest-matcher-utils: ^26.6.2 - jest-message-util: ^26.6.2 - jest-runtime: ^26.6.3 - jest-snapshot: ^26.6.2 - jest-util: ^26.6.2 - pretty-format: ^26.6.2 - throat: ^5.0.0 - checksum: 9154ceb08fdfd263a1850af9008b6e5ab4d1242af45fede5a6580fc1db85cd9072a27b609590e76ae8d80e281b2ec96476528e8d37938b92061b746e88330f77 - languageName: node - linkType: hard - "jest-jasmine2@npm:^28.0.0": version: 28.1.3 resolution: "jest-jasmine2@npm:28.1.3" @@ -21657,16 +21220,6 @@ __metadata: languageName: node linkType: hard -"jest-leak-detector@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-leak-detector@npm:26.6.2" - dependencies: - jest-get-type: ^26.3.0 - pretty-format: ^26.6.2 - checksum: 6062c04531126d1dfb3dee21483963dd75a975cb89a105b54cf767cc350b174ffcc9177d8750d14e30f36c475be7d96554c558bdf1f1ae6ad9b93bcea7097312 - languageName: node - linkType: hard - "jest-leak-detector@npm:^28.1.3": version: 28.1.3 resolution: "jest-leak-detector@npm:28.1.3" @@ -21818,16 +21371,6 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-mock@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - "@types/node": "*" - checksum: cf77b49efe76cdedc63363ccdbae8bc68e0301fbded669e7b45647b7b7c1dce90985cf6a3a13da161f644523d7d0aad03184c6f39302ee4b52f954a1de37960f - languageName: node - linkType: hard - "jest-mock@npm:^27.0.6, jest-mock@npm:^27.3.0": version: 27.5.1 resolution: "jest-mock@npm:27.5.1" @@ -21940,17 +21483,6 @@ __metadata: languageName: node linkType: hard -"jest-resolve-dependencies@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-resolve-dependencies@npm:26.6.3" - dependencies: - "@jest/types": ^26.6.2 - jest-regex-util: ^26.0.0 - jest-snapshot: ^26.6.2 - checksum: d8a9392354d7775e2e7234e854069a1e0d21ea616b8de162562b57d77e296b8259952d03f10e2a3031a2369657d5950a807391455dadbafb3f4523804a2585d6 - languageName: node - linkType: hard - "jest-resolve-dependencies@npm:^28.1.3": version: 28.1.3 resolution: "jest-resolve-dependencies@npm:28.1.3" @@ -22011,34 +21543,6 @@ __metadata: languageName: node linkType: hard -"jest-runner@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-runner@npm:26.6.3" - dependencies: - "@jest/console": ^26.6.2 - "@jest/environment": ^26.6.2 - "@jest/test-result": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - chalk: ^4.0.0 - emittery: ^0.7.1 - exit: ^0.1.2 - graceful-fs: ^4.2.4 - jest-config: ^26.6.3 - jest-docblock: ^26.0.0 - jest-haste-map: ^26.6.2 - jest-leak-detector: ^26.6.2 - jest-message-util: ^26.6.2 - jest-resolve: ^26.6.2 - jest-runtime: ^26.6.3 - jest-util: ^26.6.2 - jest-worker: ^26.6.2 - source-map-support: ^0.5.6 - throat: ^5.0.0 - checksum: 81ce9ce686623c93e50b34babd12a4fdd05edf00b0478570ae57aa2384942fe6fc1c8ca8ee6715ec15561d350f45ec3c26a19304c20b91d4cf51e73b54b0d347 - languageName: node - linkType: hard - "jest-runner@npm:^28.1.1, jest-runner@npm:^28.1.3": version: 28.1.3 resolution: "jest-runner@npm:28.1.3" @@ -22068,43 +21572,6 @@ __metadata: languageName: node linkType: hard -"jest-runtime@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-runtime@npm:26.6.3" - dependencies: - "@jest/console": ^26.6.2 - "@jest/environment": ^26.6.2 - "@jest/fake-timers": ^26.6.2 - "@jest/globals": ^26.6.2 - "@jest/source-map": ^26.6.2 - "@jest/test-result": ^26.6.2 - "@jest/transform": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/yargs": ^15.0.0 - chalk: ^4.0.0 - cjs-module-lexer: ^0.6.0 - collect-v8-coverage: ^1.0.0 - exit: ^0.1.2 - glob: ^7.1.3 - graceful-fs: ^4.2.4 - jest-config: ^26.6.3 - jest-haste-map: ^26.6.2 - jest-message-util: ^26.6.2 - jest-mock: ^26.6.2 - jest-regex-util: ^26.0.0 - jest-resolve: ^26.6.2 - jest-snapshot: ^26.6.2 - jest-util: ^26.6.2 - jest-validate: ^26.6.2 - slash: ^3.0.0 - strip-bom: ^4.0.0 - yargs: ^15.4.1 - bin: - jest-runtime: bin/jest-runtime.js - checksum: d0fd139d01b9af87b5546586e8c3907d61e95c07d52fe29d7e247f08830a074f1d35c5417449fcfc5c1e5e210dd5c08c48e4789ca7900586e7624c202388a346 - languageName: node - linkType: hard - "jest-runtime@npm:^28.1.3": version: 28.1.3 resolution: "jest-runtime@npm:28.1.3" @@ -22171,7 +21638,7 @@ __metadata: languageName: node linkType: hard -"jest-snapshot@npm:^26.3.0, jest-snapshot@npm:^26.6.2": +"jest-snapshot@npm:^26.3.0": version: 26.6.2 resolution: "jest-snapshot@npm:26.6.2" dependencies: @@ -22368,20 +21835,6 @@ __metadata: languageName: node linkType: hard -"jest-validate@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-validate@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - camelcase: ^6.0.0 - chalk: ^4.0.0 - jest-get-type: ^26.3.0 - leven: ^3.1.0 - pretty-format: ^26.6.2 - checksum: 0c8df164641e797f80011e359553411e097ea495b95b41100be00d6c827bfd854e92ef8c528fe4cac0d113055a5075d1409f2616099ec648dbd6809bb0a29c67 - languageName: node - linkType: hard - "jest-validate@npm:^28.1.1, jest-validate@npm:^28.1.3": version: 28.1.3 resolution: "jest-validate@npm:28.1.3" @@ -22428,21 +21881,6 @@ __metadata: languageName: node linkType: hard -"jest-watcher@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-watcher@npm:26.6.2" - dependencies: - "@jest/test-result": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - ansi-escapes: ^4.2.1 - chalk: ^4.0.0 - jest-util: ^26.6.2 - string-length: ^4.0.1 - checksum: 3a0caf17f3d586ec7099a576757336e6ba5ac6f2449e66aa1416214b32188970b1fa10f83e1aef58254a30a55a6698cbbb16aa5187c8023516d8bea8833aee12 - languageName: node - linkType: hard - "jest-watcher@npm:^27.0.0": version: 27.5.1 resolution: "jest-watcher@npm:27.5.1" @@ -22517,19 +21955,6 @@ __metadata: languageName: node linkType: hard -"jest@npm:^26.6.3": - version: 26.6.3 - resolution: "jest@npm:26.6.3" - dependencies: - "@jest/core": ^26.6.3 - import-local: ^3.0.2 - jest-cli: ^26.6.3 - bin: - jest: bin/jest.js - checksum: 4469f5c426f5b00855e2264dc4fce5ab16c0fab31d2dc6fc829d769ca7ec84a9c74763f7c1d281d085ad55897927a08df2b4778b0df899a66188ff0722e17d29 - languageName: node - linkType: hard - "jest@npm:^28.0.0": version: 28.1.3 resolution: "jest@npm:28.1.3" @@ -22738,46 +22163,6 @@ __metadata: languageName: node linkType: hard -"jsdom@npm:^16.4.0": - version: 16.7.0 - resolution: "jsdom@npm:16.7.0" - dependencies: - abab: ^2.0.5 - acorn: ^8.2.4 - acorn-globals: ^6.0.0 - cssom: ^0.4.4 - cssstyle: ^2.3.0 - data-urls: ^2.0.0 - decimal.js: ^10.2.1 - domexception: ^2.0.1 - escodegen: ^2.0.0 - form-data: ^3.0.0 - html-encoding-sniffer: ^2.0.1 - http-proxy-agent: ^4.0.1 - https-proxy-agent: ^5.0.0 - is-potential-custom-element-name: ^1.0.1 - nwsapi: ^2.2.0 - parse5: 6.0.1 - saxes: ^5.0.1 - symbol-tree: ^3.2.4 - tough-cookie: ^4.0.0 - w3c-hr-time: ^1.0.2 - w3c-xmlserializer: ^2.0.0 - webidl-conversions: ^6.1.0 - whatwg-encoding: ^1.0.5 - whatwg-mimetype: ^2.3.0 - whatwg-url: ^8.5.0 - ws: ^7.4.6 - xml-name-validator: ^3.0.0 - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - checksum: e9ba6ea5f5e0d18647ccedec16bc3c69c8c739732ffcb27c66ffd3cc3f876add291ca4f0b9c209ace939ce2aa3ba9e4d67b7f05317921a4d3eab02fe1cc164ef - languageName: node - linkType: hard - "jsdom@npm:^19.0.0": version: 19.0.0 resolution: "jsdom@npm:19.0.0" @@ -23979,7 +23364,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:4.x, lodash@npm:^4.17.12, lodash@npm:^4.17.13, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.2.1, lodash@npm:^4.7.0": +"lodash@npm:4.17.21, lodash@npm:4.x, lodash@npm:^4.17.12, lodash@npm:^4.17.13, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.2.1": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c @@ -26116,20 +25501,6 @@ __metadata: languageName: node linkType: hard -"node-notifier@npm:^8.0.0": - version: 8.0.2 - resolution: "node-notifier@npm:8.0.2" - dependencies: - growly: ^1.3.0 - is-wsl: ^2.2.0 - semver: ^7.3.2 - shellwords: ^0.1.1 - uuid: ^8.3.0 - which: ^2.0.2 - checksum: 8df8618628c14ef26214a376dbde425264b92ae5e5944d21807f41e3d2ed3ff29f6c5aba089f4a5f22328b2157aa874e93f2304a2134b1ee59508cedf7e889bb - languageName: node - linkType: hard - "node-releases@npm:^2.0.6": version: 2.0.6 resolution: "node-releases@npm:2.0.6" @@ -26855,13 +26226,6 @@ __metadata: languageName: node linkType: hard -"p-each-series@npm:^2.1.0": - version: 2.2.0 - resolution: "p-each-series@npm:2.2.0" - checksum: 32a7cce1312bf70f99079db2ff070fc3ee2ed6efe0fa0444616fa38f79730ad09b461d009127d25254c4c865c40b6664e2c656b1a7b2c4781756d9173c974269 - languageName: node - linkType: hard - "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -31529,13 +30893,6 @@ __metadata: languageName: node linkType: hard -"shellwords@npm:^0.1.1": - version: 0.1.1 - resolution: "shellwords@npm:0.1.1" - checksum: 7d66b28927e0b524b71b2e185651fcd88a70473a077dd230fbf86188380e948ffb36cea00832d78fc13c93cd15f6f52286fb05f2746b7580623ca1ec619eb004 - languageName: node - linkType: hard - "shx@npm:^0.3.2": version: 0.3.4 resolution: "shx@npm:0.3.4" @@ -31858,7 +31215,7 @@ __metadata: languageName: node linkType: hard -"source-map-support@npm:0.5.21, source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.5, source-map-support@npm:^0.5.6, source-map-support@npm:~0.5.20": +"source-map-support@npm:0.5.21, source-map-support@npm:^0.5.16, source-map-support@npm:^0.5.5, source-map-support@npm:~0.5.20": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" dependencies: @@ -33229,13 +32586,6 @@ __metadata: languageName: node linkType: hard -"throat@npm:^5.0.0": - version: 5.0.0 - resolution: "throat@npm:5.0.0" - checksum: 1b9c661dabf93ff9026fecd781ccfd9b507c41b9d5e581614884fffd09f3f9ebfe26d3be668ccf904fd324dd3f6efe1a3ec7f83e91b1dff9fdcc6b7d39b8bfe3 - languageName: node - linkType: hard - "throttle-debounce@npm:^3.0.1": version: 3.0.1 resolution: "throttle-debounce@npm:3.0.1" @@ -33478,15 +32828,6 @@ __metadata: languageName: node linkType: hard -"tr46@npm:^2.1.0": - version: 2.1.0 - resolution: "tr46@npm:2.1.0" - dependencies: - punycode: ^2.1.1 - checksum: 397f5c39d97c5fe29fa9bab73b03853be18ad2738b2c66ee5ce84ecb36b091bdaec493f9b3cee711d45f7678f342452600843264cc8242b591c8dc983146a6c4 - languageName: node - linkType: hard - "tr46@npm:^3.0.0": version: 3.0.0 resolution: "tr46@npm:3.0.0" @@ -34793,7 +34134,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:8.3.2, uuid@npm:^8.0.0, uuid@npm:^8.3.0, uuid@npm:^8.3.2": +"uuid@npm:8.3.2, uuid@npm:^8.0.0, uuid@npm:^8.3.2": version: 8.3.2 resolution: "uuid@npm:8.3.2" bin: @@ -34839,17 +34180,6 @@ __metadata: languageName: node linkType: hard -"v8-to-istanbul@npm:^7.0.0": - version: 7.1.2 - resolution: "v8-to-istanbul@npm:7.1.2" - dependencies: - "@types/istanbul-lib-coverage": ^2.0.1 - convert-source-map: ^1.6.0 - source-map: ^0.7.3 - checksum: a901917e3e321e2c74a9582cbe6652ff2b983040a683c924ce98fbccdfe249cbcb34d7d7913a13a7e4eee9bed3a51c7181b09103f4405d92f4ebac1cc40dc005 - languageName: node - linkType: hard - "v8-to-istanbul@npm:^9.0.0, v8-to-istanbul@npm:^9.0.1": version: 9.0.1 resolution: "v8-to-istanbul@npm:9.0.1" @@ -35406,15 +34736,6 @@ __metadata: languageName: node linkType: hard -"w3c-xmlserializer@npm:^2.0.0": - version: 2.0.0 - resolution: "w3c-xmlserializer@npm:2.0.0" - dependencies: - xml-name-validator: ^3.0.0 - checksum: 92b8af34766f5bb8f37c505bc459ee1791b30af778d3a86551f7dd3b1716f79cb98c71d65d03f2bf6eba6b09861868eaf2be7e233b9202b26a9df7595f2bd290 - languageName: node - linkType: hard - "w3c-xmlserializer@npm:^3.0.0": version: 3.0.0 resolution: "w3c-xmlserializer@npm:3.0.0" @@ -35554,20 +34875,6 @@ __metadata: languageName: node linkType: hard -"webidl-conversions@npm:^5.0.0": - version: 5.0.0 - resolution: "webidl-conversions@npm:5.0.0" - checksum: bf31df332ed11e1114bfcae7712d9ab2c37e7faa60ba32d8fdbee785937c0b012eee235c19d2b5d84f5072db84a160e8d08dd382da7f850feec26a4f46add8ff - languageName: node - linkType: hard - -"webidl-conversions@npm:^6.1.0": - version: 6.1.0 - resolution: "webidl-conversions@npm:6.1.0" - checksum: 66ad3b9073cd1e0e173444d8c636673b016e25b5856694429072cc966229adb734a8d410188e031effadcfb837936d79bc9e87c48f4d5925a90d42dec97f6590 - languageName: node - linkType: hard - "webidl-conversions@npm:^7.0.0": version: 7.0.0 resolution: "webidl-conversions@npm:7.0.0" @@ -35848,17 +35155,6 @@ __metadata: languageName: node linkType: hard -"whatwg-url@npm:^8.0.0, whatwg-url@npm:^8.5.0": - version: 8.7.0 - resolution: "whatwg-url@npm:8.7.0" - dependencies: - lodash: ^4.7.0 - tr46: ^2.1.0 - webidl-conversions: ^6.1.0 - checksum: de0bc94387dba586b278e701cf5a1c1f5002725d22b8564dbca2cab1966ef24b839018e57ae2423fb514d8a2dd3aa3bf97323e2f89b55cd89e79141e432e9df1 - languageName: node - linkType: hard - "which-boxed-primitive@npm:^1.0.1, which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" @@ -36176,7 +35472,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^7.0.0, ws@npm:^7.2.3, ws@npm:^7.4.6": +"ws@npm:^7.0.0, ws@npm:^7.2.3": version: 7.5.9 resolution: "ws@npm:7.5.9" peerDependencies: @@ -36424,7 +35720,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^15.3.1, yargs@npm:^15.4.1": +"yargs@npm:^15.3.1": version: 15.4.1 resolution: "yargs@npm:15.4.1" dependencies: diff --git a/scripts/package.json b/scripts/package.json index dcf2132d99f5..d17158b386a2 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -127,7 +127,7 @@ "jest-environment-jsdom": "^28.0.0", "jest-enzyme": "^7.1.2", "jest-image-snapshot": "^4.3.0", - "jest-jasmine2": "^26.6.3", + "jest-jasmine2": "^28.0.0", "jest-junit": "^13.0.0", "jest-os-detection": "^1.3.1", "jest-raw-loader": "^1.0.1", diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 0f6657f6293f..752520f80c40 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -1554,7 +1554,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.19.0, @babel/traverse@npm:^7.19.1, @babel/traverse@npm:^7.19.3, @babel/traverse@npm:^7.4.3, @babel/traverse@npm:^7.7.0, @babel/traverse@npm:^7.7.2": +"@babel/traverse@npm:^7.19.0, @babel/traverse@npm:^7.19.1, @babel/traverse@npm:^7.19.3, @babel/traverse@npm:^7.4.3, @babel/traverse@npm:^7.7.0, @babel/traverse@npm:^7.7.2": version: 7.19.3 resolution: "@babel/traverse@npm:7.19.3" dependencies: @@ -1957,20 +1957,6 @@ __metadata: languageName: node linkType: hard -"@jest/console@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/console@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - "@types/node": "*" - chalk: ^4.0.0 - jest-message-util: ^26.6.2 - jest-util: ^26.6.2 - slash: ^3.0.0 - checksum: e85a68b1ef49e5ecadb0055812c2493a92592b5206c26e78ce6b21869aff2847e4c808beae1dd353738c24fd51fa9d5bf135ced62931844a5d57f9ff4f40743a - languageName: node - linkType: hard - "@jest/console@npm:^27.5.1": version: 27.5.1 resolution: "@jest/console@npm:27.5.1" @@ -2053,18 +2039,6 @@ __metadata: languageName: node linkType: hard -"@jest/environment@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/environment@npm:26.6.2" - dependencies: - "@jest/fake-timers": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - jest-mock: ^26.6.2 - checksum: b489afb2fa9bbde360f222bc905abd9abd77ae5802b16ca7a34d018405ad7df57a506c01efae8ff8b566c211314ec74b3f37a1cb850623e15eb1e6d020582197 - languageName: node - linkType: hard - "@jest/environment@npm:^28.1.3": version: 28.1.3 resolution: "@jest/environment@npm:28.1.3" @@ -2116,20 +2090,6 @@ __metadata: languageName: node linkType: hard -"@jest/fake-timers@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/fake-timers@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - "@sinonjs/fake-timers": ^6.0.1 - "@types/node": "*" - jest-message-util: ^26.6.2 - jest-mock: ^26.6.2 - jest-util: ^26.6.2 - checksum: 861b033ead8c749f0fecffb84cbe88603291d9db66129494d0059dee101616a2aa646fc32c8cab468826eeb32647d2b0b4f72869f048163cb3406ddd2902ece0 - languageName: node - linkType: hard - "@jest/fake-timers@npm:^28.1.3": version: 28.1.3 resolution: "@jest/fake-timers@npm:28.1.3" @@ -2144,17 +2104,6 @@ __metadata: languageName: node linkType: hard -"@jest/globals@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/globals@npm:26.6.2" - dependencies: - "@jest/environment": ^26.6.2 - "@jest/types": ^26.6.2 - expect: ^26.6.2 - checksum: 6516baa19339a62c8f5eeb2ef3871bfa5bd5645016f1eb87dbe52a37658e7b33b836a1325ba40db250df5d06c08dd1cb1532fbfac5712f4041561525b59bb03f - languageName: node - linkType: hard - "@jest/globals@npm:^28.0.0, @jest/globals@npm:^28.1.3": version: 28.1.3 resolution: "@jest/globals@npm:28.1.3" @@ -2271,17 +2220,6 @@ __metadata: languageName: node linkType: hard -"@jest/source-map@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/source-map@npm:26.6.2" - dependencies: - callsites: ^3.0.0 - graceful-fs: ^4.2.4 - source-map: ^0.6.0 - checksum: fad0b35abf71b9e35b63d4ea7ddafb227a176fa44b84b8efc749ec3911991203f4a58019dd403af8380de4de752f0d40c9fe4c69f76a0866d266e964a02042cb - languageName: node - linkType: hard - "@jest/source-map@npm:^28.1.2": version: 28.1.2 resolution: "@jest/source-map@npm:28.1.2" @@ -2316,18 +2254,6 @@ __metadata: languageName: node linkType: hard -"@jest/test-result@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/test-result@npm:26.6.2" - dependencies: - "@jest/console": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/istanbul-lib-coverage": ^2.0.0 - collect-v8-coverage: ^1.0.0 - checksum: 4b6f480ebf917f2f6beb5ebefc1c6dedaa768030706f184be9a545e3ad457bde802bae78c50e06f68310084921fb048e030a8eca2adfd7df9f46a6663abb0b98 - languageName: node - linkType: hard - "@jest/test-result@npm:^27.5.1": version: 27.5.1 resolution: "@jest/test-result@npm:27.5.1" @@ -2352,19 +2278,6 @@ __metadata: languageName: node linkType: hard -"@jest/test-sequencer@npm:^26.6.3": - version: 26.6.3 - resolution: "@jest/test-sequencer@npm:26.6.3" - dependencies: - "@jest/test-result": ^26.6.2 - graceful-fs: ^4.2.4 - jest-haste-map: ^26.6.2 - jest-runner: ^26.6.3 - jest-runtime: ^26.6.3 - checksum: 670cf1161a22716f8396baf2a2d9d1741ad169f8a0115f6b0c4f88f2cfc29fec9179bbcfd87f579a46a69b38af47abd5656fb7ded5face06c3960d8e1cdbbdae - languageName: node - linkType: hard - "@jest/test-sequencer@npm:^28.1.1, @jest/test-sequencer@npm:^28.1.3": version: 28.1.3 resolution: "@jest/test-sequencer@npm:28.1.3" @@ -2401,29 +2314,6 @@ __metadata: languageName: node linkType: hard -"@jest/transform@npm:^26.6.2": - version: 26.6.2 - resolution: "@jest/transform@npm:26.6.2" - dependencies: - "@babel/core": ^7.1.0 - "@jest/types": ^26.6.2 - babel-plugin-istanbul: ^6.0.0 - chalk: ^4.0.0 - convert-source-map: ^1.4.0 - fast-json-stable-stringify: ^2.0.0 - graceful-fs: ^4.2.4 - jest-haste-map: ^26.6.2 - jest-regex-util: ^26.0.0 - jest-util: ^26.6.2 - micromatch: ^4.0.2 - pirates: ^4.0.1 - slash: ^3.0.0 - source-map: ^0.6.1 - write-file-atomic: ^3.0.0 - checksum: 1a1d636528d9b122b87b870633763c67f131533fce61e5db536dfbbea0bbfe8fe130daededb686ccc230389473a2b8ece5d0e1eaf380066d8902bde48579de31 - languageName: node - linkType: hard - "@jest/transform@npm:^28.1.1, @jest/transform@npm:^28.1.3": version: 28.1.3 resolution: "@jest/transform@npm:28.1.3" @@ -3114,15 +3004,6 @@ __metadata: languageName: node linkType: hard -"@sinonjs/fake-timers@npm:^6.0.1": - version: 6.0.1 - resolution: "@sinonjs/fake-timers@npm:6.0.1" - dependencies: - "@sinonjs/commons": ^1.7.0 - checksum: a77bead4d71b40d6f7f9a3ad66a00269aa2c078260f43f594b8aed4676c6c4e7c2b642d4b8e34df314e1c971589455f7b4267ab831bf44ffdccc0bda599850ad - languageName: node - linkType: hard - "@sinonjs/fake-timers@npm:^9.1.2": version: 9.1.2 resolution: "@sinonjs/fake-timers@npm:9.1.2" @@ -3419,7 +3300,7 @@ __metadata: jest-environment-jsdom: ^28.0.0 jest-enzyme: ^7.1.2 jest-image-snapshot: ^4.3.0 - jest-jasmine2: ^26.6.3 + jest-jasmine2: ^28.0.0 jest-junit: ^13.0.0 jest-os-detection: ^1.3.1 jest-raw-loader: ^1.0.1 @@ -3664,7 +3545,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14, @types/babel__core@npm:^7.1.7": +"@types/babel__core@npm:^7.1.14": version: 7.1.19 resolution: "@types/babel__core@npm:7.1.19" dependencies: @@ -3696,7 +3577,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.4, @types/babel__traverse@npm:^7.0.6": +"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": version: 7.18.2 resolution: "@types/babel__traverse@npm:7.18.2" dependencies: @@ -3823,7 +3704,7 @@ __metadata: languageName: node linkType: hard -"@types/graceful-fs@npm:^4.1.2, @types/graceful-fs@npm:^4.1.3": +"@types/graceful-fs@npm:^4.1.3": version: 4.1.5 resolution: "@types/graceful-fs@npm:4.1.5" dependencies: @@ -4022,7 +3903,7 @@ __metadata: languageName: node linkType: hard -"@types/prettier@npm:^2.0.0, @types/prettier@npm:^2.1.5": +"@types/prettier@npm:^2.1.5": version: 2.7.1 resolution: "@types/prettier@npm:2.7.1" checksum: 1acbc69eb6f36cf04256ab2a7a05737b670a81d96de9f5f4d765d8c1f5f68978a6a5800dc059968075ef2492a26a39f6ccdff72a4d8639144297235548b789cc @@ -4426,7 +4307,7 @@ __metadata: languageName: node linkType: hard -"abab@npm:^2.0.0, abab@npm:^2.0.3, abab@npm:^2.0.5, abab@npm:^2.0.6": +"abab@npm:^2.0.0, abab@npm:^2.0.5, abab@npm:^2.0.6": version: 2.0.6 resolution: "abab@npm:2.0.6" checksum: 0b245c3c3ea2598fe0025abf7cc7bb507b06949d51e8edae5d12c1b847a0a0c09639abcb94788332b4e2044ac4491c1e8f571b51c7826fd4b0bda1685ad4a278 @@ -4583,7 +4464,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.2.4, acorn@npm:^8.4.1, acorn@npm:^8.8.0": +"acorn@npm:^8.4.1, acorn@npm:^8.8.0": version: 8.8.0 resolution: "acorn@npm:8.8.0" bin: @@ -5297,24 +5178,6 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^26.6.3": - version: 26.6.3 - resolution: "babel-jest@npm:26.6.3" - dependencies: - "@jest/transform": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/babel__core": ^7.1.7 - babel-plugin-istanbul: ^6.0.0 - babel-preset-jest: ^26.6.2 - chalk: ^4.0.0 - graceful-fs: ^4.2.4 - slash: ^3.0.0 - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 355e431fbd663fd43dcf68c93edcf66e31c3295c35754739edb3ce39435fdc407de75540b310b370e6eb924af528839b6effb8de21870ad12423aac31e258221 - languageName: node - linkType: hard - "babel-jest@npm:^28.0.0, babel-jest@npm:^28.1.1, babel-jest@npm:^28.1.3": version: 28.1.3 resolution: "babel-jest@npm:28.1.3" @@ -5375,7 +5238,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-istanbul@npm:^6.0.0, babel-plugin-istanbul@npm:^6.1.1": +"babel-plugin-istanbul@npm:^6.1.1": version: 6.1.1 resolution: "babel-plugin-istanbul@npm:6.1.1" dependencies: @@ -5388,18 +5251,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-jest-hoist@npm:^26.6.2": - version: 26.6.2 - resolution: "babel-plugin-jest-hoist@npm:26.6.2" - dependencies: - "@babel/template": ^7.3.3 - "@babel/types": ^7.3.3 - "@types/babel__core": ^7.0.0 - "@types/babel__traverse": ^7.0.6 - checksum: 2fcddf7b338e38453d6a42c23db5b790e4188fcbffeba8ff74a62b7d64fe5a642b009a7bd780e47840c382600628de2a6486a92bb151648c64028a6c628e9bfd - languageName: node - linkType: hard - "babel-plugin-jest-hoist@npm:^28.1.3": version: 28.1.3 resolution: "babel-plugin-jest-hoist@npm:28.1.3" @@ -5481,18 +5332,6 @@ __metadata: languageName: node linkType: hard -"babel-preset-jest@npm:^26.6.2": - version: 26.6.2 - resolution: "babel-preset-jest@npm:26.6.2" - dependencies: - babel-plugin-jest-hoist: ^26.6.2 - babel-preset-current-node-syntax: ^1.0.0 - peerDependencies: - "@babel/core": ^7.0.0 - checksum: b6e0efe33b485eb2fba019026933e46d680605b3bf84a6b7378f1df8344b890f66318c49129921dd98bf5819694316312a97b50b16d9aa377faf8624f9f0db5b - languageName: node - linkType: hard - "babel-preset-jest@npm:^28.1.3": version: 28.1.3 resolution: "babel-preset-jest@npm:28.1.3" @@ -6024,7 +5863,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.0.0, camelcase@npm:^6.2.0": +"camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 0d701658219bd3116d12da3eab31acddb3f9440790c0792e0d398f0a520a6a4058018e546862b6fba89d7ae990efaeb97da71e1913e9ebf5a8b5621a3d55c710 @@ -6226,13 +6065,6 @@ __metadata: languageName: node linkType: hard -"cjs-module-lexer@npm:^0.6.0": - version: 0.6.0 - resolution: "cjs-module-lexer@npm:0.6.0" - checksum: a4fe091f5551e8580d74c0afbf767893ea0ace49f8e33eecb54ae8e325661f31d44752171b4ec52d33aca90c4d854114afe315aa6021780a3c49a0f4a67924b5 - languageName: node - linkType: hard - "cjs-module-lexer@npm:^1.0.0": version: 1.2.2 resolution: "cjs-module-lexer@npm:1.2.2" @@ -6299,17 +6131,6 @@ __metadata: languageName: node linkType: hard -"cliui@npm:^6.0.0": - version: 6.0.0 - resolution: "cliui@npm:6.0.0" - dependencies: - string-width: ^4.2.0 - strip-ansi: ^6.0.0 - wrap-ansi: ^6.2.0 - checksum: 35229b1bb48647e882104cac374c9a18e34bbf0bace0e2cf03000326b6ca3050d6b59545d91e17bfe3705f4a0e2988787aa5cde6331bf5cbbf0164732cef6492 - languageName: node - linkType: hard - "cliui@npm:^7.0.2": version: 7.0.4 resolution: "cliui@npm:7.0.4" @@ -6837,7 +6658,7 @@ __metadata: languageName: node linkType: hard -"cssom@npm:^0.4.1, cssom@npm:^0.4.4": +"cssom@npm:^0.4.1": version: 0.4.4 resolution: "cssom@npm:0.4.4" checksum: 0d4fc70255ea3afbd4add79caffa3b01720929da91105340600d8c0f06c31716f933c6314c3d43b62b57c9637bc2eb35296a9e2db427e8b572ee38a4be2b5f82 @@ -6981,17 +6802,6 @@ __metadata: languageName: node linkType: hard -"data-urls@npm:^2.0.0": - version: 2.0.0 - resolution: "data-urls@npm:2.0.0" - dependencies: - abab: ^2.0.3 - whatwg-mimetype: ^2.3.0 - whatwg-url: ^8.0.0 - checksum: 1246442178eb756afb1d99e54669a119eafb3e69c73300d14089687c50c64f9feadd93c973f496224a12f89daa94267a6114aecd70e9b279c09d908c5be44d01 - languageName: node - linkType: hard - "data-urls@npm:^3.0.1": version: 3.0.2 resolution: "data-urls@npm:3.0.2" @@ -7058,20 +6868,6 @@ __metadata: languageName: node linkType: hard -"decamelize@npm:^1.2.0": - version: 1.2.0 - resolution: "decamelize@npm:1.2.0" - checksum: 85c39fe8fbf0482d4a1e224ef0119db5c1897f8503bcef8b826adff7a1b11414972f6fef2d7dec2ee0b4be3863cf64ac1439137ae9e6af23a3d8dcbe26a5b4b2 - languageName: node - linkType: hard - -"decimal.js@npm:^10.2.1": - version: 10.4.1 - resolution: "decimal.js@npm:10.4.1" - checksum: 7dfe188af43c50c10cea18349d0f85cf89ac2952e53b5f359f4a37606b789da54116cea0060497794df9deca8f98fd6b662562507031ade66be974d2c49898bd - languageName: node - linkType: hard - "decimal.js@npm:^10.3.1": version: 10.4.2 resolution: "decimal.js@npm:10.4.2" @@ -7293,13 +7089,6 @@ __metadata: languageName: node linkType: hard -"diff-sequences@npm:^26.6.2": - version: 26.6.2 - resolution: "diff-sequences@npm:26.6.2" - checksum: a576b78f542377ce2bb032aa91aaf12376c6f562f79b2570f5fe16b4c18acff78de144ae44f0d86bedfe9c29ef38aa027db963850213e07bbc1c1a3b2834e861 - languageName: node - linkType: hard - "diff-sequences@npm:^28.1.1": version: 28.1.1 resolution: "diff-sequences@npm:28.1.1" @@ -7442,15 +7231,6 @@ __metadata: languageName: node linkType: hard -"domexception@npm:^2.0.1": - version: 2.0.1 - resolution: "domexception@npm:2.0.1" - dependencies: - webidl-conversions: ^5.0.0 - checksum: 24a3a07b85420671bc805ead7305e0f2ec9e55f104889b64c5a9fa7d93681e514f05c65f947bd9401b3da67f77b92fe7861bd15f4d0d418c4d32e34a2cd55d38 - languageName: node - linkType: hard - "domexception@npm:^4.0.0": version: 4.0.0 resolution: "domexception@npm:4.0.0" @@ -7640,13 +7420,6 @@ __metadata: languageName: node linkType: hard -"emittery@npm:^0.7.1": - version: 0.7.2 - resolution: "emittery@npm:0.7.2" - checksum: a90d8b59a14de5f3c2bf9d9884867ab6f62d1da1363b660e1429543286f627372c07b70d78465e739f4a616ba1e6638f63c831ef0da146b89c7935f1e5a96ad5 - languageName: node - linkType: hard - "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -8952,20 +8725,6 @@ __metadata: languageName: node linkType: hard -"expect@npm:^26.6.2": - version: 26.6.2 - resolution: "expect@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - ansi-styles: ^4.0.0 - jest-get-type: ^26.3.0 - jest-matcher-utils: ^26.6.2 - jest-message-util: ^26.6.2 - jest-regex-util: ^26.0.0 - checksum: e84ab6c96e99eaf92586e5c554317413352082b66be952ba338bf690e15106c0b6350ac99d0d66237d675cc75963811255120d47172a8e764b1d6a9ae2b6b1b4 - languageName: node - linkType: hard - "expect@npm:^28.0.0, expect@npm:^28.1.3": version: 28.1.3 resolution: "expect@npm:28.1.3" @@ -9667,7 +9426,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:^2.1.2, fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": +"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": version: 2.3.2 resolution: "fsevents@npm:2.3.2" dependencies: @@ -9687,7 +9446,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@^2.1.2#~builtin, fsevents@patch:fsevents@^2.3.2#~builtin, fsevents@patch:fsevents@~2.3.2#~builtin": +"fsevents@patch:fsevents@^2.3.2#~builtin, fsevents@patch:fsevents@~2.3.2#~builtin": version: 2.3.2 resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=18f3a7" dependencies: @@ -9769,7 +9528,7 @@ __metadata: languageName: node linkType: hard -"get-caller-file@npm:^2.0.1, get-caller-file@npm:^2.0.5": +"get-caller-file@npm:^2.0.5": version: 2.0.5 resolution: "get-caller-file@npm:2.0.5" checksum: c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde @@ -9970,7 +9729,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.0.0, glob@npm:^7.0.3, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0": +"glob@npm:^7.0.0, glob@npm:^7.0.3, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.2.0": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -10334,15 +10093,6 @@ __metadata: languageName: node linkType: hard -"html-encoding-sniffer@npm:^2.0.1": - version: 2.0.1 - resolution: "html-encoding-sniffer@npm:2.0.1" - dependencies: - whatwg-encoding: ^1.0.5 - checksum: 6dc3aa2d35a8f0c8c7906ffb665dd24a88f7004f913fafdd3541d24a4da6182ab30c4a0a81387649a1234ecb90182c4136220ed12ae3dc1a57ed68e533dea416 - languageName: node - linkType: hard - "html-encoding-sniffer@npm:^3.0.0": version: 3.0.0 resolution: "html-encoding-sniffer@npm:3.0.0" @@ -11600,37 +11350,6 @@ __metadata: languageName: node linkType: hard -"jest-config@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-config@npm:26.6.3" - dependencies: - "@babel/core": ^7.1.0 - "@jest/test-sequencer": ^26.6.3 - "@jest/types": ^26.6.2 - babel-jest: ^26.6.3 - chalk: ^4.0.0 - deepmerge: ^4.2.2 - glob: ^7.1.1 - graceful-fs: ^4.2.4 - jest-environment-jsdom: ^26.6.2 - jest-environment-node: ^26.6.2 - jest-get-type: ^26.3.0 - jest-jasmine2: ^26.6.3 - jest-regex-util: ^26.0.0 - jest-resolve: ^26.6.2 - jest-util: ^26.6.2 - jest-validate: ^26.6.2 - micromatch: ^4.0.2 - pretty-format: ^26.6.2 - peerDependencies: - ts-node: ">=9.0.0" - peerDependenciesMeta: - ts-node: - optional: true - checksum: 7ca34c8d4fa48d9af081e05a2a7a54df5ad03df14dc1edca52f162c65f54fbd3745c14512b3f9dd42b753bd90d4aec4b86a7e1fdd410780bc79d27be3af5a36e - languageName: node - linkType: hard - "jest-config@npm:^28.1.3": version: 28.1.3 resolution: "jest-config@npm:28.1.3" @@ -11669,18 +11388,6 @@ __metadata: languageName: node linkType: hard -"jest-diff@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-diff@npm:26.6.2" - dependencies: - chalk: ^4.0.0 - diff-sequences: ^26.6.2 - jest-get-type: ^26.3.0 - pretty-format: ^26.6.2 - checksum: 3a9c88c8f308487059788ab1199e12f9b4657168964a2307573760b4d41ab5b851e5bef70125ef5ceddc1e201d6753d6ceae88994c197990dd9307cb7d94b9a1 - languageName: node - linkType: hard - "jest-diff@npm:^28.1.3": version: 28.1.3 resolution: "jest-diff@npm:28.1.3" @@ -11705,15 +11412,6 @@ __metadata: languageName: node linkType: hard -"jest-docblock@npm:^26.0.0": - version: 26.0.0 - resolution: "jest-docblock@npm:26.0.0" - dependencies: - detect-newline: ^3.0.0 - checksum: 769c9379a906b98afd9fa2feca3a271a06bec62e26bb99e7bba4182ead955b677cbedeaa7b129653dd21ee9473604c40836651f7c4c1265e37ca2a68e01e0f8b - languageName: node - linkType: hard - "jest-docblock@npm:^28.1.1": version: 28.1.1 resolution: "jest-docblock@npm:28.1.1" @@ -11723,19 +11421,6 @@ __metadata: languageName: node linkType: hard -"jest-each@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-each@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - chalk: ^4.0.0 - jest-get-type: ^26.3.0 - jest-util: ^26.6.2 - pretty-format: ^26.6.2 - checksum: 93fca8619afba3e9f77903929a5f4ba84a4b4ab22852d062a24e7029038456b2d5bef5761afa1c3ac52a59434484f101d44beae35f3b7e5ec1a8aa695a1c879a - languageName: node - linkType: hard - "jest-each@npm:^28.1.3": version: 28.1.3 resolution: "jest-each@npm:28.1.3" @@ -11776,21 +11461,6 @@ __metadata: languageName: node linkType: hard -"jest-environment-jsdom@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-environment-jsdom@npm:26.6.2" - dependencies: - "@jest/environment": ^26.6.2 - "@jest/fake-timers": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - jest-mock: ^26.6.2 - jest-util: ^26.6.2 - jsdom: ^16.4.0 - checksum: 5bbcc49240d59e966adb690ae73bdd7cd650b401a2420837c4770dbd148ddb2d417bcfb9fe0b4f5e85fda5d5d2e93e62788b699350eb6bd924cbf6bc9c833080 - languageName: node - linkType: hard - "jest-environment-jsdom@npm:^28.0.0": version: 28.1.3 resolution: "jest-environment-jsdom@npm:28.1.3" @@ -11807,20 +11477,6 @@ __metadata: languageName: node linkType: hard -"jest-environment-node@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-environment-node@npm:26.6.2" - dependencies: - "@jest/environment": ^26.6.2 - "@jest/fake-timers": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - jest-mock: ^26.6.2 - jest-util: ^26.6.2 - checksum: 887382992bfd8110337cdc6e8a931f647d78363aa1ed777a2d9ff0f2edc468e6cc9e9b9a5d26c772534d0bd8ec41d860e433beb2d6f3c8a8a2cab3007ceec126 - languageName: node - linkType: hard - "jest-environment-node@npm:^28.1.1, jest-environment-node@npm:^28.1.3": version: 28.1.3 resolution: "jest-environment-node@npm:28.1.3" @@ -11849,13 +11505,6 @@ __metadata: languageName: node linkType: hard -"jest-get-type@npm:^26.3.0": - version: 26.3.0 - resolution: "jest-get-type@npm:26.3.0" - checksum: 112fc7f962d1c4625a51b6ccfe6e9c8e54ab80816bf8dbf2b1bf25d12c0f75c74ebad0c2f37622aea81019a2087451bfb12a46619ed6717e64ee875ea2de5520 - languageName: node - linkType: hard - "jest-get-type@npm:^28.0.2": version: 28.0.2 resolution: "jest-get-type@npm:28.0.2" @@ -11893,31 +11542,6 @@ __metadata: languageName: node linkType: hard -"jest-haste-map@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-haste-map@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - "@types/graceful-fs": ^4.1.2 - "@types/node": "*" - anymatch: ^3.0.3 - fb-watchman: ^2.0.0 - fsevents: ^2.1.2 - graceful-fs: ^4.2.4 - jest-regex-util: ^26.0.0 - jest-serializer: ^26.6.2 - jest-util: ^26.6.2 - jest-worker: ^26.6.2 - micromatch: ^4.0.2 - sane: ^4.0.3 - walker: ^1.0.7 - dependenciesMeta: - fsevents: - optional: true - checksum: 85a40d8ecf4bfb659613f107c963c7366cdf6dcceb0ca73dc8ca09fbe0e2a63b976940f573db6260c43011993cb804275f447f268c3bc4b680c08baed300701d - languageName: node - linkType: hard - "jest-haste-map@npm:^28.1.1, jest-haste-map@npm:^28.1.3": version: 28.1.3 resolution: "jest-haste-map@npm:28.1.3" @@ -11960,29 +11584,28 @@ __metadata: languageName: node linkType: hard -"jest-jasmine2@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-jasmine2@npm:26.6.3" +"jest-jasmine2@npm:^28.0.0": + version: 28.1.3 + resolution: "jest-jasmine2@npm:28.1.3" dependencies: - "@babel/traverse": ^7.1.0 - "@jest/environment": ^26.6.2 - "@jest/source-map": ^26.6.2 - "@jest/test-result": ^26.6.2 - "@jest/types": ^26.6.2 + "@jest/environment": ^28.1.3 + "@jest/expect": ^28.1.3 + "@jest/source-map": ^28.1.2 + "@jest/test-result": ^28.1.3 + "@jest/types": ^28.1.3 "@types/node": "*" chalk: ^4.0.0 co: ^4.6.0 - expect: ^26.6.2 is-generator-fn: ^2.0.0 - jest-each: ^26.6.2 - jest-matcher-utils: ^26.6.2 - jest-message-util: ^26.6.2 - jest-runtime: ^26.6.3 - jest-snapshot: ^26.6.2 - jest-util: ^26.6.2 - pretty-format: ^26.6.2 - throat: ^5.0.0 - checksum: 9154ceb08fdfd263a1850af9008b6e5ab4d1242af45fede5a6580fc1db85cd9072a27b609590e76ae8d80e281b2ec96476528e8d37938b92061b746e88330f77 + jest-each: ^28.1.3 + jest-matcher-utils: ^28.1.3 + jest-message-util: ^28.1.3 + jest-runtime: ^28.1.3 + jest-snapshot: ^28.1.3 + jest-util: ^28.1.3 + p-limit: ^3.1.0 + pretty-format: ^28.1.3 + checksum: ebc28398279c3e9de0025d3d41bf03f47ead61c5486aaa55fa632ecdc7e83b14c7a454b0284360d04f127d6c9332c54a93a7d20b64fc479624584642cee11b68 languageName: node linkType: hard @@ -11998,16 +11621,6 @@ __metadata: languageName: node linkType: hard -"jest-leak-detector@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-leak-detector@npm:26.6.2" - dependencies: - jest-get-type: ^26.3.0 - pretty-format: ^26.6.2 - checksum: 6062c04531126d1dfb3dee21483963dd75a975cb89a105b54cf767cc350b174ffcc9177d8750d14e30f36c475be7d96554c558bdf1f1ae6ad9b93bcea7097312 - languageName: node - linkType: hard - "jest-leak-detector@npm:^28.1.3": version: 28.1.3 resolution: "jest-leak-detector@npm:28.1.3" @@ -12018,18 +11631,6 @@ __metadata: languageName: node linkType: hard -"jest-matcher-utils@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-matcher-utils@npm:26.6.2" - dependencies: - chalk: ^4.0.0 - jest-diff: ^26.6.2 - jest-get-type: ^26.3.0 - pretty-format: ^26.6.2 - checksum: 1303fc4dfd80848483b64bafc99beb31678653ad3f34b4c23e982a16016aec1f8a7de4a583044d9c43e59ee7e68e07c57f3a8b51e40fbefe42eafad45cc725ed - languageName: node - linkType: hard - "jest-matcher-utils@npm:^28.1.3": version: 28.1.3 resolution: "jest-matcher-utils@npm:28.1.3" @@ -12070,23 +11671,6 @@ __metadata: languageName: node linkType: hard -"jest-message-util@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-message-util@npm:26.6.2" - dependencies: - "@babel/code-frame": ^7.0.0 - "@jest/types": ^26.6.2 - "@types/stack-utils": ^2.0.0 - chalk: ^4.0.0 - graceful-fs: ^4.2.4 - micromatch: ^4.0.2 - pretty-format: ^26.6.2 - slash: ^3.0.0 - stack-utils: ^2.0.2 - checksum: f6138d67154137cf3e985b2b469d0c78846cce787fed16b107c177fc9c6eb2606b7bce8e88d2a6bc830262d77469ecf26c70925cefc98dee83b5e8ed08981ff5 - languageName: node - linkType: hard - "jest-message-util@npm:^27.5.1": version: 27.5.1 resolution: "jest-message-util@npm:27.5.1" @@ -12147,16 +11731,6 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-mock@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - "@types/node": "*" - checksum: cf77b49efe76cdedc63363ccdbae8bc68e0301fbded669e7b45647b7b7c1dce90985cf6a3a13da161f644523d7d0aad03184c6f39302ee4b52f954a1de37960f - languageName: node - linkType: hard - "jest-mock@npm:^27.3.0": version: 27.5.1 resolution: "jest-mock@npm:27.5.1" @@ -12210,13 +11784,6 @@ __metadata: languageName: node linkType: hard -"jest-regex-util@npm:^26.0.0": - version: 26.0.0 - resolution: "jest-regex-util@npm:26.0.0" - checksum: 988675764a08945b90f48e6f5a8640b0d9885a977f100a168061d10037d53808a6cdb7dc8cb6fe9b1332f0523b42bf3edbb6d2cc6c7f7ba582d05d432efb3e60 - languageName: node - linkType: hard - "jest-regex-util@npm:^27.0.0": version: 27.5.1 resolution: "jest-regex-util@npm:27.5.1" @@ -12258,22 +11825,6 @@ __metadata: languageName: node linkType: hard -"jest-resolve@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-resolve@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - chalk: ^4.0.0 - graceful-fs: ^4.2.4 - jest-pnp-resolver: ^1.2.2 - jest-util: ^26.6.2 - read-pkg-up: ^7.0.1 - resolve: ^1.18.1 - slash: ^3.0.0 - checksum: 9ead2ebe49efeb6c428c25b2da0e773844692cbd1b0b55145c950592053113e67b6121f9cfe1dcea901df3cea8c06ee38a464a37a9b611dc9f1ab376ea7be35a - languageName: node - linkType: hard - "jest-resolve@npm:^28.1.1, jest-resolve@npm:^28.1.3": version: 28.1.3 resolution: "jest-resolve@npm:28.1.3" @@ -12291,34 +11842,6 @@ __metadata: languageName: node linkType: hard -"jest-runner@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-runner@npm:26.6.3" - dependencies: - "@jest/console": ^26.6.2 - "@jest/environment": ^26.6.2 - "@jest/test-result": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/node": "*" - chalk: ^4.0.0 - emittery: ^0.7.1 - exit: ^0.1.2 - graceful-fs: ^4.2.4 - jest-config: ^26.6.3 - jest-docblock: ^26.0.0 - jest-haste-map: ^26.6.2 - jest-leak-detector: ^26.6.2 - jest-message-util: ^26.6.2 - jest-resolve: ^26.6.2 - jest-runtime: ^26.6.3 - jest-util: ^26.6.2 - jest-worker: ^26.6.2 - source-map-support: ^0.5.6 - throat: ^5.0.0 - checksum: 81ce9ce686623c93e50b34babd12a4fdd05edf00b0478570ae57aa2384942fe6fc1c8ca8ee6715ec15561d350f45ec3c26a19304c20b91d4cf51e73b54b0d347 - languageName: node - linkType: hard - "jest-runner@npm:^28.1.1, jest-runner@npm:^28.1.3": version: 28.1.3 resolution: "jest-runner@npm:28.1.3" @@ -12348,43 +11871,6 @@ __metadata: languageName: node linkType: hard -"jest-runtime@npm:^26.6.3": - version: 26.6.3 - resolution: "jest-runtime@npm:26.6.3" - dependencies: - "@jest/console": ^26.6.2 - "@jest/environment": ^26.6.2 - "@jest/fake-timers": ^26.6.2 - "@jest/globals": ^26.6.2 - "@jest/source-map": ^26.6.2 - "@jest/test-result": ^26.6.2 - "@jest/transform": ^26.6.2 - "@jest/types": ^26.6.2 - "@types/yargs": ^15.0.0 - chalk: ^4.0.0 - cjs-module-lexer: ^0.6.0 - collect-v8-coverage: ^1.0.0 - exit: ^0.1.2 - glob: ^7.1.3 - graceful-fs: ^4.2.4 - jest-config: ^26.6.3 - jest-haste-map: ^26.6.2 - jest-message-util: ^26.6.2 - jest-mock: ^26.6.2 - jest-regex-util: ^26.0.0 - jest-resolve: ^26.6.2 - jest-snapshot: ^26.6.2 - jest-util: ^26.6.2 - jest-validate: ^26.6.2 - slash: ^3.0.0 - strip-bom: ^4.0.0 - yargs: ^15.4.1 - bin: - jest-runtime: bin/jest-runtime.js - checksum: d0fd139d01b9af87b5546586e8c3907d61e95c07d52fe29d7e247f08830a074f1d35c5417449fcfc5c1e5e210dd5c08c48e4789ca7900586e7624c202388a346 - languageName: node - linkType: hard - "jest-runtime@npm:^28.1.3": version: 28.1.3 resolution: "jest-runtime@npm:28.1.3" @@ -12431,40 +11917,6 @@ __metadata: languageName: node linkType: hard -"jest-serializer@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-serializer@npm:26.6.2" - dependencies: - "@types/node": "*" - graceful-fs: ^4.2.4 - checksum: 1c67aa1acefdc0b244f2629aaef12a56e563a5c5cb817970d2b97bdad5e8aae187b269c8d356c42ff9711436499c4da71ec8400e6280dab110be8cc5300884b0 - languageName: node - linkType: hard - -"jest-snapshot@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-snapshot@npm:26.6.2" - dependencies: - "@babel/types": ^7.0.0 - "@jest/types": ^26.6.2 - "@types/babel__traverse": ^7.0.4 - "@types/prettier": ^2.0.0 - chalk: ^4.0.0 - expect: ^26.6.2 - graceful-fs: ^4.2.4 - jest-diff: ^26.6.2 - jest-get-type: ^26.3.0 - jest-haste-map: ^26.6.2 - jest-matcher-utils: ^26.6.2 - jest-message-util: ^26.6.2 - jest-resolve: ^26.6.2 - natural-compare: ^1.4.0 - pretty-format: ^26.6.2 - semver: ^7.3.2 - checksum: b7b829e7179411cf9a5718d9cf4214e3ac66c41fa17c2f32b7273d12a5e4e85e30504335c4a673f6537af660531fe7c475d09266d63cf19aae3d346809a9a4a2 - languageName: node - linkType: hard - "jest-snapshot@npm:^28.1.3": version: 28.1.3 resolution: "jest-snapshot@npm:28.1.3" @@ -12530,20 +11982,6 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-util@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - "@types/node": "*" - chalk: ^4.0.0 - graceful-fs: ^4.2.4 - is-ci: ^2.0.0 - micromatch: ^4.0.2 - checksum: ab93709840f87bdf478d082f5465467c27a20a422cbe456cc2a56961d8c950ea52511995fb6063f62a113737f3dd714b836a1fbde51abef96642a5975e835a01 - languageName: node - linkType: hard - "jest-util@npm:^27.5.1": version: 27.5.1 resolution: "jest-util@npm:27.5.1" @@ -12586,20 +12024,6 @@ __metadata: languageName: node linkType: hard -"jest-validate@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-validate@npm:26.6.2" - dependencies: - "@jest/types": ^26.6.2 - camelcase: ^6.0.0 - chalk: ^4.0.0 - jest-get-type: ^26.3.0 - leven: ^3.1.0 - pretty-format: ^26.6.2 - checksum: 0c8df164641e797f80011e359553411e097ea495b95b41100be00d6c827bfd854e92ef8c528fe4cac0d113055a5075d1409f2616099ec648dbd6809bb0a29c67 - languageName: node - linkType: hard - "jest-validate@npm:^28.1.1, jest-validate@npm:^28.1.3": version: 28.1.3 resolution: "jest-validate@npm:28.1.3" @@ -12672,17 +12096,6 @@ __metadata: languageName: node linkType: hard -"jest-worker@npm:^26.6.2": - version: 26.6.2 - resolution: "jest-worker@npm:26.6.2" - dependencies: - "@types/node": "*" - merge-stream: ^2.0.0 - supports-color: ^7.0.0 - checksum: 07e4dba650381604cda253ab6d5837fe0279c8d68c25884995b45bfe149a7a1e1b5a97f304b4518f257dac2a9ddc1808d57d650649c3ab855e9e60cf824d2970 - languageName: node - linkType: hard - "jest-worker@npm:^28.1.1, jest-worker@npm:^28.1.3": version: 28.1.3 resolution: "jest-worker@npm:28.1.3" @@ -12857,46 +12270,6 @@ __metadata: languageName: node linkType: hard -"jsdom@npm:^16.4.0": - version: 16.7.0 - resolution: "jsdom@npm:16.7.0" - dependencies: - abab: ^2.0.5 - acorn: ^8.2.4 - acorn-globals: ^6.0.0 - cssom: ^0.4.4 - cssstyle: ^2.3.0 - data-urls: ^2.0.0 - decimal.js: ^10.2.1 - domexception: ^2.0.1 - escodegen: ^2.0.0 - form-data: ^3.0.0 - html-encoding-sniffer: ^2.0.1 - http-proxy-agent: ^4.0.1 - https-proxy-agent: ^5.0.0 - is-potential-custom-element-name: ^1.0.1 - nwsapi: ^2.2.0 - parse5: 6.0.1 - saxes: ^5.0.1 - symbol-tree: ^3.2.4 - tough-cookie: ^4.0.0 - w3c-hr-time: ^1.0.2 - w3c-xmlserializer: ^2.0.0 - webidl-conversions: ^6.1.0 - whatwg-encoding: ^1.0.5 - whatwg-mimetype: ^2.3.0 - whatwg-url: ^8.5.0 - ws: ^7.4.6 - xml-name-validator: ^3.0.0 - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - checksum: e9ba6ea5f5e0d18647ccedec16bc3c69c8c739732ffcb27c66ffd3cc3f876add291ca4f0b9c209ace939ce2aa3ba9e4d67b7f05317921a4d3eab02fe1cc164ef - languageName: node - linkType: hard - "jsdom@npm:^19.0.0": version: 19.0.0 resolution: "jsdom@npm:19.0.0" @@ -13733,7 +13106,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.7.0": +"lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c @@ -16860,7 +16233,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.5, resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.14.2, resolve@npm:^1.18.1, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0": +"resolve@npm:^1.1.5, resolve@npm:^1.1.6, resolve@npm:^1.10.0, resolve@npm:^1.12.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.0": version: 1.22.1 resolution: "resolve@npm:1.22.1" dependencies: @@ -16893,7 +16266,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.1.5#~builtin, resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.18.1#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.0#~builtin": +"resolve@patch:resolve@^1.1.5#~builtin, resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.0#~builtin": version: 1.22.1 resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=07638b" dependencies: @@ -17217,7 +16590,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.x, semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7": +"semver@npm:7.x, semver@npm:^7.0.0, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7": version: 7.3.8 resolution: "semver@npm:7.3.8" dependencies: @@ -17625,16 +16998,6 @@ __metadata: languageName: node linkType: hard -"source-map-support@npm:^0.5.6": - version: 0.5.21 - resolution: "source-map-support@npm:0.5.21" - dependencies: - buffer-from: ^1.0.0 - source-map: ^0.6.0 - checksum: 9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d - languageName: node - linkType: hard - "source-map-url@npm:^0.4.0": version: 0.4.1 resolution: "source-map-url@npm:0.4.1" @@ -17827,7 +17190,7 @@ __metadata: languageName: node linkType: hard -"stack-utils@npm:^2.0.2, stack-utils@npm:^2.0.3": +"stack-utils@npm:^2.0.3": version: 2.0.5 resolution: "stack-utils@npm:2.0.5" dependencies: @@ -18357,13 +17720,6 @@ __metadata: languageName: node linkType: hard -"throat@npm:^5.0.0": - version: 5.0.0 - resolution: "throat@npm:5.0.0" - checksum: 1b9c661dabf93ff9026fecd781ccfd9b507c41b9d5e581614884fffd09f3f9ebfe26d3be668ccf904fd324dd3f6efe1a3ec7f83e91b1dff9fdcc6b7d39b8bfe3 - languageName: node - linkType: hard - "through2@npm:^2.0.0, through2@npm:~2.0.3": version: 2.0.5 resolution: "through2@npm:2.0.5" @@ -18534,15 +17890,6 @@ __metadata: languageName: node linkType: hard -"tr46@npm:^2.1.0": - version: 2.1.0 - resolution: "tr46@npm:2.1.0" - dependencies: - punycode: ^2.1.1 - checksum: 397f5c39d97c5fe29fa9bab73b03853be18ad2738b2c66ee5ce84ecb36b091bdaec493f9b3cee711d45f7678f342452600843264cc8242b591c8dc983146a6c4 - languageName: node - linkType: hard - "tr46@npm:^3.0.0": version: 3.0.0 resolution: "tr46@npm:3.0.0" @@ -18895,7 +18242,7 @@ __metadata: languageName: node linkType: hard -"typedarray-to-buffer@npm:^3.1.5, typedarray-to-buffer@npm:~3.1.5": +"typedarray-to-buffer@npm:~3.1.5": version: 3.1.5 resolution: "typedarray-to-buffer@npm:3.1.5" dependencies: @@ -19658,15 +19005,6 @@ __metadata: languageName: node linkType: hard -"w3c-xmlserializer@npm:^2.0.0": - version: 2.0.0 - resolution: "w3c-xmlserializer@npm:2.0.0" - dependencies: - xml-name-validator: ^3.0.0 - checksum: 92b8af34766f5bb8f37c505bc459ee1791b30af778d3a86551f7dd3b1716f79cb98c71d65d03f2bf6eba6b09861868eaf2be7e233b9202b26a9df7595f2bd290 - languageName: node - linkType: hard - "w3c-xmlserializer@npm:^3.0.0": version: 3.0.0 resolution: "w3c-xmlserializer@npm:3.0.0" @@ -19730,20 +19068,6 @@ __metadata: languageName: node linkType: hard -"webidl-conversions@npm:^5.0.0": - version: 5.0.0 - resolution: "webidl-conversions@npm:5.0.0" - checksum: bf31df332ed11e1114bfcae7712d9ab2c37e7faa60ba32d8fdbee785937c0b012eee235c19d2b5d84f5072db84a160e8d08dd382da7f850feec26a4f46add8ff - languageName: node - linkType: hard - -"webidl-conversions@npm:^6.1.0": - version: 6.1.0 - resolution: "webidl-conversions@npm:6.1.0" - checksum: 66ad3b9073cd1e0e173444d8c636673b016e25b5856694429072cc966229adb734a8d410188e031effadcfb837936d79bc9e87c48f4d5925a90d42dec97f6590 - languageName: node - linkType: hard - "webidl-conversions@npm:^7.0.0": version: 7.0.0 resolution: "webidl-conversions@npm:7.0.0" @@ -19853,17 +19177,6 @@ __metadata: languageName: node linkType: hard -"whatwg-url@npm:^8.0.0, whatwg-url@npm:^8.5.0": - version: 8.7.0 - resolution: "whatwg-url@npm:8.7.0" - dependencies: - lodash: ^4.7.0 - tr46: ^2.1.0 - webidl-conversions: ^6.1.0 - checksum: de0bc94387dba586b278e701cf5a1c1f5002725d22b8564dbca2cab1966ef24b839018e57ae2423fb514d8a2dd3aa3bf97323e2f89b55cd89e79141e432e9df1 - languageName: node - linkType: hard - "which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" @@ -19877,13 +19190,6 @@ __metadata: languageName: node linkType: hard -"which-module@npm:^2.0.0": - version: 2.0.0 - resolution: "which-module@npm:2.0.0" - checksum: 946ffdbcd6f0cf517638f8f2319c6d51e528c3b41bc2c0f5dc3dc46047347abd7326aea5cdf5def0a8b32bdca313ac87a32ce5a76b943fe1ca876c4557e6b716 - languageName: node - linkType: hard - "which-pm-runs@npm:^1.0.0": version: 1.1.0 resolution: "which-pm-runs@npm:1.1.0" @@ -20039,18 +19345,6 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^3.0.0": - version: 3.0.3 - resolution: "write-file-atomic@npm:3.0.3" - dependencies: - imurmurhash: ^0.1.4 - is-typedarray: ^1.0.0 - signal-exit: ^3.0.2 - typedarray-to-buffer: ^3.1.5 - checksum: 7fb67affd811c7a1221bed0c905c26e28f0041e138fb19ccf02db57a0ef93ea69220959af3906b920f9b0411d1914474cdd90b93a96e5cd9e8368d9777caac0e - languageName: node - linkType: hard - "write-file-atomic@npm:^4.0.1": version: 4.0.2 resolution: "write-file-atomic@npm:4.0.2" @@ -20079,7 +19373,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^7.0.0, ws@npm:^7.4.6": +"ws@npm:^7.0.0": version: 7.5.9 resolution: "ws@npm:7.5.9" peerDependencies: @@ -20172,13 +19466,6 @@ __metadata: languageName: node linkType: hard -"y18n@npm:^4.0.0": - version: 4.0.3 - resolution: "y18n@npm:4.0.3" - checksum: 308a2efd7cc296ab2c0f3b9284fd4827be01cfeb647b3ba18230e3a416eb1bc887ac050de9f8c4fd9e7856b2e8246e05d190b53c96c5ad8d8cb56dffb6f81024 - languageName: node - linkType: hard - "y18n@npm:^5.0.5": version: 5.0.8 resolution: "y18n@npm:5.0.8" @@ -20221,35 +19508,6 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^18.1.2": - version: 18.1.3 - resolution: "yargs-parser@npm:18.1.3" - dependencies: - camelcase: ^5.0.0 - decamelize: ^1.2.0 - checksum: 25df918833592a83f52e7e4f91ba7d7bfaa2b891ebf7fe901923c2ee797534f23a176913ff6ff7ebbc1cc1725a044cc6a6539fed8bfd4e13b5b16376875f9499 - languageName: node - linkType: hard - -"yargs@npm:^15.4.1": - version: 15.4.1 - resolution: "yargs@npm:15.4.1" - dependencies: - cliui: ^6.0.0 - decamelize: ^1.2.0 - find-up: ^4.1.0 - get-caller-file: ^2.0.1 - require-directory: ^2.1.1 - require-main-filename: ^2.0.0 - set-blocking: ^2.0.0 - string-width: ^4.2.0 - which-module: ^2.0.0 - y18n: ^4.0.0 - yargs-parser: ^18.1.2 - checksum: f1ca680c974333a5822732825cca7e95306c5a1e7750eb7b973ce6dc4f97a6b0a8837203c8b194f461969bfe1fb1176d1d423036635285f6010b392fa498ab2d - languageName: node - linkType: hard - "yargs@npm:^17.3.1, yargs@npm:^17.4.0": version: 17.6.0 resolution: "yargs@npm:17.6.0" From 30358270d416396858a29c1ea311d3e945d5099c Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 13:50:43 -0500 Subject: [PATCH 061/258] Get /lib tests passing --- code/lib/api/src/tests/shortcut.test.js | 4 +++ .../src/utils/StoryIndexGenerator.test.ts | 4 +++ code/lib/preview-web/src/PreviewWeb.test.ts | 27 ++++++++++++------- .../preview-web/src/PreviewWithSelection.tsx | 2 +- .../lib/preview-web/src/render/StoryRender.ts | 5 ++-- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/code/lib/api/src/tests/shortcut.test.js b/code/lib/api/src/tests/shortcut.test.js index 9a4532532682..23aeb049236e 100644 --- a/code/lib/api/src/tests/shortcut.test.js +++ b/code/lib/api/src/tests/shortcut.test.js @@ -1,3 +1,7 @@ +/** + * @jest-environment jsdom + */ + import global from 'global'; import { eventToShortcut, keyToSymbol } from '../lib/shortcut'; diff --git a/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts b/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts index 2ad8e823b836..6fa3e6e23cf0 100644 --- a/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts +++ b/code/lib/core-server/src/utils/StoryIndexGenerator.test.ts @@ -1,6 +1,10 @@ /* eslint-disable @typescript-eslint/no-shadow */ /// ; +/** + * @jest-environment node + */ + import path from 'path'; import fs from 'fs-extra'; import { normalizeStoriesEntry } from '@storybook/core-common'; diff --git a/code/lib/preview-web/src/PreviewWeb.test.ts b/code/lib/preview-web/src/PreviewWeb.test.ts index 2b00be279c9d..77765607ee09 100644 --- a/code/lib/preview-web/src/PreviewWeb.test.ts +++ b/code/lib/preview-web/src/PreviewWeb.test.ts @@ -66,11 +66,6 @@ jest.mock('global', () => ({ search: '?id=*', }, }, - window: { - location: { - reload: mockJest.fn(), - }, - }, FEATURES: { storyStoreV7: true, breakingChangesV7: true, @@ -100,7 +95,8 @@ const createGate = (): [Promise, (_?: any) => void] => { // a timer, so we need to first setImmediate (to get past the resolution), then run the timers // Probably jest modern timers do this but they aren't working for some bizzarre reason. async function waitForSetCurrentStory() { - await new Promise((r) => setImmediate(r)); + jest.useFakeTimers({ doNotFake: ['setTimeout'] }); + await new Promise((r) => setTimeout(r, 0)); jest.runAllTimers(); } @@ -2014,6 +2010,18 @@ describe('PreviewWeb', () => { }); describe('while story is still rendering', () => { + let originalLocation = window.location; + beforeEach(() => { + originalLocation = window.location; + delete (window as Partial).location; + window.location = { ...originalLocation, reload: jest.fn() }; + }); + + afterEach(() => { + delete (window as Partial).location; + window.location = { ...originalLocation, reload: originalLocation.reload }; + }); + it('stops initial story after loaders if running', async () => { const [gate, openGate] = createGate(); componentOneExports.default.loaders[0].mockImplementationOnce(async () => gate); @@ -2161,10 +2169,11 @@ describe('PreviewWeb', () => { // Wait three ticks without resolving the play function await waitForSetCurrentStory(); - await waitForSetCurrentStory(); - await waitForSetCurrentStory(); + // We can't mock setTimeout for this test, due to waitForSetCurrentStory hack, + // So give some (real) time for the reload to be called + await new Promise((r) => setTimeout(r, 100)); - expect(global.window.location.reload).toHaveBeenCalled(); + expect(window.location.reload).toHaveBeenCalled(); expect(mockChannel.emit).not.toHaveBeenCalledWith(STORY_CHANGED, 'component-one--b'); expect(projectAnnotations.renderToCanvas).not.toHaveBeenCalledWith( expect.objectContaining({ diff --git a/code/lib/preview-web/src/PreviewWithSelection.tsx b/code/lib/preview-web/src/PreviewWithSelection.tsx index e4d1802b9bfb..cb35c6d0fdcb 100644 --- a/code/lib/preview-web/src/PreviewWithSelection.tsx +++ b/code/lib/preview-web/src/PreviewWithSelection.tsx @@ -41,7 +41,7 @@ import { StandaloneDocsRender } from './render/StandaloneDocsRender'; import type { SelectionStore } from './SelectionStore'; import type { View } from './View'; -const { window: globalWindow } = global; +const globalWindow = globalThis; function focusInInput(event: Event) { const target = event.target as Element; diff --git a/code/lib/preview-web/src/render/StoryRender.ts b/code/lib/preview-web/src/render/StoryRender.ts index c9206457b7f4..416d6804bb5c 100644 --- a/code/lib/preview-web/src/render/StoryRender.ts +++ b/code/lib/preview-web/src/render/StoryRender.ts @@ -1,4 +1,3 @@ -import global from 'global'; import type { Framework, Store_RenderContext, @@ -21,7 +20,7 @@ import { import type { Render, RenderType } from './Render'; import { PREPARE_ABORTED } from './Render'; -const { AbortController } = global; +const { AbortController } = globalThis; export type RenderPhase = | 'preparing' @@ -293,7 +292,7 @@ export class StoryRender implements Render {}); } } From 13f50c3c0f021415adf54234f2b016f756175057 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 13:53:36 -0500 Subject: [PATCH 062/258] Fix some typescript errors --- code/lib/api/src/tests/stories.test.ts | 2 +- code/lib/core-client/src/start.test.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/code/lib/api/src/tests/stories.test.ts b/code/lib/api/src/tests/stories.test.ts index 229862fa0871..59ce70e8cf7d 100644 --- a/code/lib/api/src/tests/stories.test.ts +++ b/code/lib/api/src/tests/stories.test.ts @@ -34,7 +34,7 @@ function mockChannel() { return new Channel({ transport }); } -const mockGetEntries = jest.fn(); +const mockGetEntries = jest.fn<() => API_StoryIndex['entries']>(); jest.mock('../lib/events'); jest.mock('global', () => ({ diff --git a/code/lib/core-client/src/start.test.ts b/code/lib/core-client/src/start.test.ts index 8d3040025c86..c09ce001b591 100644 --- a/code/lib/core-client/src/start.test.ts +++ b/code/lib/core-client/src/start.test.ts @@ -15,7 +15,6 @@ import { import { start as realStart } from './start'; jest.mock('global', () => ({ - // @ts-expect-error (jest is not happy with this) ...jest.requireActual('global'), history: { replaceState: jest.fn() }, document: { From 28bac3478e82f17a8d3f032581a3362f6f34b5cb Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 14:25:21 -0500 Subject: [PATCH 063/258] Add frameworks --- code/frameworks/angular/jest.config.js | 5 +++++ code/frameworks/ember/jest.config.js | 6 ++++++ code/frameworks/html-webpack5/jest.config.js | 6 ++++++ code/frameworks/nextjs/jest.config.js | 6 ++++++ code/frameworks/preact-webpack5/jest.config.js | 6 ++++++ code/frameworks/react-vite/jest.config.js | 6 ++++++ code/frameworks/react-webpack5/jest.config.js | 6 ++++++ code/frameworks/server-webpack5/jest.config.js | 6 ++++++ code/frameworks/svelte-vite/jest.config.js | 6 ++++++ code/frameworks/svelte-webpack5/jest.config.js | 6 ++++++ code/frameworks/vue-vite/jest.config.js | 6 ++++++ code/frameworks/vue-webpack5/jest.config.js | 6 ++++++ code/frameworks/vue3-vite/jest.config.js | 6 ++++++ code/frameworks/vue3-webpack5/jest.config.js | 6 ++++++ code/frameworks/web-components-vite/jest.config.js | 6 ++++++ code/frameworks/web-components-webpack5/jest.config.js | 6 ++++++ code/jest.config.js | 2 +- 17 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 code/frameworks/ember/jest.config.js create mode 100644 code/frameworks/html-webpack5/jest.config.js create mode 100644 code/frameworks/nextjs/jest.config.js create mode 100644 code/frameworks/preact-webpack5/jest.config.js create mode 100644 code/frameworks/react-vite/jest.config.js create mode 100644 code/frameworks/react-webpack5/jest.config.js create mode 100644 code/frameworks/server-webpack5/jest.config.js create mode 100644 code/frameworks/svelte-vite/jest.config.js create mode 100644 code/frameworks/svelte-webpack5/jest.config.js create mode 100644 code/frameworks/vue-vite/jest.config.js create mode 100644 code/frameworks/vue-webpack5/jest.config.js create mode 100644 code/frameworks/vue3-vite/jest.config.js create mode 100644 code/frameworks/vue3-webpack5/jest.config.js create mode 100644 code/frameworks/web-components-vite/jest.config.js create mode 100644 code/frameworks/web-components-webpack5/jest.config.js diff --git a/code/frameworks/angular/jest.config.js b/code/frameworks/angular/jest.config.js index c98df845e713..dab65db95a13 100644 --- a/code/frameworks/angular/jest.config.js +++ b/code/frameworks/angular/jest.config.js @@ -1,5 +1,10 @@ module.exports = { + displayName: 'frameworks/angular', preset: 'jest-preset-angular', setupFilesAfterEnv: ['/setup-jest.ts'], transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid)'], + snapshotFormat: { + escapeString: true, + printBasicPrototype: true, + }, }; diff --git a/code/frameworks/ember/jest.config.js b/code/frameworks/ember/jest.config.js new file mode 100644 index 000000000000..8fae184e72d6 --- /dev/null +++ b/code/frameworks/ember/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/ember', +}; diff --git a/code/frameworks/html-webpack5/jest.config.js b/code/frameworks/html-webpack5/jest.config.js new file mode 100644 index 000000000000..21e2c947c52a --- /dev/null +++ b/code/frameworks/html-webpack5/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/html-webpack5', +}; diff --git a/code/frameworks/nextjs/jest.config.js b/code/frameworks/nextjs/jest.config.js new file mode 100644 index 000000000000..b8690bc68874 --- /dev/null +++ b/code/frameworks/nextjs/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/nextjs', +}; diff --git a/code/frameworks/preact-webpack5/jest.config.js b/code/frameworks/preact-webpack5/jest.config.js new file mode 100644 index 000000000000..cbaa15c1177c --- /dev/null +++ b/code/frameworks/preact-webpack5/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/preact-webpack5', +}; diff --git a/code/frameworks/react-vite/jest.config.js b/code/frameworks/react-vite/jest.config.js new file mode 100644 index 000000000000..e7735865adfc --- /dev/null +++ b/code/frameworks/react-vite/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/react-vite', +}; diff --git a/code/frameworks/react-webpack5/jest.config.js b/code/frameworks/react-webpack5/jest.config.js new file mode 100644 index 000000000000..0e19f5f58d6e --- /dev/null +++ b/code/frameworks/react-webpack5/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/react-webpack5', +}; diff --git a/code/frameworks/server-webpack5/jest.config.js b/code/frameworks/server-webpack5/jest.config.js new file mode 100644 index 000000000000..834291034752 --- /dev/null +++ b/code/frameworks/server-webpack5/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/server-webpack5', +}; diff --git a/code/frameworks/svelte-vite/jest.config.js b/code/frameworks/svelte-vite/jest.config.js new file mode 100644 index 000000000000..6fb4dcde2a03 --- /dev/null +++ b/code/frameworks/svelte-vite/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/svelte-vite', +}; diff --git a/code/frameworks/svelte-webpack5/jest.config.js b/code/frameworks/svelte-webpack5/jest.config.js new file mode 100644 index 000000000000..4ef4111bffbb --- /dev/null +++ b/code/frameworks/svelte-webpack5/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/svelte-webpack5', +}; diff --git a/code/frameworks/vue-vite/jest.config.js b/code/frameworks/vue-vite/jest.config.js new file mode 100644 index 000000000000..e51211119e04 --- /dev/null +++ b/code/frameworks/vue-vite/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/vue-vite', +}; diff --git a/code/frameworks/vue-webpack5/jest.config.js b/code/frameworks/vue-webpack5/jest.config.js new file mode 100644 index 000000000000..58e54f72b977 --- /dev/null +++ b/code/frameworks/vue-webpack5/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/vue-webpack5', +}; diff --git a/code/frameworks/vue3-vite/jest.config.js b/code/frameworks/vue3-vite/jest.config.js new file mode 100644 index 000000000000..ca5e6a8ce80d --- /dev/null +++ b/code/frameworks/vue3-vite/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/vue3-vite', +}; diff --git a/code/frameworks/vue3-webpack5/jest.config.js b/code/frameworks/vue3-webpack5/jest.config.js new file mode 100644 index 000000000000..5c8fefc5e1f1 --- /dev/null +++ b/code/frameworks/vue3-webpack5/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/vue3-webpack5', +}; diff --git a/code/frameworks/web-components-vite/jest.config.js b/code/frameworks/web-components-vite/jest.config.js new file mode 100644 index 000000000000..9f6b6ec075be --- /dev/null +++ b/code/frameworks/web-components-vite/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/web-components-vite', +}; diff --git a/code/frameworks/web-components-webpack5/jest.config.js b/code/frameworks/web-components-webpack5/jest.config.js new file mode 100644 index 000000000000..6ac062f84b4d --- /dev/null +++ b/code/frameworks/web-components-webpack5/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'frameworks/web-components-webpack5', +}; diff --git a/code/jest.config.js b/code/jest.config.js index 4b57c9686398..d4f14340e478 100644 --- a/code/jest.config.js +++ b/code/jest.config.js @@ -1,3 +1,3 @@ module.exports = { - projects: ['/lib/*'], + projects: ['/lib/*', '/frameworks/*'], }; From 359421911debcf2bd0021aee4e154171b6c91f6d Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 14:26:02 -0500 Subject: [PATCH 064/258] Ignore angular project for now --- code/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/package.json b/code/package.json index ba0f84dce867..7ac5eb159770 100644 --- a/code/package.json +++ b/code/package.json @@ -83,7 +83,7 @@ "storybook:ui:build": "NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" ./lib/cli/bin/index.js build --config-dir ./ui/.storybook", "storybook:ui:chromatic": "yarn chromatic --build-script-name storybook:ui:build --storybook-config-dir ./ui/.storybook --storybook-base-dir ./code/ui --project-token=${CHROMATIC_TOKEN_STORYBOOK_UI:-MISSING_PROJECT_TOKEN} --only-changed --exit-zero-on-changes --exit-once-uploaded", "task": "cd .. && yarn task", - "test": "NODE_OPTIONS=--max_old_space_size=4096 jest --config ./jest.config.js", + "test": "NODE_OPTIONS=--max_old_space_size=4096 jest --config ./jest.config.js --ignoreProjects=frameworks/angular", "test:cli": "npm --prefix lib/cli run test" }, "husky": { From b5f18607176e05562431ea8e06f3d8123c9d0321 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 14:26:40 -0500 Subject: [PATCH 065/258] Add projects to avoid warnings Even though there are no tests in here --- code/lib/cli-sb/jest.config.js | 6 ++++++ code/lib/cli-storybook/jest.config.js | 6 ++++++ code/lib/types/jest.config.js | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 code/lib/cli-sb/jest.config.js create mode 100644 code/lib/cli-storybook/jest.config.js create mode 100644 code/lib/types/jest.config.js diff --git a/code/lib/cli-sb/jest.config.js b/code/lib/cli-sb/jest.config.js new file mode 100644 index 000000000000..693d5068bcdb --- /dev/null +++ b/code/lib/cli-sb/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'cli-sb', +}; diff --git a/code/lib/cli-storybook/jest.config.js b/code/lib/cli-storybook/jest.config.js new file mode 100644 index 000000000000..3c4b37bb7964 --- /dev/null +++ b/code/lib/cli-storybook/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'cli-storybook', +}; diff --git a/code/lib/types/jest.config.js b/code/lib/types/jest.config.js new file mode 100644 index 000000000000..595d8a667de8 --- /dev/null +++ b/code/lib/types/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: 'types', +}; From d296ad82e9a97a8dbc016c4acf9a32150ab624c6 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 14:39:57 -0500 Subject: [PATCH 066/258] Add tests for renderers --- code/jest.config.base.js | 7 +++---- code/jest.config.js | 2 +- code/renderers/html/jest.config.js | 6 ++++++ code/renderers/preact/jest.config.js | 6 ++++++ code/renderers/react/jest.config.js | 6 ++++++ code/renderers/server/jest.config.js | 6 ++++++ code/renderers/svelte/jest.config.js | 6 ++++++ code/renderers/vue/jest.config.js | 6 ++++++ code/renderers/vue3/jest.config.js | 6 ++++++ code/renderers/web-components/jest.config.js | 6 ++++++ 10 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 code/renderers/html/jest.config.js create mode 100644 code/renderers/preact/jest.config.js create mode 100644 code/renderers/react/jest.config.js create mode 100644 code/renderers/server/jest.config.js create mode 100644 code/renderers/svelte/jest.config.js create mode 100644 code/renderers/vue/jest.config.js create mode 100644 code/renderers/vue3/jest.config.js create mode 100644 code/renderers/web-components/jest.config.js diff --git a/code/jest.config.base.js b/code/jest.config.base.js index 494e040c1023..d4e0d5ff7c83 100644 --- a/code/jest.config.base.js +++ b/code/jest.config.base.js @@ -25,9 +25,9 @@ module.exports = { moduleNameMapper: { // non-js files '\\.(jpg|jpeg|png|apng|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': - '/__mocks__/fileMock.js', - '\\.(css|scss|stylesheet)$': '/__mocks__/styleMock.js', - '\\.(md)$': '/__mocks__/htmlMock.js', + path.resolve('./__mocks__/fileMock.js'), + '\\.(css|scss|stylesheet)$': path.resolve('./__mocks__/styleMock.js'), + '\\.(md)$': path.resolve('./__mocks__/htmlMock.js'), // core-js v2 to v3 mapping 'core-js/modules/es6.(.*)': 'core-js/modules/es.$1', @@ -44,7 +44,6 @@ module.exports = { 'core-js/library/fn/object/assign': 'core-js/es/object/assign', }, transform: { - '^.+\\.stories\\.[jt]sx?$': '@storybook/addon-storyshots/injectFileName', '^.+\\.[jt]sx?$': path.resolve('../scripts/utils/jest-transform-js.js'), '^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx', }, diff --git a/code/jest.config.js b/code/jest.config.js index d4f14340e478..fb4d386da4c7 100644 --- a/code/jest.config.js +++ b/code/jest.config.js @@ -1,3 +1,3 @@ module.exports = { - projects: ['/lib/*', '/frameworks/*'], + projects: ['/lib/*', '/frameworks/*', '/renderers/*'], }; diff --git a/code/renderers/html/jest.config.js b/code/renderers/html/jest.config.js new file mode 100644 index 000000000000..c0027b84a8eb --- /dev/null +++ b/code/renderers/html/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'renderers/html', +}; diff --git a/code/renderers/preact/jest.config.js b/code/renderers/preact/jest.config.js new file mode 100644 index 000000000000..389c62b3366c --- /dev/null +++ b/code/renderers/preact/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'renderers/preact', +}; diff --git a/code/renderers/react/jest.config.js b/code/renderers/react/jest.config.js new file mode 100644 index 000000000000..30e666a46ebc --- /dev/null +++ b/code/renderers/react/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'renderers/react', +}; diff --git a/code/renderers/server/jest.config.js b/code/renderers/server/jest.config.js new file mode 100644 index 000000000000..d7153f07b70f --- /dev/null +++ b/code/renderers/server/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'renderers/server', +}; diff --git a/code/renderers/svelte/jest.config.js b/code/renderers/svelte/jest.config.js new file mode 100644 index 000000000000..b19915a2daac --- /dev/null +++ b/code/renderers/svelte/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'renderers/svelte', +}; diff --git a/code/renderers/vue/jest.config.js b/code/renderers/vue/jest.config.js new file mode 100644 index 000000000000..882834f3959a --- /dev/null +++ b/code/renderers/vue/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'renderers/vue', +}; diff --git a/code/renderers/vue3/jest.config.js b/code/renderers/vue3/jest.config.js new file mode 100644 index 000000000000..4b7b0dcb9be9 --- /dev/null +++ b/code/renderers/vue3/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'renderers/vue3', +}; diff --git a/code/renderers/web-components/jest.config.js b/code/renderers/web-components/jest.config.js new file mode 100644 index 000000000000..293cdfa3ed27 --- /dev/null +++ b/code/renderers/web-components/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'renderers/web-components', +}; From d5f5648acfa8c5c3fa04c2208c50a2b055409063 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 14:51:01 -0500 Subject: [PATCH 067/258] Add tests for addons --- code/addons/a11y/jest.config.js | 6 ++++++ code/addons/actions/jest.config.js | 6 ++++++ code/addons/backgrounds/jest.config.js | 6 ++++++ code/addons/controls/jest.config.js | 6 ++++++ code/addons/docs/jest.config.js | 6 ++++++ code/addons/essentials/jest.config.js | 6 ++++++ code/addons/highlight/jest.config.js | 6 ++++++ code/addons/interactions/jest.config.js | 6 ++++++ code/addons/jest/jest.config.js | 6 ++++++ code/addons/links/jest.config.js | 6 ++++++ code/addons/measure/jest.config.js | 6 ++++++ code/addons/outline/jest.config.js | 6 ++++++ code/addons/storyshots/jest.config.js | 6 ++++++ code/addons/storysource/jest.config.js | 6 ++++++ code/addons/toolbars/jest.config.js | 6 ++++++ code/addons/viewport/jest.config.js | 6 ++++++ code/jest.config.js | 7 ++++++- 17 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 code/addons/a11y/jest.config.js create mode 100644 code/addons/actions/jest.config.js create mode 100644 code/addons/backgrounds/jest.config.js create mode 100644 code/addons/controls/jest.config.js create mode 100644 code/addons/docs/jest.config.js create mode 100644 code/addons/essentials/jest.config.js create mode 100644 code/addons/highlight/jest.config.js create mode 100644 code/addons/interactions/jest.config.js create mode 100644 code/addons/jest/jest.config.js create mode 100644 code/addons/links/jest.config.js create mode 100644 code/addons/measure/jest.config.js create mode 100644 code/addons/outline/jest.config.js create mode 100644 code/addons/storyshots/jest.config.js create mode 100644 code/addons/storysource/jest.config.js create mode 100644 code/addons/toolbars/jest.config.js create mode 100644 code/addons/viewport/jest.config.js diff --git a/code/addons/a11y/jest.config.js b/code/addons/a11y/jest.config.js new file mode 100644 index 000000000000..d957f80e373d --- /dev/null +++ b/code/addons/a11y/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/a11y', +}; diff --git a/code/addons/actions/jest.config.js b/code/addons/actions/jest.config.js new file mode 100644 index 000000000000..1f1aeeb7f105 --- /dev/null +++ b/code/addons/actions/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/actions', +}; diff --git a/code/addons/backgrounds/jest.config.js b/code/addons/backgrounds/jest.config.js new file mode 100644 index 000000000000..151b1699161f --- /dev/null +++ b/code/addons/backgrounds/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/backgrounds', +}; diff --git a/code/addons/controls/jest.config.js b/code/addons/controls/jest.config.js new file mode 100644 index 000000000000..056eb971790e --- /dev/null +++ b/code/addons/controls/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/controls', +}; diff --git a/code/addons/docs/jest.config.js b/code/addons/docs/jest.config.js new file mode 100644 index 000000000000..0d3d9bf7a4c2 --- /dev/null +++ b/code/addons/docs/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/docs', +}; diff --git a/code/addons/essentials/jest.config.js b/code/addons/essentials/jest.config.js new file mode 100644 index 000000000000..0236b90a1cab --- /dev/null +++ b/code/addons/essentials/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/essentials', +}; diff --git a/code/addons/highlight/jest.config.js b/code/addons/highlight/jest.config.js new file mode 100644 index 000000000000..25896803c6dc --- /dev/null +++ b/code/addons/highlight/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/highlight', +}; diff --git a/code/addons/interactions/jest.config.js b/code/addons/interactions/jest.config.js new file mode 100644 index 000000000000..cece9d2b23f2 --- /dev/null +++ b/code/addons/interactions/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/interactions', +}; diff --git a/code/addons/jest/jest.config.js b/code/addons/jest/jest.config.js new file mode 100644 index 000000000000..733a6a70bf95 --- /dev/null +++ b/code/addons/jest/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/jest', +}; diff --git a/code/addons/links/jest.config.js b/code/addons/links/jest.config.js new file mode 100644 index 000000000000..b971bb6254de --- /dev/null +++ b/code/addons/links/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/links', +}; diff --git a/code/addons/measure/jest.config.js b/code/addons/measure/jest.config.js new file mode 100644 index 000000000000..95da5e589340 --- /dev/null +++ b/code/addons/measure/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/measure', +}; diff --git a/code/addons/outline/jest.config.js b/code/addons/outline/jest.config.js new file mode 100644 index 000000000000..06d14ca161f1 --- /dev/null +++ b/code/addons/outline/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/outline', +}; diff --git a/code/addons/storyshots/jest.config.js b/code/addons/storyshots/jest.config.js new file mode 100644 index 000000000000..5a9f2d6f8f39 --- /dev/null +++ b/code/addons/storyshots/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/storyshots', +}; diff --git a/code/addons/storysource/jest.config.js b/code/addons/storysource/jest.config.js new file mode 100644 index 000000000000..8dcca0eec95b --- /dev/null +++ b/code/addons/storysource/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/storysource', +}; diff --git a/code/addons/toolbars/jest.config.js b/code/addons/toolbars/jest.config.js new file mode 100644 index 000000000000..bc24ec4f60cd --- /dev/null +++ b/code/addons/toolbars/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/toolbars', +}; diff --git a/code/addons/viewport/jest.config.js b/code/addons/viewport/jest.config.js new file mode 100644 index 000000000000..e3e5d13047f7 --- /dev/null +++ b/code/addons/viewport/jest.config.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: 'addons/viewport', +}; diff --git a/code/jest.config.js b/code/jest.config.js index fb4d386da4c7..68f7eb792d7d 100644 --- a/code/jest.config.js +++ b/code/jest.config.js @@ -1,3 +1,8 @@ module.exports = { - projects: ['/lib/*', '/frameworks/*', '/renderers/*'], + projects: [ + '/addons/*', + '/frameworks/*', + '/lib/*', + '/renderers/*', + ], }; From 96c7dce840b5df7160c7f654b5b7ba04850be619 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 15:39:53 -0500 Subject: [PATCH 068/258] Move enzyme serializer to storyshots config --- code/addons/storyshots/jest.config.js | 5 +++++ code/jest.config.base.js | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/addons/storyshots/jest.config.js b/code/addons/storyshots/jest.config.js index 5a9f2d6f8f39..51478c677b74 100644 --- a/code/addons/storyshots/jest.config.js +++ b/code/addons/storyshots/jest.config.js @@ -2,5 +2,10 @@ const baseConfig = require('../../jest.config.browser'); module.exports = { ...baseConfig, + snapshotSerializers: [...baseConfig.snapshotSerializers, 'enzyme-to-json/serializer'], + transform: { + ...baseConfig.transform, + '^.+\\.stories\\.[jt]sx?$': '@storybook/addon-storyshots/injectFileName', + }, displayName: 'addons/storyshots', }; diff --git a/code/jest.config.base.js b/code/jest.config.base.js index d4e0d5ff7c83..4698c6b8a344 100644 --- a/code/jest.config.base.js +++ b/code/jest.config.base.js @@ -91,11 +91,7 @@ module.exports = { PREVIEW_URL: undefined, SNAPSHOT_OS: os.platform() === 'win32' ? 'windows' : 'posix', }, - snapshotSerializers: [ - '@emotion/jest/serializer', - 'enzyme-to-json/serializer', - 'jest-serializer-html', - ], + snapshotSerializers: ['@emotion/jest/serializer', 'jest-serializer-html'], coverageDirectory: 'coverage', coverageReporters: ['lcov'], testEnvironmentOptions: { From 89b08918f7657fbb1079f308980291bf52c677f2 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 15:43:43 -0500 Subject: [PATCH 069/258] Ignore angular in config, not cli Otherwise it's not possible to run a single file with the command line --- code/jest.config.js | 2 +- code/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/jest.config.js b/code/jest.config.js index 68f7eb792d7d..dbcca0b0f2ab 100644 --- a/code/jest.config.js +++ b/code/jest.config.js @@ -1,7 +1,7 @@ module.exports = { projects: [ '/addons/*', - '/frameworks/*', + '/frameworks/!(angular)*', '/lib/*', '/renderers/*', ], diff --git a/code/package.json b/code/package.json index 7ac5eb159770..ba0f84dce867 100644 --- a/code/package.json +++ b/code/package.json @@ -83,7 +83,7 @@ "storybook:ui:build": "NODE_OPTIONS=\"--preserve-symlinks --preserve-symlinks-main\" ./lib/cli/bin/index.js build --config-dir ./ui/.storybook", "storybook:ui:chromatic": "yarn chromatic --build-script-name storybook:ui:build --storybook-config-dir ./ui/.storybook --storybook-base-dir ./code/ui --project-token=${CHROMATIC_TOKEN_STORYBOOK_UI:-MISSING_PROJECT_TOKEN} --only-changed --exit-zero-on-changes --exit-once-uploaded", "task": "cd .. && yarn task", - "test": "NODE_OPTIONS=--max_old_space_size=4096 jest --config ./jest.config.js --ignoreProjects=frameworks/angular", + "test": "NODE_OPTIONS=--max_old_space_size=4096 jest --config ./jest.config.js", "test:cli": "npm --prefix lib/cli run test" }, "husky": { From 80c699f1741567ac3f79f9ce0020283f7b34a74b Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 10 Nov 2022 15:44:10 -0500 Subject: [PATCH 070/258] [fixme] check in new snapshot --- .../__snapshots__/Text.stories.storyshot | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 code/addons/storyshots/storyshots-core/stories/addons/storyshots/storyshots-core/stories/exported_metadata/__snapshots__/Text.stories.storyshot diff --git a/code/addons/storyshots/storyshots-core/stories/addons/storyshots/storyshots-core/stories/exported_metadata/__snapshots__/Text.stories.storyshot b/code/addons/storyshots/storyshots-core/stories/addons/storyshots/storyshots-core/stories/exported_metadata/__snapshots__/Text.stories.storyshot new file mode 100644 index 000000000000..c9965e394a4c --- /dev/null +++ b/code/addons/storyshots/storyshots-core/stories/addons/storyshots/storyshots-core/stories/exported_metadata/__snapshots__/Text.stories.storyshot @@ -0,0 +1,11 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Text Simple 1`] = ` +
+ prefix + + contents + + suffix +
+`; From bd15d4ea78be59ee56aac3e78c86d7c46e33b895 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 11 Nov 2022 09:03:19 +0100 Subject: [PATCH 071/258] linting --- code/ui/blocks/src/components/ArgsTable/ArgsTable.tsx | 4 ++-- code/ui/blocks/src/components/Preview.tsx | 6 +++--- code/ui/blocks/src/controls/Color.tsx | 6 +++--- code/ui/blocks/src/controls/Date.tsx | 2 +- code/ui/blocks/src/controls/Number.tsx | 2 +- code/ui/blocks/src/controls/Object.tsx | 2 +- code/ui/blocks/src/controls/Text.tsx | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/ui/blocks/src/components/ArgsTable/ArgsTable.tsx b/code/ui/blocks/src/components/ArgsTable/ArgsTable.tsx index 15e8e7588c82..d950828b2e74 100644 --- a/code/ui/blocks/src/components/ArgsTable/ArgsTable.tsx +++ b/code/ui/blocks/src/components/ArgsTable/ArgsTable.tsx @@ -2,10 +2,10 @@ import type { FC } from 'react'; import React from 'react'; import pickBy from 'lodash/pickBy'; import { styled } from '@storybook/theming'; -import { opacify, transparentize, darken, lighten } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies +import { opacify, transparentize, darken, lighten } from 'polished'; import { includeConditionalArg } from '@storybook/csf'; import { once } from '@storybook/client-logger'; -import { IconButton, Icons, Link, ResetWrapper } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { IconButton, Icons, Link, ResetWrapper } from '@storybook/components'; import { ArgRow } from './ArgRow'; import { SectionRow } from './SectionRow'; diff --git a/code/ui/blocks/src/components/Preview.tsx b/code/ui/blocks/src/components/Preview.tsx index 96865be5dd46..f93ba28cdf2f 100644 --- a/code/ui/blocks/src/components/Preview.tsx +++ b/code/ui/blocks/src/components/Preview.tsx @@ -1,10 +1,10 @@ import type { ClipboardEvent, FC, ReactElement, ReactNode } from 'react'; import React, { Children, useCallback, useState } from 'react'; -import { darken } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies +import { darken } from 'polished'; import { styled } from '@storybook/theming'; import global from 'global'; -import { ActionBar, Zoom } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { ActionBar, Zoom } from '@storybook/components'; import type { ActionItem } from '@storybook/components'; import type { SourceProps } from '.'; @@ -218,7 +218,7 @@ export const Preview: FC = ({ const { window: globalWindow } = global; const copyToClipboard = useCallback(async (text: string) => { - const { createCopyToClipboardFunction } = await import('@storybook/components'); // eslint-disable-line import/no-extraneous-dependencies + const { createCopyToClipboardFunction } = await import('@storybook/components'); createCopyToClipboardFunction(); }, []); diff --git a/code/ui/blocks/src/controls/Color.tsx b/code/ui/blocks/src/controls/Color.tsx index 995c4d1152b1..3fa5a655e224 100644 --- a/code/ui/blocks/src/controls/Color.tsx +++ b/code/ui/blocks/src/controls/Color.tsx @@ -1,10 +1,10 @@ import type { FC, ChangeEvent, FocusEvent } from 'react'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { HexColorPicker, HslaStringColorPicker, RgbaStringColorPicker } from 'react-colorful'; // eslint-disable-line import/no-extraneous-dependencies -import convert from 'color-convert'; // eslint-disable-line import/no-extraneous-dependencies +import { HexColorPicker, HslaStringColorPicker, RgbaStringColorPicker } from 'react-colorful'; +import convert from 'color-convert'; import throttle from 'lodash/throttle'; import { styled } from '@storybook/theming'; -import { TooltipNote, WithTooltip, Form, Icons } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { TooltipNote, WithTooltip, Form, Icons } from '@storybook/components'; import type { ControlProps, ColorValue, ColorConfig, PresetColor } from './types'; import { getControlId } from './helpers'; diff --git a/code/ui/blocks/src/controls/Date.tsx b/code/ui/blocks/src/controls/Date.tsx index a850fff46b13..0baf920593db 100644 --- a/code/ui/blocks/src/controls/Date.tsx +++ b/code/ui/blocks/src/controls/Date.tsx @@ -1,7 +1,7 @@ import type { FC, ChangeEvent, RefObject } from 'react'; import React, { useState, useRef, useEffect } from 'react'; import { styled } from '@storybook/theming'; -import { Form } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Form } from '@storybook/components'; import type { ControlProps, DateValue, DateConfig } from './types'; import { getControlId } from './helpers'; diff --git a/code/ui/blocks/src/controls/Number.tsx b/code/ui/blocks/src/controls/Number.tsx index 42a8ae2129dd..551d5fb7417e 100644 --- a/code/ui/blocks/src/controls/Number.tsx +++ b/code/ui/blocks/src/controls/Number.tsx @@ -1,7 +1,7 @@ import type { FC, ChangeEvent } from 'react'; import React, { useState, useCallback, useEffect, useRef } from 'react'; import { styled } from '@storybook/theming'; -import { Form } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Form } from '@storybook/components'; import { getControlId, getControlSetterButtonId } from './helpers'; import type { ControlProps, NumberValue, NumberConfig } from './types'; diff --git a/code/ui/blocks/src/controls/Object.tsx b/code/ui/blocks/src/controls/Object.tsx index e628afee6ec6..fbd0a91ab9ad 100644 --- a/code/ui/blocks/src/controls/Object.tsx +++ b/code/ui/blocks/src/controls/Object.tsx @@ -3,7 +3,7 @@ import cloneDeep from 'lodash/cloneDeep'; import type { ComponentProps, SyntheticEvent, FC, FocusEvent } from 'react'; import React, { useCallback, useMemo, useState, useEffect, useRef } from 'react'; import { styled, useTheme, type Theme } from '@storybook/theming'; -import { Form, Icons, type IconsProps, IconButton } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Form, Icons, type IconsProps, IconButton } from '@storybook/components'; import { JsonTree, getObjectType } from './react-editable-json-tree'; import { getControlId, getControlSetterButtonId } from './helpers'; import type { ControlProps, ObjectValue, ObjectConfig } from './types'; diff --git a/code/ui/blocks/src/controls/Text.tsx b/code/ui/blocks/src/controls/Text.tsx index ec7d45643abe..d7a1e312784d 100644 --- a/code/ui/blocks/src/controls/Text.tsx +++ b/code/ui/blocks/src/controls/Text.tsx @@ -1,7 +1,7 @@ import type { FC, ChangeEvent } from 'react'; import React, { useCallback, useState } from 'react'; import { styled } from '@storybook/theming'; -import { Form } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Form } from '@storybook/components'; import { getControlId, getControlSetterButtonId } from './helpers'; import type { ControlProps, TextValue, TextConfig } from './types'; From 0db63b1ba5b8491e30053543527e578022aee0f3 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 11 Nov 2022 09:36:51 +0100 Subject: [PATCH 072/258] fix linting --- code/ui/blocks/src/blocks/Heading.tsx | 2 +- code/ui/blocks/src/blocks/Subheading.tsx | 2 +- code/ui/blocks/src/blocks/mdx.tsx | 2 +- code/ui/blocks/src/components/ArgsTable/ArgJsDoc.tsx | 2 +- code/ui/blocks/src/components/ArgsTable/ArgRow.tsx | 6 +++--- code/ui/blocks/src/components/ArgsTable/ArgValue.tsx | 2 +- .../blocks/src/components/ArgsTable/NoControlsWarning.tsx | 2 +- code/ui/blocks/src/components/ArgsTable/SectionRow.tsx | 4 ++-- code/ui/blocks/src/components/ArgsTable/TabbedArgsTable.tsx | 2 +- code/ui/blocks/src/components/ColorPalette.tsx | 4 ++-- code/ui/blocks/src/components/Description.tsx | 4 ++-- code/ui/blocks/src/components/DocsPage.tsx | 4 ++-- code/ui/blocks/src/components/EmptyBlock.tsx | 4 ++-- code/ui/blocks/src/components/IconGallery.tsx | 2 +- code/ui/blocks/src/components/Source.tsx | 2 +- code/ui/blocks/src/components/Story.tsx | 2 +- code/ui/blocks/src/components/Title.tsx | 2 +- code/ui/blocks/src/components/Typeset.tsx | 4 ++-- code/ui/blocks/src/controls/Boolean.tsx | 4 ++-- code/ui/blocks/src/controls/Files.tsx | 2 +- code/ui/blocks/src/controls/options/Select.tsx | 2 +- 21 files changed, 30 insertions(+), 30 deletions(-) diff --git a/code/ui/blocks/src/blocks/Heading.tsx b/code/ui/blocks/src/blocks/Heading.tsx index 351680e53c57..8f2535fc3d44 100644 --- a/code/ui/blocks/src/blocks/Heading.tsx +++ b/code/ui/blocks/src/blocks/Heading.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import React from 'react'; -import { H2 } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { H2 } from '@storybook/components'; import { HeaderMdx } from './mdx'; export interface HeadingProps { diff --git a/code/ui/blocks/src/blocks/Subheading.tsx b/code/ui/blocks/src/blocks/Subheading.tsx index 026d92244905..857facdda25f 100644 --- a/code/ui/blocks/src/blocks/Subheading.tsx +++ b/code/ui/blocks/src/blocks/Subheading.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import React from 'react'; -import { H3 } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { H3 } from '@storybook/components'; import { HeaderMdx } from './mdx'; import type { HeadingProps } from './Heading'; diff --git a/code/ui/blocks/src/blocks/mdx.tsx b/code/ui/blocks/src/blocks/mdx.tsx index a0f66b528465..c7e14328a6ac 100644 --- a/code/ui/blocks/src/blocks/mdx.tsx +++ b/code/ui/blocks/src/blocks/mdx.tsx @@ -1,7 +1,7 @@ import type { FC, SyntheticEvent } from 'react'; import React, { useContext } from 'react'; import { NAVIGATE_URL } from '@storybook/core-events'; -import { Code, components } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Code, components } from '@storybook/components'; import global from 'global'; import { styled } from '@storybook/theming'; import { Source } from '../components'; diff --git a/code/ui/blocks/src/components/ArgsTable/ArgJsDoc.tsx b/code/ui/blocks/src/components/ArgsTable/ArgJsDoc.tsx index 1609bf8616d3..2533f06842aa 100644 --- a/code/ui/blocks/src/components/ArgsTable/ArgJsDoc.tsx +++ b/code/ui/blocks/src/components/ArgsTable/ArgJsDoc.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import React from 'react'; import { styled } from '@storybook/theming'; -import { codeCommon } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { codeCommon } from '@storybook/components'; import type { JsDocTags } from './types'; interface ArgJsDocArgs { diff --git a/code/ui/blocks/src/components/ArgsTable/ArgRow.tsx b/code/ui/blocks/src/components/ArgsTable/ArgRow.tsx index 1bc6a19ac0a5..ea5f856c0027 100644 --- a/code/ui/blocks/src/components/ArgsTable/ArgRow.tsx +++ b/code/ui/blocks/src/components/ArgsTable/ArgRow.tsx @@ -1,9 +1,9 @@ import type { FC } from 'react'; import React from 'react'; -import Markdown from 'markdown-to-jsx'; // eslint-disable-line import/no-extraneous-dependencies -import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies +import Markdown from 'markdown-to-jsx'; +import { transparentize } from 'polished'; import { styled } from '@storybook/theming'; -import { codeCommon } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { codeCommon } from '@storybook/components'; import type { ArgType, Args, TableAnnotation } from './types'; import { ArgJsDoc } from './ArgJsDoc'; import { ArgValue } from './ArgValue'; diff --git a/code/ui/blocks/src/components/ArgsTable/ArgValue.tsx b/code/ui/blocks/src/components/ArgsTable/ArgValue.tsx index 96c978f24723..2a101f5c71e0 100644 --- a/code/ui/blocks/src/components/ArgsTable/ArgValue.tsx +++ b/code/ui/blocks/src/components/ArgsTable/ArgValue.tsx @@ -3,7 +3,7 @@ import React, { useState } from 'react'; import memoize from 'memoizerific'; import uniq from 'lodash/uniq'; import { styled } from '@storybook/theming'; -import { WithTooltipPure, Icons, SyntaxHighlighter, codeCommon } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { WithTooltipPure, Icons, SyntaxHighlighter, codeCommon } from '@storybook/components'; import type { PropSummaryValue } from './types'; interface ArgValueProps { diff --git a/code/ui/blocks/src/components/ArgsTable/NoControlsWarning.tsx b/code/ui/blocks/src/components/ArgsTable/NoControlsWarning.tsx index 19eaec60a3ba..5347cad17d42 100644 --- a/code/ui/blocks/src/components/ArgsTable/NoControlsWarning.tsx +++ b/code/ui/blocks/src/components/ArgsTable/NoControlsWarning.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { styled } from '@storybook/theming'; -import { Link } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Link } from '@storybook/components'; const NoControlsWrapper = styled.div(({ theme }) => ({ background: theme.background.warning, diff --git a/code/ui/blocks/src/components/ArgsTable/SectionRow.tsx b/code/ui/blocks/src/components/ArgsTable/SectionRow.tsx index 2dbe5f70545e..5504c9411da1 100644 --- a/code/ui/blocks/src/components/ArgsTable/SectionRow.tsx +++ b/code/ui/blocks/src/components/ArgsTable/SectionRow.tsx @@ -1,8 +1,8 @@ import type { FC } from 'react'; import React, { useState } from 'react'; -import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies +import { transparentize } from 'polished'; import { styled } from '@storybook/theming'; -import { Icons } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Icons } from '@storybook/components'; type Level = 'section' | 'subsection'; diff --git a/code/ui/blocks/src/components/ArgsTable/TabbedArgsTable.tsx b/code/ui/blocks/src/components/ArgsTable/TabbedArgsTable.tsx index 50f4871b81f8..99a1b46f902c 100644 --- a/code/ui/blocks/src/components/ArgsTable/TabbedArgsTable.tsx +++ b/code/ui/blocks/src/components/ArgsTable/TabbedArgsTable.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import React from 'react'; -import { TabsState } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { TabsState } from '@storybook/components'; import type { ArgsTableProps, SortType } from './ArgsTable'; // eslint-disable-next-line import/no-cycle diff --git a/code/ui/blocks/src/components/ColorPalette.tsx b/code/ui/blocks/src/components/ColorPalette.tsx index 488c71b04ad9..5e018b24388e 100644 --- a/code/ui/blocks/src/components/ColorPalette.tsx +++ b/code/ui/blocks/src/components/ColorPalette.tsx @@ -1,8 +1,8 @@ import type { FunctionComponent } from 'react'; import React from 'react'; -import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies +import { transparentize } from 'polished'; import { styled } from '@storybook/theming'; -import { ResetWrapper } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { ResetWrapper } from '@storybook/components'; import { getBlockBackgroundStyle } from './BlockBackgroundStyles'; diff --git a/code/ui/blocks/src/components/Description.tsx b/code/ui/blocks/src/components/Description.tsx index fc6f07dc8139..fa8d5fff5ae5 100644 --- a/code/ui/blocks/src/components/Description.tsx +++ b/code/ui/blocks/src/components/Description.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import React from 'react'; -import Markdown from 'markdown-to-jsx'; // eslint-disable-line import/no-extraneous-dependencies -import { components, ResetWrapper } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import Markdown from 'markdown-to-jsx'; +import { components, ResetWrapper } from '@storybook/components'; export interface DescriptionProps { markdown: string; diff --git a/code/ui/blocks/src/components/DocsPage.tsx b/code/ui/blocks/src/components/DocsPage.tsx index 089a02ecbd62..651c8c9c6a4f 100644 --- a/code/ui/blocks/src/components/DocsPage.tsx +++ b/code/ui/blocks/src/components/DocsPage.tsx @@ -1,6 +1,6 @@ -import { withReset } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { withReset } from '@storybook/components'; import { styled } from '@storybook/theming'; -import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies +import { transparentize } from 'polished'; import type { FC } from 'react'; import React from 'react'; diff --git a/code/ui/blocks/src/components/EmptyBlock.tsx b/code/ui/blocks/src/components/EmptyBlock.tsx index 47f7bb15b434..41e84c48070b 100644 --- a/code/ui/blocks/src/components/EmptyBlock.tsx +++ b/code/ui/blocks/src/components/EmptyBlock.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies +import { transparentize } from 'polished'; import { styled } from '@storybook/theming'; -import { withReset } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { withReset } from '@storybook/components'; const Wrapper = styled.div(withReset, ({ theme }) => ({ backgroundColor: theme.base === 'light' ? 'rgba(0,0,0,.01)' : 'rgba(255,255,255,.01)', diff --git a/code/ui/blocks/src/components/IconGallery.tsx b/code/ui/blocks/src/components/IconGallery.tsx index cf27be34a3eb..22456d889ae2 100644 --- a/code/ui/blocks/src/components/IconGallery.tsx +++ b/code/ui/blocks/src/components/IconGallery.tsx @@ -1,7 +1,7 @@ import type { FunctionComponent } from 'react'; import React from 'react'; import { styled } from '@storybook/theming'; -import { ResetWrapper } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { ResetWrapper } from '@storybook/components'; import { getBlockBackgroundStyle } from './BlockBackgroundStyles'; diff --git a/code/ui/blocks/src/components/Source.tsx b/code/ui/blocks/src/components/Source.tsx index 730dfc6c24a9..26dc904b1b18 100644 --- a/code/ui/blocks/src/components/Source.tsx +++ b/code/ui/blocks/src/components/Source.tsx @@ -1,7 +1,7 @@ import type { ComponentProps, FunctionComponent } from 'react'; import React from 'react'; import { styled, ThemeProvider, convert, themes } from '@storybook/theming'; -import { SyntaxHighlighter } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { SyntaxHighlighter } from '@storybook/components'; import { EmptyBlock } from './EmptyBlock'; diff --git a/code/ui/blocks/src/components/Story.tsx b/code/ui/blocks/src/components/Story.tsx index 11570922cc1f..4719a8ab6f4f 100644 --- a/code/ui/blocks/src/components/Story.tsx +++ b/code/ui/blocks/src/components/Story.tsx @@ -2,7 +2,7 @@ import global from 'global'; import type { ElementType, FunctionComponent } from 'react'; import React, { createElement, Fragment } from 'react'; import type { Parameters } from '@storybook/types'; -import { Loader, getStoryHref } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Loader, getStoryHref } from '@storybook/components'; // eslint-disable-next-line import/no-cycle import { EmptyBlock } from '.'; import { IFrame } from './IFrame'; diff --git a/code/ui/blocks/src/components/Title.tsx b/code/ui/blocks/src/components/Title.tsx index 20e1db72310d..bbff95701d41 100644 --- a/code/ui/blocks/src/components/Title.tsx +++ b/code/ui/blocks/src/components/Title.tsx @@ -1,6 +1,6 @@ import type { Theme } from '@storybook/theming'; import { styled } from '@storybook/theming'; -import { withReset } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { withReset } from '@storybook/components'; const breakpoint = 600; diff --git a/code/ui/blocks/src/components/Typeset.tsx b/code/ui/blocks/src/components/Typeset.tsx index 4ecf8ab70929..35f0dda5f31d 100644 --- a/code/ui/blocks/src/components/Typeset.tsx +++ b/code/ui/blocks/src/components/Typeset.tsx @@ -1,8 +1,8 @@ import type { FC } from 'react'; import React from 'react'; -import { transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies +import { transparentize } from 'polished'; import { styled } from '@storybook/theming'; -import { withReset } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { withReset } from '@storybook/components'; import { getBlockBackgroundStyle } from './BlockBackgroundStyles'; const Label = styled.div(({ theme }) => ({ diff --git a/code/ui/blocks/src/controls/Boolean.tsx b/code/ui/blocks/src/controls/Boolean.tsx index 8bd205b8373c..8abec1e34902 100644 --- a/code/ui/blocks/src/controls/Boolean.tsx +++ b/code/ui/blocks/src/controls/Boolean.tsx @@ -1,10 +1,10 @@ import type { FC } from 'react'; import React, { useCallback } from 'react'; -import { opacify, transparentize } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies +import { opacify, transparentize } from 'polished'; import { styled } from '@storybook/theming'; -import { Form } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Form } from '@storybook/components'; import { getControlId, getControlSetterButtonId } from './helpers'; import type { ControlProps, BooleanValue, BooleanConfig } from './types'; diff --git a/code/ui/blocks/src/controls/Files.tsx b/code/ui/blocks/src/controls/Files.tsx index eb80b40fe8d1..2354703c2917 100644 --- a/code/ui/blocks/src/controls/Files.tsx +++ b/code/ui/blocks/src/controls/Files.tsx @@ -1,7 +1,7 @@ import type { ChangeEvent, FC } from 'react'; import React from 'react'; import { styled } from '@storybook/theming'; -import { Form } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Form } from '@storybook/components'; import type { ControlProps } from './types'; import { getControlId } from './helpers'; diff --git a/code/ui/blocks/src/controls/options/Select.tsx b/code/ui/blocks/src/controls/options/Select.tsx index ffca796a50eb..f033c131bd71 100644 --- a/code/ui/blocks/src/controls/options/Select.tsx +++ b/code/ui/blocks/src/controls/options/Select.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { styled } from '@storybook/theming'; import type { CSSObject } from '@storybook/theming'; import { logger } from '@storybook/client-logger'; -import { Icons } from '@storybook/components'; // eslint-disable-line import/no-extraneous-dependencies +import { Icons } from '@storybook/components'; import type { ControlProps, OptionsSelection, NormalizedOptionsConfig } from '../types'; From 43871bc1622eca57dfdb69b8a53bd1f0ac14f67b Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 11 Nov 2022 09:45:17 +0100 Subject: [PATCH 073/258] fixes --- code/ui/blocks/src/components/Toolbar.tsx | 1 - code/ui/blocks/src/controls/Range.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/code/ui/blocks/src/components/Toolbar.tsx b/code/ui/blocks/src/components/Toolbar.tsx index df1c70dff877..0838f19f1818 100644 --- a/code/ui/blocks/src/components/Toolbar.tsx +++ b/code/ui/blocks/src/components/Toolbar.tsx @@ -1,7 +1,6 @@ import type { FC, MouseEvent } from 'react'; import React, { Fragment } from 'react'; import { styled } from '@storybook/theming'; -// eslint-disable-next-line import/no-extraneous-dependencies import { FlexBar, Icons, diff --git a/code/ui/blocks/src/controls/Range.tsx b/code/ui/blocks/src/controls/Range.tsx index 0c5459ca6f06..adf0aafd11f8 100644 --- a/code/ui/blocks/src/controls/Range.tsx +++ b/code/ui/blocks/src/controls/Range.tsx @@ -2,7 +2,7 @@ import type { FC, ChangeEvent } from 'react'; import React, { useMemo } from 'react'; import { styled } from '@storybook/theming'; -import { lighten, darken, rgba } from 'polished'; // eslint-disable-line import/no-extraneous-dependencies +import { lighten, darken, rgba } from 'polished'; import { getControlId } from './helpers'; import type { ControlProps, NumberValue, RangeConfig } from './types'; From 40f48ebaac15e6e85c769c911b2caa5b0846d35e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 11 Nov 2022 09:46:58 +0100 Subject: [PATCH 074/258] Update .circleci/config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 17151b19d323..4bed5dc41544 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -378,7 +378,7 @@ jobs: yarn coverage chromatic-internal-storybooks: executor: - class: medium+ + class: medium name: sb_node_16_browsers steps: # switched this to the CircleCI helper to get the full git history for TurboSnap From 5532beb988b48ef13e90a4e36d3f2b2dbeb2eeb4 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 11:31:40 +0100 Subject: [PATCH 075/258] CI: add discord reports on failure --- .circleci/config.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4bed5dc41544..135aee9c8fd9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,6 +51,7 @@ executors: orbs: git-shallow-clone: guitarrapc/git-shallow-clone@2.4.0 browser-tools: circleci/browser-tools@1.4.0 + discord: antonioned/discord@0.1.0 commands: # Forked off from https://github.com/guitarrapc/git-shallow-clone-orb @@ -175,6 +176,14 @@ commands: echo "Canceling workflow as previous step resulted in failure." echo "To execute all checks locally, please run yarn ci-tests" curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" + report-workflow-on-failure: + description: 'Reports failures to discord' + steps: + - discord/status: + fail_only: false + failure_message: "Hey **${CIRCLE_USERNAME}**, the **$CIRCLE_JOB** job has failed! Pipeline id: << pipeline.id >> , build: **${CIRCLE_BUILD_URL}**" + webhook: "${DISCORD_STATUS_WEBHOOK}" + mentions: "@yann" jobs: build: executor: @@ -411,6 +420,7 @@ jobs: - run: name: Creating Sandboxes command: yarn task --task sandbox --template $(yarn get-template << pipeline.parameters.workflow >> create) --no-link --start-from=never --junit + - report-workflow-on-failure - persist_to_workspace: root: . paths: @@ -434,6 +444,7 @@ jobs: - run: name: Smoke Testing Sandboxes command: yarn task --task smoke-test --template $(yarn get-template << pipeline.parameters.workflow >> smoke-test) --no-link --start-from=never --junit + - report-workflow-on-failure - store_test_results: path: test-results build-sandboxes: @@ -453,6 +464,7 @@ jobs: - run: name: Building Sandboxes command: yarn task --task build --template $(yarn get-template << pipeline.parameters.workflow >> build) --no-link --start-from=never --junit + - report-workflow-on-failure - store_test_results: path: test-results - persist_to_workspace: @@ -476,6 +488,7 @@ jobs: - run: name: Running Test Runner command: yarn task --task test-runner --template $(yarn get-template << pipeline.parameters.workflow >> test-runner) --no-link --start-from=never --junit + - report-workflow-on-failure - store_test_results: path: test-results chromatic-sandboxes: @@ -494,6 +507,7 @@ jobs: - run: name: Running Chromatic command: yarn task --task chromatic --template $(yarn get-template << pipeline.parameters.workflow >> chromatic) --no-link --start-from=never --junit + - report-workflow-on-failure - store_test_results: path: test-results e2e-sandboxes: @@ -513,6 +527,7 @@ jobs: - run: name: Running E2E Tests command: yarn task --task e2e-tests --template $(yarn get-template << pipeline.parameters.workflow >> e2e-tests) --no-link --start-from=never --junit + - report-workflow-on-failure - store_test_results: path: test-results - store_artifacts: # this is where playwright puts more complex stuff From 3ef5820616f818c8c6f3633828ee21aa6b82557d Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 11:33:03 +0100 Subject: [PATCH 076/258] fake an e2e failure for testing purposes --- code/e2e-tests/addon-interactions.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/e2e-tests/addon-interactions.spec.ts b/code/e2e-tests/addon-interactions.spec.ts index 22b189b7217b..5f4694b71f12 100644 --- a/code/e2e-tests/addon-interactions.spec.ts +++ b/code/e2e-tests/addon-interactions.spec.ts @@ -27,7 +27,7 @@ test.describe('addon-interactions', () => { await sbPage.viewAddonPanel('Interactions'); const welcome = await sbPage.previewRoot().locator('.welcome'); - await expect(welcome).toContainText('Welcome, Jane Doe!'); + await expect(welcome).toContainText('Welcome, John Doe!'); const interactionsTab = await page.locator('#tabbutton-interactions'); await expect(interactionsTab).toContainText(/(1)/); From 3a6721a8916bd40377295684e0aec980d320f9f3 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 11:45:20 +0100 Subject: [PATCH 077/258] remove webhook property --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 135aee9c8fd9..2fb4261e40e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -182,7 +182,6 @@ commands: - discord/status: fail_only: false failure_message: "Hey **${CIRCLE_USERNAME}**, the **$CIRCLE_JOB** job has failed! Pipeline id: << pipeline.id >> , build: **${CIRCLE_BUILD_URL}**" - webhook: "${DISCORD_STATUS_WEBHOOK}" mentions: "@yann" jobs: build: From 750a2898200790e78467ea8ce4f317e6abdf9ead Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 11:48:21 +0100 Subject: [PATCH 078/258] add branch filtering for discord hook --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2fb4261e40e3..5764cbe43ddd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -180,6 +180,7 @@ commands: description: 'Reports failures to discord' steps: - discord/status: + only_for_branches: chore/failure-reports fail_only: false failure_message: "Hey **${CIRCLE_USERNAME}**, the **$CIRCLE_JOB** job has failed! Pipeline id: << pipeline.id >> , build: **${CIRCLE_BUILD_URL}**" mentions: "@yann" From 1f1f5c3f876597dce28f24a7fa7b9585b957a6ec Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 12:00:12 +0100 Subject: [PATCH 079/258] only provide reports on failure --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5764cbe43ddd..a375e45edd61 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -181,7 +181,7 @@ commands: steps: - discord/status: only_for_branches: chore/failure-reports - fail_only: false + fail_only: true failure_message: "Hey **${CIRCLE_USERNAME}**, the **$CIRCLE_JOB** job has failed! Pipeline id: << pipeline.id >> , build: **${CIRCLE_BUILD_URL}**" mentions: "@yann" jobs: From 41efbc6dfb1df20390da546612aa793fc3033841 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 12:17:15 +0100 Subject: [PATCH 080/258] add template name to report message --- .circleci/config.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a375e45edd61..012717779429 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -176,14 +176,21 @@ commands: echo "Canceling workflow as previous step resulted in failure." echo "To execute all checks locally, please run yarn ci-tests" curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" + set-current-running-template: + description: 'Set current running template name in a variable. Useful for reporting.' + steps: + - run: + name: Setting environtment variable for current template + command: | + echo 'export CURRENT_TEMPLATE=$(yarn get-template << pipeline.parameters.workflow >> ${CIRCLE_JOB})' >> "$BASH_ENV" report-workflow-on-failure: description: 'Reports failures to discord' steps: - - discord/status: - only_for_branches: chore/failure-reports - fail_only: true - failure_message: "Hey **${CIRCLE_USERNAME}**, the **$CIRCLE_JOB** job has failed! Pipeline id: << pipeline.id >> , build: **${CIRCLE_BUILD_URL}**" - mentions: "@yann" + - set-current-running-template + - discord/status: + only_for_branches: chore/failure-reports + fail_only: true + failure_message: "Oh no! The **$CIRCLE_JOB** job has failed for ${CURRENT_TEMPLATE}" jobs: build: executor: From 422ef5c6053db7e7f365f4e13528de2fc412c738 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 13:23:32 +0100 Subject: [PATCH 081/258] experiment --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 012717779429..096bb1eab261 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -180,13 +180,13 @@ commands: description: 'Set current running template name in a variable. Useful for reporting.' steps: - run: - name: Setting environtment variable for current template + name: Setting environment variable for current template + when: always command: | echo 'export CURRENT_TEMPLATE=$(yarn get-template << pipeline.parameters.workflow >> ${CIRCLE_JOB})' >> "$BASH_ENV" report-workflow-on-failure: description: 'Reports failures to discord' steps: - - set-current-running-template - discord/status: only_for_branches: chore/failure-reports fail_only: true @@ -534,6 +534,7 @@ jobs: - run: name: Running E2E Tests command: yarn task --task e2e-tests --template $(yarn get-template << pipeline.parameters.workflow >> e2e-tests) --no-link --start-from=never --junit + - set-current-running-template - report-workflow-on-failure - store_test_results: path: test-results From ffa44b5df09d389c40039d7b4a76db30c8a2e7ff Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 11 Nov 2022 13:29:51 +0100 Subject: [PATCH 082/258] canvas stories --- code/ui/.storybook/main.ts | 24 +++- code/ui/blocks/src/blocks/Canvas.stories.tsx | 83 ++++++++++++ code/ui/blocks/src/blocks/Canvas.tsx | 66 ++++----- code/ui/blocks/src/blocks/Source.tsx | 7 +- .../internal/InternalCanvas.stories.tsx | 127 ++++++++++++++++++ code/ui/blocks/src/blocks/internal/README.md | 8 ++ 6 files changed, 272 insertions(+), 43 deletions(-) create mode 100644 code/ui/blocks/src/blocks/Canvas.stories.tsx create mode 100644 code/ui/blocks/src/blocks/internal/InternalCanvas.stories.tsx create mode 100644 code/ui/blocks/src/blocks/internal/README.md diff --git a/code/ui/.storybook/main.ts b/code/ui/.storybook/main.ts index 526d46fabfb3..0c7c19bc1c7a 100644 --- a/code/ui/.storybook/main.ts +++ b/code/ui/.storybook/main.ts @@ -18,7 +18,29 @@ const allStories = [ titlePrefix: '@storybook-blocks', }, ]; -const blocksOnlyStories = ['../blocks/src/@(blocks|controls)/**/*.@(mdx|stories.@(tsx|ts|jsx|js))']; + +/** + * match all stories in blocks/src/blocks and blocks/src/controls EXCEPT blocks/src/blocks/internal + * Examples: + * + * src/blocks/Canvas.stories.tsx - MATCH + * src/blocks/internal/InternalCanvas.stories.tsx - IGNORED, internal stories + * src/blocks/internal/nested/InternalCanvas.stories.tsx - IGNORED, internal stories + * + * src/blocks/Canvas.tsx - IGNORED, not story + * src/blocks/nested/Canvas.stories.tsx - MATCH + * src/blocks/nested/deep/Canvas.stories.tsx - MATCH + * + * src/controls/Boolean.stories.tsx - MATCH + * src/controls/Boolean.tsx - IGNORED, not story + * + * src/components/ColorPalette.stories.tsx - MATCH + * src/components/ColorPalette.tsx - IGNORED, not story + */ +const blocksOnlyStories = [ + '../blocks/src/@(blocks|controls)/!(internal)/**/*.@(mdx|stories.@(tsx|ts|jsx|js))', + '../blocks/src/@(blocks|controls)/*.@(mdx|stories.@(tsx|ts|jsx|js))', +]; const config: StorybookConfig = { stories: isBlocksOnly ? blocksOnlyStories : allStories, diff --git a/code/ui/blocks/src/blocks/Canvas.stories.tsx b/code/ui/blocks/src/blocks/Canvas.stories.tsx new file mode 100644 index 000000000000..54f13a1e5c05 --- /dev/null +++ b/code/ui/blocks/src/blocks/Canvas.stories.tsx @@ -0,0 +1,83 @@ +import React from 'react'; +import type { Meta, StoryObj } from '@storybook/react'; +import { Canvas } from './Canvas'; +import { Story as StoryComponent } from './Story'; +import * as BooleanStories from '../controls/Boolean.stories'; + +const meta: Meta = { + component: Canvas, + parameters: { + relativeCsfPaths: ['../controls/Boolean.stories'], + }, + render: (args) => { + return ( + + + + ); + }, +}; +export default meta; + +type Story = StoryObj; + +export const BasicStory: Story = {}; + +export const WithSourceOpen: Story = { + args: { + withSource: 'open', + }, +}; +export const WithSourceClosed: Story = { + args: { + withSource: 'closed', + }, +}; + +// TODO: what is the purpose of mdxSource exactly? +export const WithMdxSource: Story = { + name: 'With MDX Source', + args: { + withSource: 'open', + mdxSource: `const thisIsCustomSource = true; +if (isSyntaxHighlighted) { + console.log('syntax highlighting is working'); +}`, + }, +}; + +export const WithoutSource: Story = { + args: { + withSource: 'none', + }, +}; + +export const WithToolbar: Story = { + args: { + withToolbar: true, + }, +}; +export const WithAdditionalActions: Story = { + args: { + additionalActions: [ + { + title: 'Open in GitHub', + onClick: () => { + window.open( + 'https://github.com/storybookjs/storybook/blob/next/code/ui/blocks/src/controls/Boolean.stories.tsx', + '_blank' + ); + }, + }, + { + title: 'Go to documentation', + onClick: () => { + window.open( + 'https://storybook.js.org/docs/react/essentials/controls#annotation', + '_blank' + ); + }, + }, + ], + }, +}; diff --git a/code/ui/blocks/src/blocks/Canvas.tsx b/code/ui/blocks/src/blocks/Canvas.tsx index 239bca9c8a79..a6977df4aa2f 100644 --- a/code/ui/blocks/src/blocks/Canvas.tsx +++ b/code/ui/blocks/src/blocks/Canvas.tsx @@ -1,5 +1,5 @@ -import type { FC, ReactElement, ReactNode, ReactNodeArray } from 'react'; -import React, { useContext } from 'react'; +import React, { Children, useContext } from 'react'; +import type { FC, ReactElement, ReactNode } from 'react'; import type { Framework } from '@storybook/types'; import type { PreviewProps as PurePreviewProps } from '../components'; import { Preview as PurePreview, PreviewSkeleton } from '../components'; @@ -7,62 +7,52 @@ import type { DocsContextProps } from './DocsContext'; import { DocsContext } from './DocsContext'; import type { SourceContextProps } from './SourceContainer'; import { SourceContext } from './SourceContainer'; -import { getSourceProps, SourceState } from './Source'; +import { useSourceProps, SourceState } from './Source'; import { useStories } from './useStory'; export { SourceState }; -type CanvasProps = PurePreviewProps & { +type CanvasProps = Omit & { withSource?: SourceState; mdxSource?: string; }; -const getPreviewProps = ( +const usePreviewProps = ( { withSource, mdxSource, children, ...props }: CanvasProps & { children?: ReactNode }, docsContext: DocsContextProps, sourceContext: SourceContextProps ) => { - let sourceState = withSource; - let isLoading = false; - if (sourceState === SourceState.NONE) { - return { isLoading, previewProps: props }; - } - if (mdxSource) { - return { - isLoading, - previewProps: { - ...props, - withSource: getSourceProps({ code: decodeURI(mdxSource) }, docsContext, sourceContext), - isExpanded: sourceState === SourceState.OPEN, - }, - }; - } - const childArray: ReactNodeArray = Array.isArray(children) ? children : [children]; - const storyChildren = childArray.filter( - (c: ReactElement) => c.props && (c.props.id || c.props.name || c.props.of) - ) as ReactElement[]; - const targetIds = storyChildren.map(({ props: { id, of, name } }) => { - if (id) return id; - if (of) return docsContext.storyIdByModuleExport(of); + /* + get all story IDs by traversing through the children, + filter out any non-story children (e.g. text nodes) + and then get the id from each story depending on available props + */ + const storyIds = (Children.toArray(children) as ReactElement[]) + .filter((c) => c.props && (c.props.id || c.props.name || c.props.of)) + .map(({ props: { id, of, name } }) => { + if (id) return id; + if (of) return docsContext.storyIdByModuleExport(of); - return docsContext.storyIdByName(name); - }); - - const sourceProps = getSourceProps({ ids: targetIds }, docsContext, sourceContext); - if (!sourceState) sourceState = sourceProps.state; - const storyIds = targetIds.map((targetId) => { - return targetId; - }); + return docsContext.storyIdByName(name); + }); const stories = useStories(storyIds, docsContext); - isLoading = stories.some((s) => !s); + const isLoading = stories.some((s) => !s); + const sourceProps = useSourceProps( + mdxSource ? { code: decodeURI(mdxSource) } : { ids: storyIds }, + docsContext, + sourceContext + ); + if (withSource === SourceState.NONE) { + return { isLoading, previewProps: props }; + } return { isLoading, previewProps: { ...props, // pass through columns etc. withSource: sourceProps, - isExpanded: sourceState === SourceState.OPEN, + isExpanded: (withSource || sourceProps.state) === SourceState.OPEN, }, }; }; @@ -70,7 +60,7 @@ const getPreviewProps = ( export const Canvas: FC = (props) => { const docsContext = useContext(DocsContext); const sourceContext = useContext(SourceContext); - const { isLoading, previewProps } = getPreviewProps(props, docsContext, sourceContext); + const { isLoading, previewProps } = usePreviewProps(props, docsContext, sourceContext); const { children } = props; if (isLoading) return ; diff --git a/code/ui/blocks/src/blocks/Source.tsx b/code/ui/blocks/src/blocks/Source.tsx index eb578b48085a..6b6454515bd9 100644 --- a/code/ui/blocks/src/blocks/Source.tsx +++ b/code/ui/blocks/src/blocks/Source.tsx @@ -89,7 +89,7 @@ const getSnippet = (snippet: string, story?: Store_Story): string => { type SourceStateProps = { state: SourceState }; type PureSourceProps = ComponentProps; -export const getSourceProps = ( +export const useSourceProps = ( props: SourceProps, docsContext: DocsContextProps, sourceContext: SourceContextProps @@ -100,8 +100,7 @@ export const getSourceProps = ( const singleProps = props as SingleSourceProps; const multiProps = props as MultiSourceProps; - let source = codeProps.code; // prefer user-specified code - let { format } = codeProps; // prefer user-specified code + let { format, code: source } = codeProps; // prefer user-specified code const targetIds = multiProps.ids || [singleProps.id || primaryId]; const storyIds = targetIds.map((targetId) => { @@ -151,6 +150,6 @@ export const getSourceProps = ( export const Source: FC = (props) => { const sourceContext = useContext(SourceContext); const docsContext = useContext(DocsContext); - const sourceProps = getSourceProps(props, docsContext, sourceContext); + const sourceProps = useSourceProps(props, docsContext, sourceContext); return ; }; diff --git a/code/ui/blocks/src/blocks/internal/InternalCanvas.stories.tsx b/code/ui/blocks/src/blocks/internal/InternalCanvas.stories.tsx new file mode 100644 index 000000000000..24afb9a39f0a --- /dev/null +++ b/code/ui/blocks/src/blocks/internal/InternalCanvas.stories.tsx @@ -0,0 +1,127 @@ +/// ; +/// ; +import React from 'react'; +import type { Meta, StoryObj } from '@storybook/react'; +import { userEvent, within } from '@storybook/testing-library'; +import { expect } from '@storybook/jest'; +import { Canvas } from '../Canvas'; +import { Story as StoryComponent } from '../Story'; +import * as BooleanStories from '../../controls/Boolean.stories'; + +const meta: Meta = { + title: 'Blocks/Internal/Canvas', + component: Canvas, + parameters: { + relativeCsfPaths: ['../controls/Boolean.stories'], + }, + render: (args) => { + return ( + + + + ); + }, +}; +export default meta; + +type Story = StoryObj; + +const expectAmountOfStoriesInSource = + (amount: number): Story['play'] => + async ({ canvasElement }) => { + // TODO: it's bad that we have to resort to querySelector here, our markup isn't very accessible + + // Arrange - find the story element + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const story = within(canvasElement.querySelector('.docs-story')!); + + // Act - click button to show code + await userEvent.click(story.getByText('Show code')); + + // Arrange - find the story element + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const source = within(canvasElement.querySelector('pre')!); + // Assert - check that the correct amount of stories' source is shown + const booleanControlNodes = await source.findAllByText('BooleanControl'); + expect(booleanControlNodes).toHaveLength(amount); + }; + +export const MultipleChildren: Story = { + render: (args) => { + return ( + + + + + ); + }, + play: expectAmountOfStoriesInSource(2), +}; + +export const MultipleChildrenColumns: Story = { + args: { + isColumn: true, + }, + render: (args) => { + return ( + + + + + ); + }, + play: expectAmountOfStoriesInSource(2), +}; + +export const MultipleChildrenThreeColumns: Story = { + args: { + columns: 3, + }, + render: (args) => { + return ( + + + + + + + + + + + + ); + }, + play: expectAmountOfStoriesInSource(9), +}; + +export const MixedChildrenStories: Story = { + args: { isColumn: true }, + render: (args) => { + return ( + +

Headline for Boolean Controls true

+ +

Headline for Boolean Controls undefined

+ +
+ ); + }, + play: async (args) => { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + await expectAmountOfStoriesInSource(2)!(args); + + // Arrange - find canvas element + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const story = within(args.canvasElement.querySelector('.docs-story')!); + // Assert - find two headlines + expect(story.queryAllByText(/Headline for Boolean Controls/i)).toHaveLength(2); + + // Arrange - find source code element + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const source = within(args.canvasElement.querySelector('pre')!); + + // Assert - headlines are not in source code + expect(source.queryByText(/Headline for Boolean Controls/i)).not.toBeInTheDocument(); + }, +}; diff --git a/code/ui/blocks/src/blocks/internal/README.md b/code/ui/blocks/src/blocks/internal/README.md new file mode 100644 index 000000000000..cad12d8f0a00 --- /dev/null +++ b/code/ui/blocks/src/blocks/internal/README.md @@ -0,0 +1,8 @@ +# Internal `@storybook/blocks` Stories + +This directory contains stories that are not suitable for public documentation, but that we still want to keep to ensure things don't break. + +Some blocks have deprecated features that users shouldn't use moving forward, and these internal stories represents those. +That way we can still test them and ensure the features work, until they are removed for good. + +This directory is not part of the (public) Blocks Storybook, but are included in the full UI Storybook. From fa9d0def79b8d10f529208ab08412f54610cbeff Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 13:40:32 +0100 Subject: [PATCH 083/258] move set-current-running-template inside of reporting step --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 096bb1eab261..99f5ec1cc03a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -187,6 +187,7 @@ commands: report-workflow-on-failure: description: 'Reports failures to discord' steps: + - set-current-running-template - discord/status: only_for_branches: chore/failure-reports fail_only: true @@ -534,7 +535,6 @@ jobs: - run: name: Running E2E Tests command: yarn task --task e2e-tests --template $(yarn get-template << pipeline.parameters.workflow >> e2e-tests) --no-link --start-from=never --junit - - set-current-running-template - report-workflow-on-failure - store_test_results: path: test-results From 0ba542f3df8738b8a2f1b5de5647d06f596dd218 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 11 Nov 2022 13:46:24 +0100 Subject: [PATCH 084/258] Story stories --- code/ui/blocks/src/blocks/Story.stories.tsx | 84 ++++++++++++++++++++- code/ui/blocks/src/blocks/Story.tsx | 28 +++---- 2 files changed, 94 insertions(+), 18 deletions(-) diff --git a/code/ui/blocks/src/blocks/Story.stories.tsx b/code/ui/blocks/src/blocks/Story.stories.tsx index bb09d8c635d7..bd904d08d683 100644 --- a/code/ui/blocks/src/blocks/Story.stories.tsx +++ b/code/ui/blocks/src/blocks/Story.stories.tsx @@ -1,3 +1,4 @@ +import React from 'react'; import type { Meta, StoryObj } from '@storybook/react'; import { Story as StoryComponent } from './Story'; @@ -13,8 +14,89 @@ export default meta; type Story = StoryObj; -export const BasicOf: Story = { +export const Of: Story = { args: { of: BooleanStories.Undefined, }, }; + +export const OfWithMeta: Story = { + args: { + of: BooleanStories.True, + meta: BooleanStories.default, + }, +}; + +export const Id: Story = { + args: { + id: `${process.env.BLOCKS_ONLY ? '' : 'storybook-blocks-'}controls-boolean--false`, + }, +}; + +export const Name: Story = { + args: { + name: 'True', + }, +}; + +export const Inline: Story = { + args: { + of: BooleanStories.Undefined, + inline: true, + }, + decorators: [ + (Story) => ( + <> + A border has been added to the following story to highlight its final size. +
+ +
+ + ), + ], +}; +export const InlineWithHeight: Story = { + ...Inline, + args: { + of: BooleanStories.Undefined, + inline: true, + height: '300px', + }, +}; +export const Iframe: Story = { + ...Inline, + args: { + of: BooleanStories.Undefined, + inline: false, + }, +}; +export const IframeWithHeight: Story = { + ...Inline, + args: { + of: BooleanStories.Undefined, + inline: false, + height: '300px', + }, +}; + +// export const WithPlay: Story = { +// args: { +// of: BooleanStories.Undefined, +// play: () => { +// throw new Error('This should not play automatically'); +// }, +// parameters: { docs: { autoplay: true } }, +// }, +// }; +// export const WithPlayDisabled: Story = { +// args: { +// of: BooleanStories.Undefined, +// play: () => { +// throw new Error('This should not play automatically'); +// }, +// }, +// }; + +// TODO: types suggest that can take ProjectAnnotations, but it doesn't seem to do anything with them +// Such as parameters, decorators, etc. +// they seem to be taken from the story itself, and not from the call diff --git a/code/ui/blocks/src/blocks/Story.tsx b/code/ui/blocks/src/blocks/Story.tsx index be42c12850d5..0bbe8cfac8aa 100644 --- a/code/ui/blocks/src/blocks/Story.tsx +++ b/code/ui/blocks/src/blocks/Story.tsx @@ -25,7 +25,6 @@ type CommonProps = StoryAnnotations & { type StoryDefProps = { name: string; - children: ReactNode; }; type StoryRefProps = { @@ -36,7 +35,6 @@ type StoryRefProps = { type StoryImportProps = { name: string; - story: ElementType; }; export type StoryProps = (StoryDefProps | StoryRefProps | StoryImportProps) & CommonProps; @@ -49,8 +47,7 @@ export const getStoryId = (props: StoryProps, context: DocsContextProps): StoryI } const { name } = props as StoryDefProps; - const inputId = id; - return inputId || context.storyIdByName(name); + return id || context.storyIdByName(name); }; export const getStoryProps = ( @@ -87,14 +84,16 @@ const Story: FC = (props) => { const [showLoader, setShowLoader] = useState(true); useEffect(() => { - let cleanup: () => void; - if (story && storyRef.current) { - const element = storyRef.current as HTMLElement; - const { autoplay } = story.parameters.docs || {}; - cleanup = context.renderStoryToElement(story, element, { autoplay }); - setShowLoader(false); + if (!(story && storyRef.current)) { + return () => {}; } - return () => cleanup && cleanup(); + const element = storyRef.current as HTMLElement; + const { autoplay } = story.parameters.docs || {}; + const cleanup = context.renderStoryToElement(story, element, { autoplay }); + setShowLoader(false); + return () => { + cleanup(); + }; }, [context, story]); if (!story) { @@ -115,7 +114,7 @@ const Story: FC = (props) => { return (
{height ? ( - + ) : null} {showLoader && }
= (props) => { ); }; -Story.defaultProps = { - children: null, - name: null, -}; - export { Story }; From e2055b7275b082cec4f2c9f32d81e0caa19645b1 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 14:20:48 +0100 Subject: [PATCH 085/258] list merges of last 24h on failure --- .circleci/config.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 99f5ec1cc03a..e958bb0e13e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -184,14 +184,24 @@ commands: when: always command: | echo 'export CURRENT_TEMPLATE=$(yarn get-template << pipeline.parameters.workflow >> ${CIRCLE_JOB})' >> "$BASH_ENV" + list-recent-merges: + description: 'Lists the merge commits from the past 24 hours' + steps: + - run: + name: Listing merge commits from the past 24 hours + when: always + command: | + echo 'export RECENT_MERGES=$(git log --merges --oneline --since="24 hours ago" --pretty=format:"%h %<(12)%ar | %s [%an]" | grep "Merge pull request")' >> "$BASH_ENV" + echo ${RECENT_MERGES} report-workflow-on-failure: description: 'Reports failures to discord' steps: - set-current-running-template + - list-recent-merges - discord/status: only_for_branches: chore/failure-reports fail_only: true - failure_message: "Oh no! The **$CIRCLE_JOB** job has failed for ${CURRENT_TEMPLATE}" + failure_message: "Oh no! The **$CIRCLE_JOB** job has failed for **${CURRENT_TEMPLATE}**.\n Here are the merges of the last 24h:\n\n${RECENT_MERGES}" jobs: build: executor: From ab084c64533084fcfe46e842ddecc7e6050ef148 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 14:53:03 +0100 Subject: [PATCH 086/258] switch failure experimentations --- code/e2e-tests/addon-interactions.spec.ts | 2 +- scripts/tasks/build.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/e2e-tests/addon-interactions.spec.ts b/code/e2e-tests/addon-interactions.spec.ts index 5f4694b71f12..22b189b7217b 100644 --- a/code/e2e-tests/addon-interactions.spec.ts +++ b/code/e2e-tests/addon-interactions.spec.ts @@ -27,7 +27,7 @@ test.describe('addon-interactions', () => { await sbPage.viewAddonPanel('Interactions'); const welcome = await sbPage.previewRoot().locator('.welcome'); - await expect(welcome).toContainText('Welcome, John Doe!'); + await expect(welcome).toContainText('Welcome, Jane Doe!'); const interactionsTab = await page.locator('#tabbutton-interactions'); await expect(interactionsTab).toContainText(/(1)/); diff --git a/scripts/tasks/build.ts b/scripts/tasks/build.ts index 8f6acedc2322..d05d131929f1 100644 --- a/scripts/tasks/build.ts +++ b/scripts/tasks/build.ts @@ -9,6 +9,11 @@ export const build: Task = { return pathExists(builtSandboxDir); }, async run({ sandboxDir }, { dryRun, debug }) { + const result = 1 + 1 === 2; + if (result === true) { + throw new Error('Oh no!'); + } + return exec(`yarn build-storybook --quiet`, { cwd: sandboxDir }, { dryRun, debug }); }, }; From c14e425d2f6ec7f4c27b938722fb92c953834156 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Fri, 11 Nov 2022 15:00:20 +0100 Subject: [PATCH 087/258] checkout before reporting --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e958bb0e13e5..31866da221c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -196,12 +196,14 @@ commands: report-workflow-on-failure: description: 'Reports failures to discord' steps: + - checkout_advanced: + clone_options: --shallow-since "5 days ago" - set-current-running-template - list-recent-merges - discord/status: only_for_branches: chore/failure-reports fail_only: true - failure_message: "Oh no! The **$CIRCLE_JOB** job has failed for **${CURRENT_TEMPLATE}**.\n Here are the merges of the last 24h:\n\n${RECENT_MERGES}" + failure_message: "Oh no! The **$CIRCLE_JOB** job has failed for **${CURRENT_TEMPLATE}**." jobs: build: executor: @@ -525,7 +527,6 @@ jobs: - run: name: Running Chromatic command: yarn task --task chromatic --template $(yarn get-template << pipeline.parameters.workflow >> chromatic) --no-link --start-from=never --junit - - report-workflow-on-failure - store_test_results: path: test-results e2e-sandboxes: From 96229e6d00ef0c8345fef8727dabfc1fdfa357b1 Mon Sep 17 00:00:00 2001 From: Jeppe Reinhold Date: Fri, 11 Nov 2022 15:20:57 +0100 Subject: [PATCH 088/258] add interaction stories to Story block --- code/ui/.storybook/main.ts | 3 ++ code/ui/blocks/src/blocks/Story.stories.tsx | 27 ++++------ .../blocks/src/controls/Boolean.stories.tsx | 54 ++++++++++++++++++- code/ui/blocks/src/controls/Boolean.tsx | 10 +++- 4 files changed, 74 insertions(+), 20 deletions(-) diff --git a/code/ui/.storybook/main.ts b/code/ui/.storybook/main.ts index 0c7c19bc1c7a..0a5bbf2bad80 100644 --- a/code/ui/.storybook/main.ts +++ b/code/ui/.storybook/main.ts @@ -56,6 +56,9 @@ const config: StorybookConfig = { core: { disableTelemetry: true, }, + features: { + interactionsDebugger: true, + }, viteFinal: (vite, { configType }) => ({ ...vite, plugins: [ diff --git a/code/ui/blocks/src/blocks/Story.stories.tsx b/code/ui/blocks/src/blocks/Story.stories.tsx index bd904d08d683..8ef3de1672a5 100644 --- a/code/ui/blocks/src/blocks/Story.stories.tsx +++ b/code/ui/blocks/src/blocks/Story.stories.tsx @@ -79,23 +79,16 @@ export const IframeWithHeight: Story = { }, }; -// export const WithPlay: Story = { -// args: { -// of: BooleanStories.Undefined, -// play: () => { -// throw new Error('This should not play automatically'); -// }, -// parameters: { docs: { autoplay: true } }, -// }, -// }; -// export const WithPlayDisabled: Story = { -// args: { -// of: BooleanStories.Undefined, -// play: () => { -// throw new Error('This should not play automatically'); -// }, -// }, -// }; +export const WithDefaultInteractions: Story = { + args: { + of: BooleanStories.Toggling, + }, +}; +export const WithInteractionsAutoplayInStory: Story = { + args: { + of: BooleanStories.TogglingInDocs, + }, +}; // TODO: types suggest that can take ProjectAnnotations, but it doesn't seem to do anything with them // Such as parameters, decorators, etc. diff --git a/code/ui/blocks/src/controls/Boolean.stories.tsx b/code/ui/blocks/src/controls/Boolean.stories.tsx index 726ab58e9b30..82458c745a4b 100644 --- a/code/ui/blocks/src/controls/Boolean.stories.tsx +++ b/code/ui/blocks/src/controls/Boolean.stories.tsx @@ -1,10 +1,20 @@ +import { expect } from '@storybook/jest'; import type { Meta, StoryObj } from '@storybook/react'; +import { within, fireEvent } from '@storybook/testing-library'; +import { addons } from '@storybook/addons'; +import { RESET_STORY_ARGS, STORY_ARGS_UPDATED } from '@storybook/core-events'; import { BooleanControl } from './Boolean'; const meta = { component: BooleanControl, tags: ['docsPage'], - parameters: { withRawArg: 'value', controls: { include: ['value'] } }, + parameters: { + withRawArg: 'value', + controls: { include: ['value'] }, + notes: 'These are notes for the Boolean control stories', + info: 'This is info for the Boolean control stories', + jsx: { useBooleanShorthandSyntax: false }, + }, args: { name: 'boolean' }, } as Meta; @@ -26,3 +36,45 @@ export const Undefined: StoryObj = { value: undefined, }, }; + +export const Toggling: StoryObj = { + args: { + value: undefined, + }, + play: async ({ canvasElement, id }) => { + const channel = addons.getChannel(); + + channel.emit(RESET_STORY_ARGS, { storyId: id }); + await new Promise((resolve) => { + channel.once(STORY_ARGS_UPDATED, resolve); + }); + + const canvas = within(canvasElement); + + // from Undefined to False + const setBooleanControl = canvas.getByText('Set boolean'); + await fireEvent.click(setBooleanControl); + + let toggle = await canvas.findByTitle('Change to true'); + expect(toggle).toBeInTheDocument(); + + // from False to True + await fireEvent.click(toggle); + toggle = await canvas.findByTitle('Change to false'); + expect(toggle).toBeInTheDocument(); + + // from True to False + await fireEvent.click(toggle); + toggle = await canvas.findByTitle('Change to true'); + expect(toggle).toBeInTheDocument(); + }, +}; + +export const TogglingInDocs: StoryObj = { + ...Toggling, + parameters: { + docs: { + autoplay: true, + }, + }, +}; diff --git a/code/ui/blocks/src/controls/Boolean.tsx b/code/ui/blocks/src/controls/Boolean.tsx index 8abec1e34902..556701febca0 100644 --- a/code/ui/blocks/src/controls/Boolean.tsx +++ b/code/ui/blocks/src/controls/Boolean.tsx @@ -86,6 +86,11 @@ const Label = styled.label(({ theme }) => ({ const parse = (value: string | null): boolean => value === 'true'; export type BooleanProps = ControlProps & BooleanConfig; +/** + * # Boolean control + * Renders a switch toggle with "True" or "False". + * or if the value is `undefined`, renders a button to set the boolean. + */ export const BooleanControl: FC = ({ name, value, onChange, onBlur, onFocus }) => { const onSetFalse = useCallback(() => onChange(false), [onChange]); if (value === undefined) { @@ -95,13 +100,14 @@ export const BooleanControl: FC = ({ name, value, onChange, onBlur ); } + const controlId = getControlId(name); const parsedValue = typeof value === 'string' ? parse(value) : value; return ( -