Skip to content

Commit

Permalink
Merge pull request #22979 from storybookjs/norbert/upgrade-jest
Browse files Browse the repository at this point in the history
Maintenance: upgrades of jest related packages
  • Loading branch information
ndelangen authored Jun 8, 2023
2 parents c213e68 + 68519b1 commit 4678e0c
Show file tree
Hide file tree
Showing 19 changed files with 61 additions and 518 deletions.
7 changes: 3 additions & 4 deletions code/addons/interactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"@storybook/preview-api": "7.1.0-alpha.29",
"@storybook/theming": "7.1.0-alpha.29",
"@storybook/types": "7.1.0-alpha.29",
"jest-mock": "^27.0.6",
"jest-mock": "^29.5.0",
"polished": "^4.2.2",
"ts-dedent": "^2.2.0"
},
Expand Down Expand Up @@ -114,9 +114,8 @@
"./src/index.ts",
"./src/manager.tsx",
"./src/preview.ts",
"./src/preset/checkActionsLoaded.ts"
],
"platform": "node"
"./src/preset.ts"
]
},
"gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae16",
"storybook": {
Expand Down
2 changes: 1 addition & 1 deletion code/addons/interactions/preset.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { checkActionsLoaded } = require('./dist/preset/checkActionsLoaded');
const { checkActionsLoaded } = require('./dist/preset');

function previewAnnotations(entry = [], options) {
checkActionsLoaded(options.configDir);
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions code/addons/storyshots-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@storybook/types": "7.1.0-alpha.29",
"@types/jest-specific-snapshot": "^0.5.6",
"glob": "^10.0.0",
"jest-specific-snapshot": "^7.0.0",
"jest-specific-snapshot": "^8.0.0",
"preact-render-to-string": "^5.1.19",
"pretty-format": "^29.0.0",
"react-test-renderer": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand All @@ -66,7 +66,7 @@
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"enzyme-to-json": "^3.6.1",
"jest-preset-angular": "^12.2.3",
"jest-preset-angular": "^13.0.1",
"jest-vue-preprocessor": "^1.7.1",
"react-test-renderer": "^16",
"rxjs": "^6.6.3",
Expand Down
2 changes: 2 additions & 0 deletions code/builders/builder-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"babel-plugin-named-exports-order": "^0.0.2",
"browser-assert": "^1.2.1",
"case-sensitive-paths-webpack-plugin": "^2.4.0",
"constants-browserify": "^1.0.0",
"css-loader": "^6.7.1",
"express": "^4.17.3",
"fork-ts-checker-webpack-plugin": "^8.0.0",
Expand All @@ -94,6 +95,7 @@
"swc-loader": "^0.2.3",
"terser-webpack-plugin": "^5.3.1",
"ts-dedent": "^2.0.0",
"url": "^0.11.0",
"util": "^0.12.4",
"util-deprecate": "^1.0.2",
"webpack": "5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,13 @@ export default async (
mainFields: ['browser', 'module', 'main'].filter(Boolean),
alias: storybookPaths,
fallback: {
stream: false,
path: require.resolve('path-browserify'),
assert: require.resolve('browser-assert'),
util: require.resolve('util'),
url: require.resolve('url'),
fs: false,
constants: require.resolve('constants-browserify'),
},
// Set webpack to resolve symlinks based on whether the user has asked node to.
// This feels like it should be default out-of-the-box in webpack :shrug:
Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/react-webpack5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@types/node": "^16.0.0"
},
"devDependencies": {
"jest-specific-snapshot": "^7.0.0",
"jest-specific-snapshot": "^8.0.0",
"typescript": "~4.9.3"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion code/lib/codemod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@types/jscodeshift": "^0.11.6",
"ansi-regex": "^5.0.1",
"jest": "^29.3.1",
"jest-specific-snapshot": "^7.0.0",
"jest-specific-snapshot": "^8.0.0",
"mdast-util-mdx-jsx": "^2.1.2",
"mdast-util-mdxjs-esm": "^1.3.1",
"remark": "^14.0.2",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/core-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"@types/serve-favicon": "^2.5.2",
"@types/ws": "^8",
"jest-os-detection": "^1.3.1",
"jest-specific-snapshot": "^7.0.0",
"jest-specific-snapshot": "^8.0.0",
"node-fetch": "^3.3.1",
"slash": "^5.0.0",
"typescript": "~4.9.3"
Expand Down
2 changes: 1 addition & 1 deletion code/lib/csf-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"devDependencies": {
"@types/fs-extra": "^11.0.1",
"@types/js-yaml": "^3.12.6",
"@types/js-yaml": "^4.0.5",
"js-yaml": "^4.1.0",
"typescript": "~4.9.3"
},
Expand Down
2 changes: 1 addition & 1 deletion code/lib/docs-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@babel/core": "^7.22.0",
"jest-specific-snapshot": "^7.0.0",
"jest-specific-snapshot": "^8.0.0",
"require-from-string": "^2.0.2",
"typescript": "~4.9.3"
},
Expand Down
2 changes: 1 addition & 1 deletion code/lib/postinstall/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"jest": "^29.3.1",
"jest-specific-snapshot": "^7.0.0",
"jest-specific-snapshot": "^8.0.0",
"jscodeshift": "^0.14.0",
"typescript": "~4.9.3"
},
Expand Down
2 changes: 1 addition & 1 deletion code/lib/preview-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"util-deprecate": "^1.0.2"
},
"devDependencies": {
"@jest/globals": "^26.6.2",
"@jest/globals": "^29.5.0",
"@storybook/core-common": "7.1.0-alpha.29",
"ansi-to-html": "^0.6.11",
"react": "^16.14.0",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/source-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"prettier": "^2.8.0"
},
"devDependencies": {
"jest-specific-snapshot": "^7.0.0",
"jest-specific-snapshot": "^8.0.0",
"typescript": "~4.9.3"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-image-snapshot": "^6.0.0",
"jest-junit": "^14.0.1",
"jest-junit": "^16.0.0",
"jest-os-detection": "^1.3.1",
"jest-serializer-html": "^7.1.0",
"jest-watch-typeahead": "^2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion code/presets/server-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"devDependencies": {
"fs-extra": "^11.1.0",
"jest-specific-snapshot": "^7.0.0",
"jest-specific-snapshot": "^8.0.0",
"typescript": "~4.9.3",
"yaml": "^2.3.1"
},
Expand Down
2 changes: 1 addition & 1 deletion code/renderers/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"@babel/core": "^7.22.0",
"@types/util-deprecate": "^1.0.0",
"expect-type": "^0.15.0",
"jest-specific-snapshot": "^7.0.0",
"jest-specific-snapshot": "^8.0.0",
"require-from-string": "^2.0.2",
"typescript": "~4.9.3"
},
Expand Down
8 changes: 3 additions & 5 deletions code/renderers/vue3/src/docs/sourceDecorator.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { describe, expect, test } from '@jest/globals';
import type { Args } from '@storybook/types';

