Comments (9)
Ah I see. Sorry I was a bit distracted when I read your previous reply.
Yes, to support shrinkwrap we'd need to check whether the json file exists and then copy it to the temporary directory that is used for generating the 'clean' node modules. That happens in makePatch.ts
. I have some free time tonight to take a look at it.
from patch-package.
patch-package doesn't support shrinkwrap at the moment. It shouldn't be difficult to add support, although it's not a priority for me. Happy to accept PRs though!
from patch-package.
I'm also happy to provide guidance for anyone wanting to give this a go. Probably the first places to look are makePatch.ts
and detectPackageManager.ts
. It might be best to treat npm shrinkwrap as a third package manager.
from patch-package.
Why does patch-package need to access the package-lock.json/npm-shrinkwrap.json at all? I kind of assumed it was only creating and applying diffs - not sure where the lock-file comes in?
from patch-package.
patch-package uses the lock files to build a 'clean' version of your node_modules folder when creating patches. I decided to err on the side of reproducible builds for safety.
from patch-package.
Is that not just a case then of checking for the existence of a package-lock.json
and then doing an npm install
? In which case, could you not just check for the existence of a package-lock.json
or an npm-shrinkwrap.json
and then do an npm install
given that if they're present, they'll be used automatically by npm
? Am I missing some subtlety?
from patch-package.
from patch-package.
from patch-package.
Just about to publish a fix for this. Feel free to reopen if you still have issues.
from patch-package.
Related Issues (20)
- Log the right patchDir when error happens HOT 1
- Support for Bun HOT 5
- Error: There don't appear to be any changes HOT 3
- pnpm patch engines doesn't work HOT 1
- Feature: Consider replacing json-stable-stringify to fulfill compliance for commercial products
- This error occurs when I execute the command HOT 1
- Add support for yarn v2+ HOT 6
- Patching Git modules without version HOT 3
- Warn when patch exists for old version of package HOT 5
- [Proposal] Reduce `patch-package` installation size HOT 2
- [Discussion] Global patches HOT 1
- New patch parse failed
- Add new dependency to a package
- Does patch-package support node12? HOT 1
- Failed to apply patch for package react-native-agora HOT 1
- Is there a way to convert pnpm patches to patch-package patches? Or do they use the same format? HOT 2
- -
- Uniterpretable Error during makePatch HOT 5
- react-native-otp-verify+1.1.6.patch
- Confusing syntax error message when pointing to a package that does not exist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from patch-package.