Skip to content

Commit

Permalink
[fei5815.1.excludebuildinfo] Add .npmignore file (#1022)
Browse files Browse the repository at this point in the history
## Summary:
This adds an `.npmignore` file to the project to exclude unnecessary files from the published package. Any `files` declaration in a `package.json` will override this, so that's something to watch out for, but this is sufficient for now.

Issue: FEI-5815

## Test plan:
1. `yarn`
2. `yarn build`
3. `yarn build:types`
4. `rm .npmignore`
5. `cd packages/wonder-stuff-server`
6. `npm pack --dry-run`
7. Observe that the `tsconfig-build.json` and `tsconfig-build.tsbuildinfo` are included
8. `cd ../..`
9. `git checkout .npmignore`
10. `cd packages/wonder-stuff-server`
11. `npm pack --dry-run`
12. Observe that the `tsconfig-build.json` and `tsconfig-build.tsbuildinfo` are not included

Author: somewhatabstract

Reviewers: jeresig

Required Reviewers:

Approved By: jeresig

Checks: ✅ codecov/project, ✅ Test (macos-latest, 20.x), ✅ Lint, typecheck, and coverage check (ubuntu-latest, 20.x), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ gerald, ⏭️  dependabot

Pull Request URL: #1022
  • Loading branch information
somewhatabstract authored Aug 29, 2024
1 parent 509c2a5 commit 4fb7745
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .changeset/six-chefs-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@khanacademy/wonder-stuff-ci": patch
"@khanacademy/wonder-stuff-core": patch
"@khanacademy/wonder-stuff-i18n": patch
"@khanacademy/wonder-stuff-render-environment-jsdom": patch
"@khanacademy/wonder-stuff-render-server": patch
"@khanacademy/wonder-stuff-sentry": patch
"@khanacademy/wonder-stuff-server": patch
"@khanacademy/wonder-stuff-testing": patch
---

Don't include TypeScript config and buildinfo in packages
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.tsbuildinfo
tsconfig-build.json

0 comments on commit 4fb7745

Please sign in to comment.