import type { ArgsType } from 'jest-mock';
import {
mapAttributesAndDirectives,
generateAttributesSource,
Expand Down Expand Up @@ -241,7 +239,7 @@ describe('Vue3: sourceDecorator->generateAttributesSource()', () => {
generateAttributesSource(
mapAttributesAndDirectives({ camelCaseBooleanArg: true }),
{ camelCaseBooleanArg: true },
[{ camelCaseBooleanArg: { type: 'boolean' } }] as ArgsType<Args>
[{ camelCaseBooleanArg: { type: 'boolean' } }] as any
)
).toMatchInlineSnapshot(`:camel-case-boolean-arg="true"`);
});
Expand All @@ -250,7 +248,7 @@ describe('Vue3: sourceDecorator->generateAttributesSource()', () => {
generateAttributesSource(
mapAttributesAndDirectives({ camelCaseStringArg: 'foo' }),
{ camelCaseStringArg: 'foo' },
[{ camelCaseStringArg: { type: 'string' } }] as ArgsType<Args>
[{ camelCaseStringArg: { type: 'string' } }] as any
)
).toMatchInlineSnapshot(`camel-case-string-arg="foo"`);
});
Expand All @@ -268,7 +266,7 @@ describe('Vue3: sourceDecorator->generateAttributesSource()', () => {
camelCaseStringArg: 'foo',
cameCaseNumberArg: 2023,
},
[] as ArgsType<Args>
[] as any
)
).toMatchInlineSnapshot(
`:camel-case-boolean-arg="true" camel-case-string-arg="foo" :came-case-number-arg="2023"`
Expand Down
Loading

0 comments on commit 4678e0c

Please sign in to comment.