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

Build: Bundle lib/postinstall with ts-up #19327

Merged
merged 5 commits into from
Oct 5, 2022

Conversation

tolkadot
Copy link
Contributor

@tolkadot tolkadot commented Oct 3, 2022

…ts-up
If possible could you add the "hacktoberfest-accepted" label to this pr?
Issue: Reference: #18732

What I did

update to /code/lib/telemetry/package.json in line with instructions #18732

After re-building the telemetry package, I verified that the three index files were present.

After updates to package.json here are the outputs of

yarn build

Filtered results for: Enter something
✔ Select the packages to build › @storybook/postinstall
@storybook/postinstall:
skipping generating types for ./src/index.ts
@storybook/postinstall:
CLI Building entry: /storybook/code/lib/postinstall/src/index.ts
@storybook/postinstall:
CLI Using tsconfig: tsconfig.json
@storybook/postinstall:
CLI tsup v6.2.3
@storybook/postinstall:
CLI Target: chrome100
@storybook/postinstall:
CLI Building entry:/storybook/code/lib/postinstall/src/index.ts
@storybook/postinstall:
CLI Using tsconfig: tsconfig.json
@storybook/postinstall:
CLI tsup v6.2.3
CLI Target: node14
@storybook/postinstall:
CLI Cleaning output folder
@storybook/postinstall:
CLI Cleaning output folder
@storybook/postinstall:
ESM Build start
@storybook/postinstall:
ESM You have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin
@storybook/postinstall:
CJS Build start
@storybook/postinstall:
CJS You have emitDecoratorMetadata enabled but @swc/core was not installed, skipping swc plugin
@storybook/postinstall:
CJS dist/index.js 2.87 KB
@storybook/postinstall:
CJS ⚡️ Build success in 23ms
@storybook/postinstall:
ESM dist/index.mjs 1.86 KB
@storybook/postinstall:
ESM ⚡️ Build success in 31m
yarn check

@storybook/postinstall:
21:25:37 - Starting compilation in watch mode...

@storybook/postinstall:

21:25:38 - Found 0 errors. Watching for file changes.
yarn test

Test Suites: 1 skipped, 169 passed, 169 of 170 total
Tests:       17 skipped, 2084 passed, 2101 total
Snapshots:   468 passed, 468 total
Time:        18.722 s
Ran all test suites.
yarn test postinstall

 PASS  lib/postinstall/src/codemods.test.ts
 PASS  lib/postinstall/src/frameworks.test.ts

Test Suites: 2 passed, 2 total
Tests:       8 passed, 8 total
Snapshots:   4 passed, 4 total
Time:        1.361 s
Ran all test suites matching /postinstall/i.

I then verified that the postinstall is being used correctly in /code/examples/web-components-kitchen-sink

/code/examples/web-components-kitchen-sink   update-lib-postinstall ±  npx sb add docs
 • Verifying that docs is an addon. ✓
 • Preparing to install the docs Storybook addon. ✓


 • Installing the docs Storybook addon➤ YN0000: ┌ Resolution step
➤ YN0000: ⠙ web-components-kitchen-sink
➤ YN0002: │ web-components-kitchen-sink@workspace:. doesn't provide @babel/core (p6ed06), requested by @babel/plugin-proposal-class-properties
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 387ms
➤ YN0000: ┌ Link step
➤ YN0072: │ The application uses portals and that's why --preserve-symlinks Node option is required for launching it
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 0s 657ms
. ✓
 • Running postinstall script for docs. ✓
Processing 1 files... 
Spawning 1 workers...
Sending 1 files to free worker...
All done. 
Results: 
0 errors
0 unmodified
0 skipped
1 ok
Time elapsed: 0.469seconds 

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@tolkadot tolkadot marked this pull request as ready for review October 3, 2022 10:31
@IanVS IanVS added the maintenance User-facing maintenance tasks label Oct 3, 2022
@ndelangen ndelangen changed the title chore(postinstall): update package.json paths for compatibility with … Build: Bundle lib/postinstall with ts-up Oct 3, 2022
@ndelangen ndelangen self-assigned this Oct 3, 2022
@ndelangen ndelangen self-requested a review October 3, 2022 14:12
@ndelangen ndelangen added maintenance User-facing maintenance tasks hacktoberfest-accepted build Internal-facing build tooling & test updates and removed hacktoberfest-accepted maintenance User-facing maintenance tasks labels Oct 4, 2022
@ndelangen ndelangen merged commit 3e610a0 into storybookjs:next Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates hacktoberfest-accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants