-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document package-lock.json usage #287
Comments
scalajs-bundler was designed just before the introduction of the
|
I'm not sure but I may have found a simple work around: Place webpackResources := resourceDirectory.in(Compile).value ** "*" filter { _.isFile } I'm not sure how to test if this is working, but I've tried changing: to: and I'm getting affirming message:
|
Thanks for sharing your experiments :) Using the webpackResources += (Compile / baseDirectory).value / "package-lock.json" The concept of “resource” does not really make sense in Scala.js, but the So, one way to fix this issue would be to extend the default value of |
I think the only remaining "nice to have" implementation detail would be the one you mentioned in your earlier comment - for changes to package.json that override package-lock.json to be applied to your version controlled copy of I say "nice to have" because if you personally update |
Right, I forgot that part. So, we probably have to implement some logic for the specific case of managing the package-lock.json file. |
The issue is a bit old but here is a PR to save |
@vhiairrassary I am now learning that |
@vhiairrassary I just had a weird outcome where package-lock is getting generated that contained old dependencies after I removed them all from my build.sbt. UPDATE I realize now what is going on: It seems your change produces a package lock file in the root directory of the project so it was getting scooped up without me realizing it (I keep package lock in my resources folder). Is there anyway to change the directory in which it places it?
|
How can the generated package-lock.json be version controlled outside of the
target
directory and integrated as part of the fastOpt/fullOpt build?I think the easy part is copying the resulting
package-lock.json
to a resources directory, but then how would I tell scalajs-bundler to use that managed copy of it for all future builds (especially in a build environment where a pre-existingtarget
directory is never cached)?In case more context is needed, this npm feature allows you to confidently release software knowing it is exactly the same by preventing any dependencies (or dependencies of your dependencies) from being updated. I've already released 2 bugs that were completely out of my control because seconds before my release a third party released a "patch" update that had breaking changes accidentally. Having the
package-lock.json
under sbt control, or even just some brief documentation on how to control it from sbt would therefore be highly appreciated.The text was updated successfully, but these errors were encountered: