Skip to content

Commit 1e9fc29

Browse files
committed
Support custom resolutions. Closes #125
1 parent 9e130dd commit 1e9fc29

File tree

11 files changed

+854
-0
lines changed

11 files changed

+854
-0
lines changed

integration-tests/custom-resolutions/blahblahblah-definitely-not-a-real-package-name/index.js

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "blahblahblah-definitely-not-a-real-package-name",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"license": "MIT"
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# make sure errors stop the script
2+
set -e
3+
4+
echo "add patch-package"
5+
yarn add $1
6+
7+
echo "make changes to dependency/index.js"
8+
npx replace dependency patch-package node_modules/dependency/index.js
9+
10+
echo "doesn't fail when making a patch"
11+
npx patch-package dependency
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import { runIntegrationTest } from "../runIntegrationTest"
2+
runIntegrationTest("custom-resolutions", false)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// hello i am dependency
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "dependency",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"license": "MIT",
6+
"dependencies": {
7+
"blahblahblah-definitely-not-a-real-package-name": "0.34.2"
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "custom-resolutions",
3+
"version": "1.0.0",
4+
"description": "integration test for patch-package",
5+
"main": "index.js",
6+
"author": "",
7+
"license": "ISC",
8+
"dependencies": {
9+
"dependency": "file:./dependency"
10+
},
11+
"resolutions": {
12+
"blahblahblah-definitely-not-a-real-package-name": "file:./blahblahblah-definitely-not-a-real-package-name"
13+
}
14+
}

0 commit comments

Comments
 (0)