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

refactor(bundle-source): Node.js conditions #2373

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Conversation

kriskowal
Copy link
Member

Description

The upcoming release was planned to introduce a -t,--tags flag to the bundle-source command. I’ve found that the analogous flag in the Node.js CLI is -C,--condition and elected to take this opportunity to make these consistent, before releasing the new feature.

Security Considerations

None.

Scaling Considerations

None.

Documentation Considerations

Usage docs update. Not yet documented in README.

Testing Considerations

Covered with a CLI test.

Compatibility Considerations

This feature is not yet released, so the change to bundle-source has no compatibility concerns.

The change to @endo/compartment-mapper deprecates the tags option to all functions and aliases conditions for backward-compatibility.

Upgrade Considerations

None.

@kriskowal kriskowal requested review from dckc and erights July 23, 2024 19:43
@dckc
Copy link
Contributor

dckc commented Jul 23, 2024

help me find the ci log of the test running, plz?

Copy link
Contributor

@dckc dckc left a comment

Choose a reason for hiding this comment

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

approved presuming ci is happy soonish

@kriskowal
Copy link
Member Author

Looks like I’ve got some ironing to do.

@kriskowal kriskowal marked this pull request as draft July 23, 2024 19:56
@kriskowal kriskowal marked this pull request as ready for review July 23, 2024 20:37
@kriskowal kriskowal enabled auto-merge July 23, 2024 20:38
@kriskowal kriskowal merged commit 655a74c into master Jul 23, 2024
17 checks passed
@kriskowal kriskowal deleted the kriskowal-conditions branch July 23, 2024 20:46
kriskowal added a commit that referenced this pull request Jul 25, 2024
## Description

From `bundle-source`, a bundle cannot currently take on a dependency on
any of the packages entrained by `devDependencies` in the `package.json`
of the entry package. This change (indirectly) enables a bundle to
capture dev dependencies by providing the flag `--condition development`
from the [`-C` flag introduced in
#2373](#2373)

### Security Considerations

None.

### Scaling Considerations

None.

### Documentation Considerations

- NEWS
- README
- USAGE

### Testing Considerations

Existing tests adjusted to exercise the new condition instead of the
explicit `dev` flag.

### Compatibility Considerations

Backward-compatibility verified by running tests before and after
switching from the explicit `dev` flag to a `development` condition in
the compartment mapper.

No integration test provided, but can be manually verified by bundling a
package that relies on a devDependency and providing `-C development`.

### Upgrade Considerations

None.
kriskowal added a commit that referenced this pull request Jul 30, 2024
#2389)

Refs: #2388 

## Description

See #2388, we cannot at this time change the schema of
`compartment-map.json` as I attempted in
#2373

### Security Considerations

None.

### Scaling Considerations

None.

### Documentation Considerations

None.

### Testing Considerations

None.

### Compatibility Considerations

Restores backward compatibility for production systems.

The file `app.agar` is a zip file generated by a previous version of the
compartment mapper, used as a test fixture to verify that future
versions can import ancient versions. To get tests passing in #2373, I
regenerated `app.agar` and in this change, I revert it to the original
schema. Having to regenerate `app.agar` is supposed to be a hint that
something is broken, and I waltzed through the warnings.

### Upgrade Considerations

None.
kriskowal added a commit that referenced this pull request Jul 30, 2024
#2389)

Refs: #2388

See #2388, we cannot at this time change the schema of
`compartment-map.json` as I attempted in
#2373

None.

None.

None.

None.

Restores backward compatibility for production systems.

The file `app.agar` is a zip file generated by a previous version of the
compartment mapper, used as a test fixture to verify that future
versions can import ancient versions. To get tests passing in #2373, I
regenerated `app.agar` and in this change, I revert it to the original
schema. Having to regenerate `app.agar` is supposed to be a hint that
something is broken, and I waltzed through the warnings.

None.
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.

2 participants