Skip to content

Commit

Permalink
[0.76] Exclude NuGet package lock files from NPM packages (#13916) (#…
Browse files Browse the repository at this point in the history
…13923)

* [0.76] Exclude NuGet package lock files from NPM packages (#13916)

## Description

Removes the `packages.lock.json` and `packages.fabric.lock.json` files from our published NPM packages, as customers who choose to build M.RN themselves don't necessarily choose the same dependencies as us (such as SourceLink).

### Type of Change
- Bug fix (non-breaking change which fixes an issue)

### Why
See above.

Resolves #13914

### What
Added filters to the NPM `package.json` files to exclude these lock files.

## Screenshots
N/A

## Testing
Verified with `npm pack` that new packages do not contain these files.

## Changelog
Should this change be included in the release notes: _no_
  • Loading branch information
jonthysell authored Oct 4, 2024
1 parent d8894ea commit 25a9ed1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "[0.76] Exclude NuGet package lock files from NPM packages",
"packageName": "react-native-windows",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
},
"files": [
"lib-commonjs",
"windows"
"windows",
"!packages.lock.json",
"!packages.fabric.lock.json"
],
"engines": {
"node": ">= 18"
Expand Down
4 changes: 3 additions & 1 deletion vnext/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@
"/metro-react-native-platform.js",
"/metro.config.js",
"/react-native.config.js",
"/rn-get-polyfills.js"
"/rn-get-polyfills.js",
"!packages.lock.json",
"!packages.fabric.lock.json"
],
"promoteRelease": true,
"engines": {
Expand Down

0 comments on commit 25a9ed1

Please sign in to comment.