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

chore: re-allow monocdk deep imports #17791

Merged
merged 7 commits into from
Dec 1, 2021
Merged

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Dec 1, 2021

#17707 added an exports section to the package.json files of aws-cdk-lib and monocdk in order to prevent users from accidentally "deep importing" modules.

This broke a large number of monocdk users. Since these teams are going to migrate to v2 (aws-cdk-lib) soon anyway, we decided to revert this change for monocdk so they are unblocked in the meantime.

To do this, we introduced two new configuration options for ubergen: libRoot, which can be used to control where submodules are going to be collected (defaults to the root of the uber package) and explicitExports which controls whether the exports section is added or not (defaults to true).


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

#17707 added an `exports` section to the `package.json` files of `aws-cdk-lib` and `monocdk` in order to prevent users from accidentally "deep importing" modules.

This broke a large number of `monocdk` users. Since these teams are going to migrate to v2 (`aws-cdk-lib`) soon anyway, we decided to revert this change for `monocdk` so they are unblocked in the meantime.

To do this, we introduced two new configuration options for `ubergen`: `libRoot`, which can be used to control where submodules are going to be collected (defaults to the root of the uber package) and `explicitExports` which controls whether the `exports` section is added or not (defaults to true).
@gitpod-io
Copy link

gitpod-io bot commented Dec 1, 2021

@eladb eladb requested a review from rix0rrr December 1, 2021 10:12
@eladb eladb marked this pull request as draft December 1, 2021 10:12
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 1, 2021
tools/@aws-cdk/ubergen/bin/ubergen.ts Outdated Show resolved Hide resolved
@eladb eladb marked this pull request as ready for review December 1, 2021 10:50
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 2c5d04e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit a75d5fd into master Dec 1, 2021
@mergify mergify bot deleted the benisrae/monocdk-revert-exports branch December 1, 2021 14:09
@mergify
Copy link
Contributor

mergify bot commented Dec 1, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
aws#17707 added an `exports` section to the `package.json` files of `aws-cdk-lib` and `monocdk` in order to prevent users from accidentally "deep importing" modules.

This broke a large number of `monocdk` users. Since these teams are going to migrate to v2 (`aws-cdk-lib`) soon anyway, we decided to revert this change for `monocdk` so they are unblocked in the meantime.

To do this, we introduced two new configuration options for `ubergen`: `libRoot`, which can be used to control where submodules are going to be collected (defaults to the root of the uber package) and `explicitExports` which controls whether the `exports` section is added or not (defaults to true).


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants