Skip to content

nodePackages: switch to 12#85764

Closed
Mic92 wants to merge 1 commit intoNixOS:masterfrom
Mic92:node-12
Closed

nodePackages: switch to 12#85764
Mic92 wants to merge 1 commit intoNixOS:masterfrom
Mic92:node-12

Conversation

@Mic92
Copy link
Member

@Mic92 Mic92 commented Apr 22, 2020

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Mic92 Mic92 requested a review from jonringer as a code owner April 22, 2020 11:39
@Mic92
Copy link
Member Author

Mic92 commented Apr 22, 2020

nodejs 10 is about to sunset and nodejs 12 is taking over: https://nodejs.org/en/about/releases/

@ofborg ofborg bot added 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Apr 22, 2020
@marsam
Copy link
Contributor

marsam commented Apr 22, 2020

IIUC there is no need to use different node-packages-vXX.nix for each node version. could you please give the following a try?

--- c/pkgs/development/node-packages/generate.sh
+++ i/pkgs/development/node-packages/generate.sh
@@ -6,6 +6,4 @@ node2nix=$(nix-build ../../.. --no-out-link -A nodePackages.node2nix)
 
 cd ${DIR}
 rm -f ./node-env.nix
-for version in 10 12 13; do
-  "${node2nix}/bin/node2nix" --nodejs-$version -i node-packages-v$version.json -o node-packages-v$version.nix -c composition-v$version.nix
-done
+"${node2nix}/bin/node2nix" -i node-packages.json -o node-packages.nix -c composition.nix

so we could use:

nodePackages_12_x = dontRecurseIntoAttrs (callPackage ../development/node-packages {
  nodejs = pkgs.nodejs-12_x;
});

@Mic92
Copy link
Member Author

Mic92 commented Apr 22, 2020

@svanderburg how do you feel about re-using the packages? Is this safe to do? Right now node12 is handled the same way as node13:

https://github.com/svanderburg/node2nix/blob/master/bin/node2nix.js#L135

@calbrecht
Copy link
Member

I was interested if any package was restricted to a max. node version, so

jq -r '.[] | select(type=="string")' node-packages-v10.json | xargs -I@ yarn info -s --json @ | jq -s -r '.[].data | [.name?, .engines?.node?] | join(" ")' | tee version-restrictions.txt

