https://github.com/jakebailey/yarn-npmignore-ordering
https://github.com/jakebailey/yarn-npmignore-ordering
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jakebailey/yarn-npmignore-ordering
- Owner: jakebailey
- License: mit
- Created: 2023-10-25T23:59:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-26T00:06:17.000Z (over 2 years ago)
- Last Synced: 2025-11-12T22:31:53.024Z (7 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yarn-npmignore-ordering
This repo contains:
```
.
├── README.md
├── index.d.ts
├── package.json
├── v1
│ ├── index.d.ts
│ └── package.json
└── yarn.lock
```
`.npmignore` is:
```
*
!**/*.d.ts
/v1/
```
Meaning, "ignore everything, unignore dts files at any level, even the root, but ignore the `v1` directory".
However, the package output is unexpected.
```console
$ yarn pack --dry-run
➤ YN0000: README.md
➤ YN0000: package.json
➤ YN0000: v1/index.d.ts
➤ YN0000: Done in 0s 12ms
```
`index.d.ts` is missing, and `v1` is included.
npm:
```console
$ COREPACK_ENABLE_STRICT=0 corepack npm@8 pack --dry-run
npm notice
npm notice 📦 yarn-npmignore-ordering@0.0.0
npm notice === Tarball Contents ===
npm notice 441B README.md
npm notice 30B index.d.ts
npm notice 96B package.json
npm notice === Tarball Details ===
npm notice name: yarn-npmignore-ordering
npm notice version: 0.0.0
npm notice filename: yarn-npmignore-ordering-0.0.0.tgz
npm notice package size: 453 B
npm notice unpacked size: 567 B
npm notice shasum: 6e882b94b041dbbaa4f0654d68d8c11bd56994bb
npm notice integrity: sha512-11HXqdIBvewZP[...]nSRa9EkPBgepg==
npm notice total files: 3
npm notice
```
pnpm:
```console
$ COREPACK_ENABLE_STRICT=0 corepack pnpm@8 pack
$ tar -zxvf *.tgz | sort
package/README.md
package/index.d.ts
package/package.json
```