Skip to content

fix: add symlink to npmignore #3954

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

Merged
merged 1 commit into from
Aug 11, 2021
Merged

fix: add symlink to npmignore #3954

merged 1 commit into from
Aug 11, 2021

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Aug 11, 2021

This PR modifies the publish-npm.sh to add an .npmignore with a line to exclude the symlink node_modules.asar in the npm release.

Why are we doing this?

As you may have see in the 3.11.1 discussion, we had a hiccup publishing the latest version to npm/Homebrew. This is because npm recently made a change to their package requirements, disallowing symlinks in packages.

Fortunately, we don't need the symlink in the npm package release of code-server.

We originally thought we could remove the symlink all together, but after chatting with @code-asher, we realized we still need it for the standalone releases.

Fixing it

We had two options to fix it:

  1. copy .gitignore to the npm package before bundling up
  2. add .npmignore to the npm package and include the symlink

We opted to go with Option 2 because:

  • it's a single line in the publish-npm.sh
  • it's a solution that's isolating to the problem (i.e. copying the .gitignore could have unintended consequences)

Test plan

  1. make changes
  2. build a release, e.g. what we publish on npm
  3. try publishing under individual scope (@jsjoeio/code-server)
  4. test locally to ensure code-servers works, including ripgrep (used in file search)
Screen.Recording.2021-08-11.at.10.59.36.AM.mov

Fixes N/A

Related:

@codecov
Copy link

codecov bot commented Aug 11, 2021

Codecov Report

Merging #3954 (8826cc1) into main (cee0e85) will not change coverage.
The diff coverage is n/a.

❗ Current head 8826cc1 differs from pull request most recent head bffb009. Consider uploading reports for the commit bffb009 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3954   +/-   ##
=======================================
  Coverage   63.51%   63.51%           
=======================================
  Files          36       36           
  Lines        1872     1872           
  Branches      379      379           
=======================================
  Hits         1189     1189           
  Misses        580      580           
  Partials      103      103           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cee0e85...bffb009. Read the comment docs.

@jsjoeio jsjoeio self-assigned this Aug 11, 2021
@jsjoeio jsjoeio added the chore Related to maintenance or clean up label Aug 11, 2021
@jsjoeio jsjoeio added this to the 3.11.2 milestone Aug 11, 2021
@jsjoeio jsjoeio force-pushed the jsjoeio-add-npmignore branch from a0106eb to 03949c8 Compare August 11, 2021 18:02
@jsjoeio jsjoeio marked this pull request as ready for review August 11, 2021 18:03
@jsjoeio jsjoeio requested a review from a team as a code owner August 11, 2021 18:03
@jsjoeio jsjoeio marked this pull request as draft August 11, 2021 20:37
@jsjoeio jsjoeio force-pushed the jsjoeio-add-npmignore branch from 8826cc1 to bffb009 Compare August 11, 2021 20:49
@jsjoeio jsjoeio marked this pull request as ready for review August 11, 2021 20:50
@github-actions
Copy link

github-actions bot commented Aug 11, 2021

✨ Coder.com for PR #3954 deployed! It will be updated on every commit.

@jsjoeio jsjoeio enabled auto-merge August 11, 2021 21:01
@jsjoeio jsjoeio merged commit 30dc47d into main Aug 11, 2021
@jsjoeio jsjoeio deleted the jsjoeio-add-npmignore branch August 11, 2021 21:08
@jsjoeio jsjoeio modified the milestones: 3.11.2, 3.12.0 Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Related to maintenance or clean up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants