Skip to content

Commit bcb7c90

Browse files
authored
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_
1 parent 1eb618b commit bcb7c90

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Exclude NuGet package lock files from NPM packages",
4+
"packageName": "@react-native-windows/automation-channel",
5+
"email": "jthysell@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Exclude NuGet package lock files from NPM packages",
4+
"packageName": "react-native-windows",
5+
"email": "jthysell@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

packages/@react-native-windows/automation-channel/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
},
3838
"files": [
3939
"lib-commonjs",
40-
"windows"
40+
"windows",
41+
"!packages.lock.json",
42+
"!packages.fabric.lock.json"
4143
],
4244
"engines": {
4345
"node": ">= 18"

vnext/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@
144144
"/metro-react-native-platform.js",
145145
"/metro.config.js",
146146
"/react-native.config.js",
147-
"/rn-get-polyfills.js"
147+
"/rn-get-polyfills.js",
148+
"!packages.lock.json",
149+
"!packages.fabric.lock.json"
148150
],
149151
"promoteRelease": true,
150152
"engines": {

0 commit comments

Comments
 (0)