@angular/cli >= 10.13.0
@antora/cli >=8.11.0
@antora/site-generator-default >=8.11.0
@bitwarden/cli
@vue/cli >=8.9
@webassemblyjs/cli
@webassemblyjs/repl
@webassemblyjs/wasm-strip
@webassemblyjs/wasm-text-gen
@webassemblyjs/wast-refmt
alloy >=0.10
asar >=10.12.0
bash-language-server >=8.0.0
bower >=0.10.0
bower2nix
browserify >= 0.8
castnow
clean-css >= 4.0
coc-css
coc-emmet
coc-eslint
coc-git
coc-go
coc-highlight
coc-html
coc-imselect
coc-java
coc-jest
coc-json
coc-lists
coc-metals
coc-pairs
coc-prettier
coc-python
coc-r-lsp
coc-rls
coc-smartf
coc-snippets
coc-solargraph
coc-stylelint
coc-tabnine
coc-tslint
coc-tslint-plugin
coc-tsserver
coc-vetur
coc-vimtex
coc-wxml
coc-yaml
coc-yank
coffee-script >=0.8.0
coinmon >=6.0.0
configurable-http-proxy >= 6.0
cordova >=6.0.0
cpy-cli >=8
create-cycle-app
create-react-app >=8
create-react-native-app
csslint >=0.10.0
dat
dhcp >=5.10.0
dnschain >=0.10.x
dockerfile-language-server-nodejs *
elasticdump >=8.0.0
elm-oracle >=0.12.0
emoj >=10
emojione
eslint ^8.10.0 || ^10.13.0 || >=11.10.1
eslint_d
fkill-cli >=10
forever >=6
git-run
git-ssb
git-standup
gitmoji-cli >=10
graphql-cli
grunt-cli >=4
gtop >=4.0.0
gulp >= 0.10
gulp-cli >= 0.10
html-minifier >=6
htmlhint
http-server >=6
hueadm *
imapnotify
indium
insect
ionic >=8.9.4
ios-deploy
jake *
javascript-typescript-langserver >=6.0.0
joplin >=10.0.0
js-beautify
js-yaml
jsdoc >=8.15.0
jshint
json >=0.10.0
json-diff *
json-refs >=0.8
json-server >=10
jsonlint >= 0.6
karma >= 10
lcov-result-merger >=4
leetcode-cli >=4
lerna >= 6.9.0
less >=6
less-plugin-clean-css >=0.4.2
live-server >=0.10.0
livedown
madoko >=0.10.0
markdown-link-check
mathjax
meat >0.6.0
meguca
mocha >= 8.0.0
multi-file-swagger
neovim
nijs
node-gyp >= 6.0.0
node-gyp-build
node-inspector >=0.8.0
node-pre-gyp
node-red >=8
node2nix
nodemon >=8.10.0
npm 6 >=6.2.0 || 8 || >=9.3.0
npm-check-updates >=8
ocaml-language-server >=6.9.1
parcel-bundler >= 6.0.0
parsoid
peerflix
peerflix-server >=6
pnpm >=10.13
postcss-cli >=10
prettier >=10.13.0
pscid
pulp >= 4
purescript-psa
react-native-cli >=4
react-tools >=0.10.0
reveal.js >=9.0.0
s3http
semver >=10
serve
serverless >=6.0
shout
sloc
smartdc >=0.8.14
snyk >=8
socket.io
speed-test >=8
ssb-server
stackdriver-statsd-backend
stf >= 6.9
svgo >=4.0.0
swagger
tern
textlint >=6.0.0
textlint-plugin-latex
textlint-rule-abbr-within-parentheses
textlint-rule-alex
textlint-rule-common-misspellings
textlint-rule-diacritics >=8.6
textlint-rule-en-max-word-count
textlint-rule-max-comma
textlint-rule-no-start-duplicated-conjunction
textlint-rule-period-in-list-item
textlint-rule-stop-words >=8.9
textlint-rule-terminology >=8.9
textlint-rule-unexpanded-acronym
textlint-rule-write-good >=6
thelounge >=10.15.0
three
tiddlywiki >=0.8.2
titanium >=4.0
triton >=0.10
tsun
ttf2eot
typescript >=4.2.0
typescript-language-server
uglify-js >=0.8.0
ungit >=10.18
vscode-css-languageserver-bin *
vscode-html-languageserver-bin *
vue-cli >=6.0.0
vue-language-server >=6
web-ext >=10.0.0
webpack >=6.11.5
webpack-cli >=6.11.5
webpack-dev-server >= 6.11.5
copy-webpack-plugin >= 6.9.0
webtorrent-cli >=10
wring
write-good >=6
yaml-language-server *
yarn >=4.0.0
yo >=8

Which seems not to be the case, so i guess its fine, though the dependencies of the packages were not checked right here.

Copy link
Member

@calbrecht calbrecht left a comment

Choose a reason for hiding this comment

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

You might want to add the removal of nodePackages_10_x to the release notes, like it was done in rl-1803.xml and rl-1903.xml. In case you just forgot, surely you know better than me, if it was by intention. :)

@prusnak prusnak mentioned this pull request May 14, 2020
10 tasks
nodejs = hiPrio nodejs-10_x;
nodejs = hiPrio nodejs-12_x;

nodejs-slim = nodejs-slim-10_x;
Copy link
Member

Choose a reason for hiding this comment

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

I think we should also change nodejs-slim?

cd ${DIR}
rm -f ./node-env.nix
for version in 10 12 13; do
for version in 12 13; do
Copy link
Member

@prusnak prusnak May 14, 2020

Choose a reason for hiding this comment

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

Hm, maybe we could drop nodejs-13 and use nodejs-14 instead? (That is: we're keeping LTS and latest stable).

Suggested change
for version in 12 13; do
for version in 12 14; do

Or even better have just one set of node_packages as suggest by @marsam above

@prusnak prusnak added the 6.topic: nodejs Node.js is a free, open-source, cross-platform JavaScript runtime environment label May 15, 2020
@Mic92
Copy link
Member Author

Mic92 commented May 26, 2020

Maybe someone else can take this over.

@Mic92 Mic92 closed this May 26, 2020
@calbrecht
Copy link
Member

I am interested in working on it. If no one else is working on it, i will create a new PR based on this one, including the suggested changes, until upcoming weekend.

@Mic92
Copy link
Member Author

Mic92 commented May 26, 2020

I am interested in working on it. If no one else is working on it, i will create a new PR based on this one, including the suggested changes, until upcoming weekend.

I would review it, if you cc me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nodejs Node.js is a free, open-source, cross-platform JavaScript runtime environment 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants