Skip to content

Maintenance: Regen lockfiles#24152

Merged
ndelangen merged 11 commits into
nextfrom
norbert/regen-lockfile-september
Sep 12, 2023
Merged

Maintenance: Regen lockfiles#24152
ndelangen merged 11 commits into
nextfrom
norbert/regen-lockfile-september

Conversation

@ndelangen
Copy link
Copy Markdown
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
Copy Markdown

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/core@1.10.0, @angular-devkit/build-angular@16.1.5, @angular/animations@16.1.6, @angular/cli@16.1.5, @angular/common@16.1.6, @angular/compiler@16.1.6, @angular/compiler-cli@16.1.6, @angular/core@16.1.6, @angular/forms@16.1.6, @angular/platform-browser@16.1.6, @angular/platform-browser-dynamic@16.1.6, @babel/core@7.22.9, @babel/parser@7.22.7, @babel/plugin-proposal-decorators@7.22.7, @babel/plugin-transform-react-jsx@7.22.5, @babel/preset-env@7.22.5, @babel/preset-flow@7.22.5, @babel/preset-typescript@7.22.5, @babel/traverse@7.22.8, @babel/types@7.22.5, @jest/globals@29.6.1, @jest/transform@29.6.1, @types/color-convert@2.0.0, @types/compression@1.7.2, @types/cross-spawn@6.0.2, @types/lodash@4.14.195, @types/qs@6.9.7, @types/react@16.14.43, @types/semver@7.5.0, @types/uuid@9.0.2, @vitejs/plugin-vue@4.2.3, @vue/vue3-jest@29.2.4, axe-core@4.7.2, eslint@8.45.0, formik@2.4.2, jest@29.6.1, jest-environment-jsdom@29.6.1, next@13.4.12, node-fetch@2.6.12, preact@10.16.0, react-textarea-autosize@8.5.2, svelte-check@3.4.6, url@0.11.1, verdaccio@5.26.0, vite-plugin-turbosnap@1.0.2, vue-docgen-api@4.73.1, vue-loader@15.10.1

@ndelangen ndelangen requested a review from yannbf as a code owner September 12, 2023 09:56
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
Copy Markdown
Member

@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

Comment thread code/addons/a11y/src/components/Report/HighlightToggle.tsx
Comment thread scripts/release/__tests__/label-patches.test.ts Outdated
@ndelangen ndelangen merged commit f86a652 into next Sep 12, 2023
@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