-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
yarn pack
includes unexpected files with a negative expression in files
of package.json
#8332
Comments
It seems yarn is matching all files against all matchers, but only files that match on positive matchers should be compared against negative matchers and then omitted. |
Siegrift
added a commit
to api3dao/airnode
that referenced
this issue
Jun 8, 2022
Previously we used "yarn pack" which does not work properly when there is a negative matcher in "files" inside a package.json. See: yarnpkg/yarn#8332 for details.
Siegrift
added a commit
to api3dao/airnode
that referenced
this issue
Jun 8, 2022
Previously we used "yarn pack" which does not work properly when there is a negative matcher in "files" inside a package.json. See: yarnpkg/yarn#8332 for details.
Siegrift
added a commit
to api3dao/airnode
that referenced
this issue
Jun 8, 2022
Previously we used "yarn pack" which does not work properly when there is a negative matcher in "files" inside a package.json. See: yarnpkg/yarn#8332 for details.
Siegrift
added a commit
to api3dao/airnode
that referenced
this issue
Jun 8, 2022
…r airnode-examples (#1158) * Improve TS project references structure * Remove unused examples test * Move airnode examples scripts to "src" folder * Fix published artifacts for airnode-examples package You can verify what gets published by running "npm publish --dry-run" * Add changeset * Make compile scripts consistent * Add tests in "src" directory to tsconfig for tests * Use npm to pack packages Previously we used "yarn pack" which does not work properly when there is a negative matcher in "files" inside a package.json. See: yarnpkg/yarn#8332 for details. * Revert using "npm pack" instead of "yarn pack" Tried using "npm pack" because yarn doesn't handle negative patterns inside "files" in package.json correctly. This broke docker artifacts and in general is not worth fixing. This commit reverts the change and does not use the exclude pattern in "files".
brunnre8
added a commit
to thelounge/thelounge
that referenced
this issue
Mar 12, 2023
Rather than playing whack a mole with an exclude list, let's use an include list instead. Yarn can't cope with negative file specs in the "files" array yarnpkg/yarn#8332 and can't be used
brunnre8
added a commit
to thelounge/thelounge
that referenced
this issue
Mar 12, 2023
Rather than playing whack a mole with an exclude list, let's use an include list instead. Yarn can't cope with negative file specs in the "files" array yarnpkg/yarn#8332 and can't be used
brunnre8
added a commit
to thelounge/thelounge
that referenced
this issue
Mar 12, 2023
Rather than playing whack a mole with an exclude list, let's use an include list instead. Yarn can't cope with negative file specs in the "files" array yarnpkg/yarn#8332 and can't be used
is there a way to have the |
This is completely broken, caught me when moving from npm to yarn. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug description
Command
What is the current behavior?
When
files
of package.json includes a negative expression,yarn pack
includes unexpected files (I guess the whole directory).What is the expected behavior?
It should include only what it's supposed to include. The output is different from
npm pack
.Steps to Reproduce
git clone [email protected]:eunjae-lee/yarn-pack-issue.git
touch .env && yarn pack
this-file-should-not-be-packed.js
and.env
are included in the tgz file.What is worse is that
.env
is in.gitignore
. (It's the same even if it's also included in.npmignore
.)"!**/__tests__/**"
,yarn pack
this-file-should-not-be-packed.js
or.env
.Environment
12.18.0
1.16.0
and1.22.5
Related Issues
yarn pack
adds unexpected files #7391The text was updated successfully, but these errors were encountered: