Skip to content

Commit

Permalink
Exclude NuGet package lock files from NPM packages (#13916)
Browse files Browse the repository at this point in the history
## 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 3, 2024
1 parent 1eb618b commit bcb7c90
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Exclude NuGet package lock files from NPM packages",
"packageName": "@react-native-windows/automation-channel",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "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 bcb7c90

Please sign in to comment.