fix: ship LICENSE, NOTICE and README in the published packages - #1226
fix: ship LICENSE, NOTICE and README in the published packages#1226justFU7 wants to merge 11 commits into
Conversation
🦋 Changeset detectedLatest commit: afdb541 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
|
|
A note on scope, in case it helps triage. This touches three packages because all three are affected, but the fix is independent per package. If a The evidence is reproducible in two commands per package: $ curl -sLO https://registry.npmjs.org/@asyncapi/parser/-/parser-3.6.3.tgz
$ tar tzf parser-3.6.3.tgz | grep -vE "^package/(esm|cjs|browser)/"
package/package.json
A changeset is included, since without one a merge would not cut a release and the published tarballs would stay |



Description
The published packages of this monorepo are missing their legal files, and two of the three are missing
their README as well.
Each manifest asks for them:
but those paths resolve relative to
packages/<pkg>/, andLICENSE,NOTICEand (for two of the threepackages)
README.mdexist only at the repository root, so npm has nothing to match and packs neither.Evidence from the published artifacts
Listing the current tarballs, everything outside
esm/,cjs/andbrowser/:@asyncapi/parserpackage.json@asyncapi/multi-parserpackage.json@asyncapi/openapi-schema-parserpackage.json,README.mdSo no package ships a
LICENSEor aNOTICE, and onlyopenapi-schema-parserships aREADME.Why it matters
Apache-2.0 section 4(a) requires a copy of the licence to accompany each distribution of the work, and 4(d)
requires the
NOTICEattributions to travel with it. The npm tarball is how essentially every consumerreceives these packages, and it currently carries neither. Separately,
@asyncapi/parserand@asyncapi/multi-parserrender with no README on npmjs.com.Changes
scripts/copy-legal.js, copying the rootLICENSEandNOTICEinto the package being published, plusthe root
README.mdonly when the package does not ship one of its own (soopenapi-schema-parser’s README is left alone);prepublishOnly, so the files exist by the time npm packs;NOTICEadded to eachfilesarray next to theLICENSEentry that was already there;No new dependency -
prepublishOnlyalready existed in all three manifests, this only prepends one step.Verifying
LICENSE,NOTICEandREADME.mdnow appear in the pack listing.