question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feat]: use npm run release:standalone

See original GitHub issue

What is your suggestion?

Use npm for release:standalone in CI.

Why do you want this feature?

It will respect our shrinkwrap file. See logs here:

warning npm-shrinkwrap.json found. This will not be updated or respected. See https://yarnpkg.com/en/docs/migrating-from-npm for more information.

Are there any workarounds to get this functionality today?

No

Are you interested in submitting a PR for this?

I can if no one else wants to.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
code-ashercommented, Sep 7, 2022

VS Code embeds yarn in a bunch of places so that might throw a wrench in some things, for example their postinstall and build scripts. There is also a check in their preinstall script that forbids the use of npm. This could all be patched of course but I am not sure we should.

Agreed on removing the yarn.lock rsync!

The npm-shrinkwrap.json found warning was confusing because it made it seem like we were using yarn to install the dependencies in the standalone release even though we run npm install so the thinking was that maybe yarn run provides an npm shim that actually runs yarn or something tricky like that.

I tested a bit and npm_config_user_agent shows yarn/1.22.19 npm/? node/v16.16.0 linux x64 (in the postinstall script) even though we install with npm install so we end up using yarn.

So maybe npm avoids overwriting that or maybe yarn does do some kind of trickery here. Using npm run is one fix but maybe there is a better one.

1reaction
edvincentcommented, Sep 6, 2022

That’s the one where I was suggesting to use npm ci right? Happy to have a look yup, was already in my to-do from https://github.com/coder/code-server/pull/5071#discussion_r950597128

As a side-comment, that error

warning npm-shrinkwrap.json found. This will not be updated or respected. See https://yarnpkg.com/en/docs/migrating-from-npm for more information.

is just cosmetic. In release:standalone in the CI, we have both a yarn.lock and an npm-shrinkwrap.json, so both yarn and npm could be used.

But yes, way better to start using npm ci to keep it consistent with what other users would use.

Can I sign-up to do this during the next week or so, or is this more urgent?

Read more comments on GitHub >

github_iconTop Results From Across the Web

scripts
Scripts from dependencies can be run with npm explore <pkg> -- npm run <stage> . ... system or architecture of the target system,...
Read more >
conventional-changelog/standard-version
A utility for versioning using semver and CHANGELOG generation powered by Conventional Commits ... Now you can use npm run release in place...
Read more >
Deno 1.28: Featuring 1.3 Million New Modules
Using npm with Deno is simpler: No npm install step: modules are installed the first time you run your program. No package.json :...
Read more >
npm run build - YouTube
Ben Monrohttp://nodevember.org/talk/Ben%20MonroThis talk will cover the ins and outs of building a javascript project using nothing but npm ...
Read more >
Generating changelog automatically with Standard Version
A common use-case for tags is versioning. When we run npm run release, Standard Version creates a new tag for us.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found