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

feat(bundle-source): Add tag command-line flag #2353

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

kriskowal
Copy link
Member

Refs: #400

Description

We’ve discovered that, to create an Endo script bundle that captures our ModuleSource constructor shim, it will need to entrain Babel. With the default build conditions, Babel entrains a debug package, which entrains node:tty. So, it is necessary to add the "browser" condition, which instead entrains a package with a JSON module (#2352). This change threads arbitrary conditions (build tags) through bundle-source to conveniently generate Endo script bundles with different tags like browser or xs.

Security Considerations

None.

Scaling Considerations

None.

Documentation Considerations

The new flags are advertised in the command’s usage display.

Testing Considerations

  • test scaffold and manual testing instructions

Compatibility Considerations

None.

Upgrade Considerations

None.

@erights
Copy link
Contributor

erights commented Jul 17, 2024

With the default build conditions, Babel entrains a debug package, which entrains node:tty.

Are there better behaved non-default build conditions?

@erights
Copy link
Contributor

erights commented Jul 17, 2024

nevermind. I get it now.

@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from 5aae1bb to e213afd Compare July 17, 2024 04:57
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch from 2a27d95 to 8b91e9a Compare July 17, 2024 04:58
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from e213afd to b959d25 Compare July 17, 2024 04:58
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch from 8b91e9a to 81152c9 Compare July 17, 2024 04:58
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from b959d25 to b82a4c4 Compare July 17, 2024 22:36
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch 2 times, most recently from 3b2b329 to deb7498 Compare July 17, 2024 22:38
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch 2 times, most recently from 1485897 to ef30b9b Compare July 17, 2024 23:10
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch 2 times, most recently from 2860316 to 0ac5006 Compare July 17, 2024 23:41
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from ef30b9b to a7c3037 Compare July 17, 2024 23:42
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch from 0ac5006 to bbddde7 Compare July 17, 2024 23:42
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from a7c3037 to 4944670 Compare July 17, 2024 23:42
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch from bbddde7 to db65fb1 Compare July 17, 2024 23:42
@kriskowal kriskowal marked this pull request as ready for review July 17, 2024 23:42
@kriskowal kriskowal requested review from dckc and erights July 17, 2024 23:42
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch from db65fb1 to b9dad87 Compare July 17, 2024 23:49
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from 4944670 to 6e0ece6 Compare July 17, 2024 23:49
Copy link
Contributor

@erights erights left a comment

Choose a reason for hiding this comment

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

Simple! LGTM!

@dckc
Copy link
Contributor

dckc commented Jul 18, 2024

... it will need to entrain Babel.

it = ?

I'm not sure I'm following.

@kriskowal
Copy link
Member Author

an Endo script bundle that captures our ModuleSource constructor shim,

An Endo script bundle that captures our ModuleSource constructor shim (née @endo/static-module-record) such that a test262 “prelude” (shim script) can arrange for the same environment as XS, so we can write test262 tests that expect the same Hardened JavaScript environment.

@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from 6e0ece6 to 7d12a65 Compare July 19, 2024 00:49
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch from b9dad87 to 11f6cc7 Compare July 19, 2024 00:49
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from 7d12a65 to b7c37d4 Compare July 19, 2024 00:52
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch 2 times, most recently from 2417123 to 304abb4 Compare July 19, 2024 01:31
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from b7c37d4 to 1412380 Compare July 19, 2024 01:31
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch from 304abb4 to 4f642be Compare July 19, 2024 02:44
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from 1412380 to 47ca36d Compare July 19, 2024 02:44
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-tags branch from 4f642be to ba1f346 Compare July 19, 2024 03:21
@kriskowal kriskowal force-pushed the kriskowal-bundle-source-endo-script-json branch from 47ca36d to 24fc227 Compare July 19, 2024 03:21
Base automatically changed from kriskowal-bundle-source-endo-script-json to master July 19, 2024 03:32
@kriskowal kriskowal merged commit ff121f8 into master Jul 19, 2024
31 of 32 checks passed
@kriskowal kriskowal deleted the kriskowal-bundle-source-tags branch July 19, 2024 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants