Skip to content
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

Node.js stack refactoring #4255

Merged
merged 17 commits into from
May 8, 2021
Merged

Node.js stack refactoring #4255

merged 17 commits into from
May 8, 2021

Conversation

glitsj16
Copy link
Collaborator

@glitsj16 glitsj16 commented May 7, 2021

An attempt to bring some sanity to our node.js related profiles. Based on info gathered from:

Not being a Node developer I'm marking this as WIP for now. I've been testing this, but the node stack still has many dark spots for me to unravel. Would be great if this could be more thoroughly tested. Open to all suggestions, input etcetera.

IMPORTANT NOTE: none of the Node.js stack profiles are in firecfg. It is up to the user to create the necessary scripts/symlinks to sandbox the following commands:

  • /usr/bin/node
  • /usr/bin/npm
  • /usr/bin/nvm
  • /usr/bin/yarn

etc/profile-m-z/nodejs-common.profile Outdated Show resolved Hide resolved
Comment on lines +16 to +19
ignore read-only ${HOME}/.npm-packages
ignore read-only ${HOME}/.npmrc
ignore read-only ${HOME}/.nvm
ignore read-only ${HOME}/.yarnrc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe prefer read-write? IDK

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe prefer read-write? IDK

I agree that read-write sounds a lot more logical than the ignore blah construct. Just checked and I used it in git-cola, gnome-{logs,system-log} and yelp too apparently. Can't remember why OTOH but I'll change it after testing it gives the same result. That'll be over the weekend though, I'm clocking off for today. Thanks for the suggestions, much appreciated. And enjoy the weekend!

Copy link
Collaborator

@rusty-snake rusty-snake May 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW: The only case where ignore read-only should be used instead of read-write are redirect profiles [and .locals] IMHO.

etc/profile-m-z/semver.profile Outdated Show resolved Hide resolved
node-gyp is a shell script with a node shebang. We've got that covered via node.profile.
npx is a shell script with a node shebang. We've got that covered via node.profile.
semver is a shell script that calls node. We've got that covered via node.profile.
@glitsj16 glitsj16 marked this pull request as ready for review May 7, 2021 18:50
@glitsj16 glitsj16 changed the title [WIP] Node.js stack refactoring Node.js stack refactoring May 7, 2021
@glitsj16 glitsj16 merged commit 699a803 into netblue30:master May 8, 2021
@glitsj16 glitsj16 deleted the node-stack branch May 8, 2021 15:27
@kmk3 kmk3 mentioned this pull request May 11, 2021
@matu3ba matu3ba mentioned this pull request Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants