Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating deps to handle TS 4.9 #237

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand Down Expand Up @@ -102,10 +102,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stress-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests-extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 14.x
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 16.x

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand Down
File renamed without changes.
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
},
"devDependencies": {
"@auto-it/released": "^10.37.1",
"@babel/cli": "^7.12.1",
"@babel/cli": "^7.20.7",
"@jest/types": "^28.1.3",
"@storybook/addon-coverage": "^0.0.5",
"@storybook/addon-coverage": "^0.0.7",
"@storybook/addon-essentials": "next",
"@storybook/addon-interactions": "next",
"@storybook/jest": "^0.0.10",
"@storybook/jest": "next",
"@storybook/react": "next",
"@storybook/react-webpack5": "next",
"@storybook/testing-library": "next",
Expand All @@ -76,15 +76,16 @@
"husky": "^8.0.0",
"jest-image-snapshot": "^5.1.0",
"lint-staged": "^13.0.3",
"prettier": "^2.3.1",
"prettier": "^2.8.1",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"rimraf": "^3.0.2",
"storybook": "next",
"ts-jest": "^28.0.8",
"typescript": "^4.2.4",
"wait-on": "^6.0.0"
"typescript": "~4.9.4",
"wait-on": "^6.0.0",
"webpack": "^5.75.0"
Copy link
Contributor

@JReinhold JReinhold Dec 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding webpack as a dependency here, is that on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I thought I got some peer dep warnings, but I think I might be mistaken, will try without.

},
"lint-staged": {
"*.{ts,js,tsx,jsx,css,md}": "prettier --write"
Expand All @@ -100,23 +101,23 @@
"icon": "https://user-images.githubusercontent.com/321738/63501763-88dbf600-c4cc-11e9-96cd-94adadc2fd72.png"
},
"dependencies": {
"@babel/core": "^7.18.13",
"@babel/generator": "^7.18.13",
"@babel/preset-env": "^7.19.4",
"@babel/core": "^7.20.7",
"@babel/generator": "^7.20.7",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@babel/template": "^7.14.5",
"@babel/types": "^7.14.8",
"@babel/template": "^7.20.7",
"@babel/types": "^7.20.7",
"@storybook/core-common": "next",
"@storybook/csf": "next",
"@storybook/csf-tools": "next",
"@storybook/store": "next",
"@storybook/preview-api": "next",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this should be done in this PR. It will be breaking for any user with sb < alpha 52, and some people can't upgrade as they're blocked on storystorev6 issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay, I got some deprecation warnings in my console, about using @storybook/store, but I will revert then.

"can-bind-to-host": "^1.1.1",
"commander": "^9.0.0",
"expect-playwright": "^0.8.0",
"jest": "^28.0.0",
"jest-environment-node":"^28.0.0",
"jest-circus":"^28.0.0",
"jest-circus": "^28.0.0",
"jest-environment-node": "^28.0.0",
"jest-junit": "^14.0.0",
"jest-playwright-preset": "^2.0.0",
"jest-runner": "^28.0.0",
Expand Down
24 changes: 0 additions & 24 deletions src/playwright/transformPlaywright.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,37 +66,29 @@ describe('Playwright', () => {
err: err.message
});
});

if (globalThis.__sbPreRender) {
await globalThis.__sbPreRender(page, context);
}

const result = await page.evaluate(({
id,
hasPlayFn
}) => __test(id, hasPlayFn), {
id: "example-foo-bar--a"
});

if (globalThis.__sbPostRender) {
await globalThis.__sbPostRender(page, context);
}

if (globalThis.__sbCollectCoverage) {
const isCoverageSetupCorrectly = await page.evaluate(() => '__coverage__' in window);

if (!isCoverageSetupCorrectly) {
throw new Error(\`[Test runner] An error occurred when evaluating code coverage:
The code in this story is not instrumented, which means the coverage setup is likely not correct.
More info: https://github.com/storybookjs/test-runner#setting-up-code-coverage\`);
}

await jestPlaywright.saveCoverage(page);
}

return result;
};

try {
await testFn();
} catch (err) {
Expand Down Expand Up @@ -144,37 +136,29 @@ describe('Playwright', () => {
err: err.message
});
});

if (globalThis.__sbPreRender) {
await globalThis.__sbPreRender(page, context);
}

const result = await page.evaluate(({
id,
hasPlayFn
}) => __test(id, hasPlayFn), {
id: "example-foo-bar--a"
});

if (globalThis.__sbPostRender) {
await globalThis.__sbPostRender(page, context);
}

if (globalThis.__sbCollectCoverage) {
const isCoverageSetupCorrectly = await page.evaluate(() => '__coverage__' in window);

if (!isCoverageSetupCorrectly) {
throw new Error(\`[Test runner] An error occurred when evaluating code coverage:
The code in this story is not instrumented, which means the coverage setup is likely not correct.
More info: https://github.com/storybookjs/test-runner#setting-up-code-coverage\`);
}

await jestPlaywright.saveCoverage(page);
}

return result;
};

try {
await testFn();
} catch (err) {
Expand Down Expand Up @@ -223,37 +207,29 @@ describe('Playwright', () => {
err: err.message
});
});

if (globalThis.__sbPreRender) {
await globalThis.__sbPreRender(page, context);
}

const result = await page.evaluate(({
id,
hasPlayFn
}) => __test(id, hasPlayFn), {
id: "example-header--a"
});

if (globalThis.__sbPostRender) {
await globalThis.__sbPostRender(page, context);
}

if (globalThis.__sbCollectCoverage) {
const isCoverageSetupCorrectly = await page.evaluate(() => '__coverage__' in window);

if (!isCoverageSetupCorrectly) {
throw new Error(\`[Test runner] An error occurred when evaluating code coverage:
The code in this story is not instrumented, which means the coverage setup is likely not correct.
More info: https://github.com/storybookjs/test-runner#setting-up-code-coverage\`);
}

await jestPlaywright.saveCoverage(page);
}

return result;
};

try {
await testFn();
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/playwright/transformPlaywright.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { relative } from 'path';
import template from '@babel/template';
import { userOrAutoTitle } from '@storybook/store';
import { userOrAutoTitle } from '@storybook/preview-api';

import { getStorybookMetadata } from '../util';
import { transformCsf } from '../csf/transformCsf';
Expand Down
Loading