Skip to content

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Mar 17, 2021

.npmignore did not use to be copied into the directories of the monopackage,
leading to files that ought to have been excluded to not be excluded.

Remove the file from the list of files that doesn't get copied to fix this.

This fix is not along the lines of the method suggested in the linked issue,
but it does address the original problem.

Fixes #12292.


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

`.npmignore` did not use to be copied into the directories of the monopackage,
leading to files that *ought* to have been excluded to not be excluded.

Remove the file from the list of files that doesn't get copied to fix this.

This fix is not along the lines of the method suggested in the linked issue,
but it does address the original problem.

Fixes #12292.
@rix0rrr rix0rrr requested a review from a team March 17, 2021 14:07
@rix0rrr rix0rrr self-assigned this Mar 17, 2021
@gitpod-io
Copy link

gitpod-io bot commented Mar 17, 2021

@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Mar 17, 2021
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 17, 2021
'.gitignore',
'.jest.config.js',
'.jsii',
'.npmignore',
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting! I didn't know that .npmignore can be placed in subdirectories of a package and be respected by "npm pack"...

Copy link
Contributor

Choose a reason for hiding this comment

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

It does indeed.

https://docs.npmjs.com/cli/v7/using-npm/developers#keeping-files-out-of-your-package

Like git, npm looks for .npmignore and .gitignore files in all subdirectories of your package, not only the root directory.

Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

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

Simple and effective. Love it!

'.gitignore',
'.jest.config.js',
'.jsii',
'.npmignore',
Copy link
Contributor

Choose a reason for hiding this comment

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

It does indeed.

https://docs.npmjs.com/cli/v7/using-npm/developers#keeping-files-out-of-your-package

Like git, npm looks for .npmignore and .gitignore files in all subdirectories of your package, not only the root directory.

@mergify
Copy link
Contributor

mergify bot commented Mar 18, 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).

@mergify
Copy link
Contributor

mergify bot commented Mar 18, 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).

@mergify mergify bot merged commit 95438b5 into master Mar 18, 2021
@mergify mergify bot deleted the huijbers/ubergen-respect-npmignore branch March 18, 2021 09:07
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

eladb pushed a commit that referenced this pull request Mar 24, 2021
`.npmignore` did not use to be copied into the directories of the monopackage,
leading to files that *ought* to have been excluded to not be excluded.

Remove the file from the list of files that doesn't get copied to fix this.

This fix is not along the lines of the method suggested in the linked issue,
but it does address the original problem.

Fixes #12292.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
`.npmignore` did not use to be copied into the directories of the monopackage,
leading to files that *ought* to have been excluded to not be excluded.

Remove the file from the list of files that doesn't get copied to fix this.

This fix is not along the lines of the method suggested in the linked issue,
but it does address the original problem.

Fixes aws#12292.


----

*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

aws-cdk-lib Related to the aws-cdk-lib package contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ubergen: monocdk/aws-cdk-lib include files that are .npmignored in submodules

4 participants