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

Core: Do not prebundle jsdoc-type-pratt-parser #29134

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Sep 16, 2024

Closes #29130

What I did

Do not prebundle jsdoc-type-pratt-parser since escape characters of RegExp patterns seem to be double escaped in Storybook's precompiled output of the core package.

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

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

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:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This pull request has been released as version 0.0.0-pr-29134-sha-a3d75f58. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-29134-sha-a3d75f58
Triggered by @valentinpalkovic
Repository storybookjs/storybook
Branch valentin/do-not-prebundle-jsdoc-type-pratt-parser
Commit a3d75f58
Datetime Mon Sep 16 10:26:52 UTC 2024 (1726482412)
Workflow run 10881969144

To request a new release of this pull request, mention the @storybookjs/core team.

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

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.3 MB 77.3 MB 414 B 0.63 0%
initSize 162 MB 162 MB 130 kB 1.07 0.1%
diffSize 85 MB 85.1 MB 130 kB 1.62 0.2%
buildSize 7.58 MB 7.57 MB -8.21 kB 1.54 -0.1%
buildSbAddonsSize 1.67 MB 1.66 MB -4.18 kB 1.79 -0.3%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 2.34 MB 2.34 MB 0 B 0.23 0%
buildSbPreviewSize 352 kB 352 kB 0 B 1.22 0%
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 4.55 MB 4.55 MB -4.18 kB 1.71 -0.1%
buildPreviewSize 3.02 MB 3.02 MB -4.03 kB 0.59 -0.1%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 6.6s 19.9s 13.3s 1.04 66.8%
generateTime 18.9s 21.4s 2.5s 0.36 11.7%
initTime 16.4s 17s 642ms -0.13 3.8%
buildTime 10.7s 11.5s 791ms -0.23 6.8%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 7.9s 6.8s -1s -92ms -0.07 -15.8%
devManagerResponsive 5s 4.5s -577ms 0.09 -12.8%
devManagerHeaderVisible 815ms 987ms 172ms 1.14 17.4%
devManagerIndexVisible 849ms 1s 164ms 1.02 16.2%
devStoryVisibleUncached 1.8s 1.4s -362ms 0.19 -25.1%
devStoryVisible 848ms 1s 174ms 1.08 17%
devAutodocsVisible 887ms 732ms -155ms 0.18 -21.2%
devMDXVisible 813ms 673ms -140ms -0.37 -20.8%
buildManagerHeaderVisible 823ms 712ms -111ms -0.39 -15.6%
buildManagerIndexVisible 858ms 719ms -139ms -0.5 -19.3%
buildStoryVisible 859ms 781ms -78ms -0.22 -10%
buildAutodocsVisible 704ms 643ms -61ms -0.63 -9.5%
buildMDXVisible 722ms 753ms 31ms 1.06 4.1%

Greptile Summary

This change moves 'jsdoc-type-pratt-parser' from devDependencies to dependencies in the core package.json file to address Unicode character class escape issues in React Native environments.

  • Moved 'jsdoc-type-pratt-parser' to dependencies in code/core/package.json
  • Ensures availability of 'jsdoc-type-pratt-parser' at runtime, not just during development
  • Addresses Unicode character class escape errors in React Native environments
  • Resolves issue [Bug]: storybook 8 react native error on regex from jsdoc-type-pratt-parser #29130 related to regex patterns in jsdoc-type-pratt-parser
  • Prevents double escaping of RegExp patterns in Storybook's precompiled output

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@valentinpalkovic valentinpalkovic added react-native core patch:yes Bugfix & documentation PR that need to be picked to main branch ci:normal labels Sep 16, 2024
Copy link

nx-cloud bot commented Sep 16, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit a3d75f5. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@shilman shilman merged commit 629e70d into next Sep 16, 2024
69 of 75 checks passed
@shilman shilman deleted the valentin/do-not-prebundle-jsdoc-type-pratt-parser branch September 16, 2024 15:49
storybook-bot pushed a commit that referenced this pull request Sep 16, 2024
…jsdoc-type-pratt-parser

Core: Do not prebundle jsdoc-type-pratt-parser
(cherry picked from commit 629e70d)
storybook-bot pushed a commit that referenced this pull request Sep 16, 2024
…jsdoc-type-pratt-parser

Core: Do not prebundle jsdoc-type-pratt-parser
(cherry picked from commit 629e70d)
storybook-bot pushed a commit that referenced this pull request Sep 16, 2024
…jsdoc-type-pratt-parser

Core: Do not prebundle jsdoc-type-pratt-parser
(cherry picked from commit 629e70d)
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ci:normal core patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch react-native
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: storybook 8 react native error on regex from jsdoc-type-pratt-parser
2 participants