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

Maintenance: Regen lockfiles #24152

Merged
merged 11 commits into from
Sep 12, 2023
Merged

Maintenance: Regen lockfiles #24152

merged 11 commits into from
Sep 12, 2023

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Sep 12, 2023

What I did

This is the error that was happening with SWC upgraded:

/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/transpilers/swc.ts:262
      throw new Error(
            ^
Error: @swc/core threw an error when attempting to validate swc compiler options.
You may be using an old version of swc which does not support the options used by ts-node.
Try upgrading to the latest version of swc.
Error message from swc:
Failed to deserialize buffer as swc::config::Options
JSON: {"sourceMaps":true,"module":{"noInterop":false,"type":"commonjs","strictMode":true,"ignoreDynamic":false},"swcrc":false,"jsc":{"parser":{"syntax":"typescript","tsx":false,"dynamicImport":true,"importAssertions":true},"target":"es2020","transform":{"legacyDecorator":true,"react":{"throwIfNamespace":false,"useBuiltins":false}},"keepClassNames":true,"experimental":{"keepImportAssertions":true}}}

Caused by:
    unknown field `keepImportAssertions`, expected one of `plugins`, `keepImportAttributes`, `emitAssertForImportAttributes`, `cacheRoot`, `disableBuiltinTransformsForInternalTesting` at line 1 column 395
    at createVariant (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/transpilers/swc.ts:262:13)
    at createSwcOptions (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/transpilers/swc.ts:211:25)
    at create (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/transpilers/swc.ts:56:41)
    at createTranspiler (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/index.ts:784:16)
    at createTranspileOnlyGetOutputFunction (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/index.ts:1341:28)
    at createFromPreloadedConfig (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/index.ts:1404:34)
    at phase4 (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/bin.ts:543:44)
    at bootstrap (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/bin.ts:95:10)
    at main (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/bin.ts:55:10)
    at Object. (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/bin.ts:800:3)

I suspect that SWC will require node >16

  • I version locked zone.js

This is the error that was happening with the zone.js upgrade:

 FAIL  frameworks/angular/src/client/docs/angular-properties.test.ts
  ● Test suite failed to run

    Cannot find module 'zone.js/bundles/zone-testing-bundle.umd' from 'node_modules/jest-preset-angular/setup-jest.js'

    Require stack:
      node_modules/jest-preset-angular/setup-jest.js
      setup-jest.ts

      1 | // eslint-disable-next-line import/no-extraneous-dependencies
    > 2 | import 'jest-preset-angular/setup-jest';
        | ^
      3 |
      4 | import { webcrypto } from 'node:crypto';
      5 |

      at Resolver._throwModNotFoundError (../../node_modules/jest-resolve/build/resolver.js:427:11)
      at Object.<anonymous> (node_modules/jest-preset-angular/setup-jest.js:1:103)
      at Object.<anonymous> (setup-jest.ts:2:1)

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

CI should pass, no manual testing required, I think.

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts
  • Make sure this PR contains one of the labels below

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

@ndelangen ndelangen self-assigned this Sep 12, 2023
@ndelangen ndelangen added maintenance User-facing maintenance tasks ci:normal labels Sep 12, 2023
This is the error that was happening:
```
/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/transpilers/swc.ts:262
      throw new Error(
            ^
Error: @swc/core threw an error when attempting to validate swc compiler options.
You may be using an old version of swc which does not support the options used by ts-node.
Try upgrading to the latest version of swc.
Error message from swc:
Failed to deserialize buffer as swc::config::Options
JSON: {"sourceMaps":true,"module":{"noInterop":false,"type":"commonjs","strictMode":true,"ignoreDynamic":false},"swcrc":false,"jsc":{"parser":{"syntax":"typescript","tsx":false,"dynamicImport":true,"importAssertions":true},"target":"es2020","transform":{"legacyDecorator":true,"react":{"throwIfNamespace":false,"useBuiltins":false}},"keepClassNames":true,"experimental":{"keepImportAssertions":true}}}

Caused by:
    unknown field `keepImportAssertions`, expected one of `plugins`, `keepImportAttributes`, `emitAssertForImportAttributes`, `cacheRoot`, `disableBuiltinTransformsForInternalTesting` at line 1 column 395
    at createVariant (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/transpilers/swc.ts:262:13)
    at createSwcOptions (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/transpilers/swc.ts:211:25)
    at create (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/transpilers/swc.ts:56:41)
    at createTranspiler (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/index.ts:784:16)
    at createTranspileOnlyGetOutputFunction (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/index.ts:1341:28)
    at createFromPreloadedConfig (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/index.ts:1404:34)
    at phase4 (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/bin.ts:543:44)
    at bootstrap (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/bin.ts:95:10)
    at main (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/bin.ts:55:10)
    at Object.<anonymous> (/Users/me/Projects/Storybook/core/scripts/node_modules/ts-node/src/bin.ts:800:3)
```
@socket-security
Copy link

socket-security bot commented Sep 12, 2023

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@babel/plugin-transform-runtime 7.22.9 None +0 38.5 kB nicolo-ribaudo
@swc/core 1.3.70...1.3.82, 1.3.71...1.3.82 None +33/-30 1.18 GB kdy1
magic-string 0.30.0...0.30.1 None +0/-0 421 kB antfu

🚮 Removed packages: @actions/[email protected], @angular-devkit/[email protected], @angular/[email protected], @angular/[email protected], @angular/[email protected], @angular/[email protected], @angular/[email protected], @angular/[email protected], @angular/[email protected], @angular/[email protected], @angular/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @babel/[email protected], @jest/[email protected], @jest/[email protected], @types/[email protected], @types/[email protected], @types/[email protected], @types/[email protected], @types/[email protected], @types/[email protected], @types/[email protected], @types/[email protected], @vitejs/[email protected], @vue/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]

