Skip to content

Commit 241df12

Browse files
authored
Update NOTICE and ensure it's inside packages (#4348)
1 parent 2fb5d4c commit 241df12

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

Herebyfile.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,7 @@ async function runBuildNativePreviewPackages() {
15551555
const inputPackageJson = JSON.parse(fs.readFileSync(path.join(inputDir, "package.json"), "utf8"));
15561556
inputPackageJson.version = getVersion();
15571557
delete inputPackageJson.private;
1558+
inputPackageJson.files = [...new Set([...(inputPackageJson.files ?? []), "NOTICE.txt"])];
15581559
stripSourceConditions(inputPackageJson);
15591560

15601561
const { stdout: gitHead } = await $pipe`git rev-parse HEAD`;
@@ -1575,7 +1576,7 @@ async function runBuildNativePreviewPackages() {
15751576

15761577
await fs.promises.writeFile(path.join(mainPackageDir, "package.json"), JSON.stringify(mainPackage, undefined, 4));
15771578
await fs.promises.copyFile("LICENSE", path.join(mainPackageDir, "LICENSE"));
1578-
// No NOTICE.txt here; does not ship the binary or libs. If this changes, we should add it.
1579+
await fs.promises.copyFile("NOTICE.txt", path.join(mainPackageDir, "NOTICE.txt"));
15791580

15801581
// Build JS API and copy dist into the package.
15811582
await $`npm run -w @typescript/native-preview build`;
@@ -1611,6 +1612,7 @@ async function runBuildNativePreviewPackages() {
16111612
const packageJson = {
16121613
...inputPackageJson,
16131614
bin: undefined,
1615+
files: ["lib", "NOTICE.txt"],
16141616
imports: undefined,
16151617
dependencies: undefined,
16161618
name: npmPackageName,

NOTICE.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,3 +400,37 @@ limitations under the License.
400400

401401
---------------------------------------------------------
402402

403+
---------------------------------------------------------
404+
405+
parcel-bundler/watcher 8926bb8b281733bbfcaf69bb4e62ab7a1431c42a - MIT
406+
407+
408+
Copyright Node.js contributors
409+
Copyright 2012-2020 Facebook, Inc.
410+
Copyright (c) 2017-present Devon Govett
411+
412+
MIT License
413+
414+
Copyright (c) 2017-present Devon Govett
415+
416+
Permission is hereby granted, free of charge, to any person obtaining a copy
417+
of this software and associated documentation files (the "Software"), to deal
418+
in the Software without restriction, including without limitation the rights
419+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
420+
copies of the Software, and to permit persons to whom the Software is
421+
furnished to do so, subject to the following conditions:
422+
423+
The above copyright notice and this permission notice shall be included in all
424+
copies or substantial portions of the Software.
425+
426+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
427+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
428+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
429+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
430+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
431+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
432+
SOFTWARE.
433+
434+
435+
---------------------------------------------------------
436+

0 commit comments

Comments
 (0)