The error I was getting:
```
 FAIL  frameworks/angular/src/client/docs/angular-properties.test.ts
  ● Test suite failed to run

    Cannot find module 'zone.js/bundles/zone-testing-bundle.umd' from 'node_modules/jest-preset-angular/setup-jest.js'

    Require stack:
      node_modules/jest-preset-angular/setup-jest.js
      setup-jest.ts

      1 | // eslint-disable-next-line import/no-extraneous-dependencies
    > 2 | import 'jest-preset-angular/setup-jest';
        | ^
      3 |
      4 | import { webcrypto } from 'node:crypto';
      5 |

      at Resolver._throwModNotFoundError (../../node_modules/jest-resolve/build/resolver.js:427:11)
      at Object.<anonymous> (node_modules/jest-preset-angular/setup-jest.js:1:103)
      at Object.<anonymous> (setup-jest.ts:2:1)
```
The error I was getting:
```
 FAIL  frameworks/angular/src/client/docs/angular-properties.test.ts
  ● Test suite failed to run

    Cannot find module 'zone.js/bundles/zone-testing-bundle.umd' from 'node_modules/jest-preset-angular/setup-jest.js'

    Require stack:
      node_modules/jest-preset-angular/setup-jest.js
      setup-jest.ts

      1 | // eslint-disable-next-line import/no-extraneous-dependencies
    > 2 | import 'jest-preset-angular/setup-jest';
        | ^
      3 |
      4 | import { webcrypto } from 'node:crypto';
      5 |

      at Resolver._throwModNotFoundError (../../node_modules/jest-resolve/build/resolver.js:427:11)
      at Object.<anonymous> (node_modules/jest-preset-angular/setup-jest.js:1:103)
      at Object.<anonymous> (setup-jest.ts:2:1)
```
Copy link
Contributor

@kasperpeulen kasperpeulen left a comment

Choose a reason for hiding this comment

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

LGTM

@ndelangen ndelangen merged commit f86a652 into next Sep 12, 2023
53 checks passed
@ndelangen ndelangen deleted the norbert/regen-lockfile-september branch September 12, 2023 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:normal maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants