Skip to content

Commit 3a8299d

Browse files
Madman10Kalehander92
authored andcommitted
cleanup(yarn): upgrade packages
1 parent 7c94524 commit 3a8299d

File tree

3 files changed

+3597
-4136
lines changed

3 files changed

+3597
-4136
lines changed

node-packages/package.json

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -9,81 +9,81 @@
99
"license": "MIT",
1010
"dependencies": {
1111
"@exuanbo/file-icons-js": "^3.3.0",
12-
"@playwright/test": "1.40.0",
13-
"@types/node": "^8.10.59",
14-
"ansi-parser": "^3.2.8",
15-
"ansi_up": "^6.0.2",
16-
"browser-sync": "^2.28.3",
17-
"chalk": "^2.4.1",
18-
"chart.js": "^2.9.3",
19-
"core-util-is": "^1.0.2",
20-
"datatables.net": "^1.10.20",
21-
"datatables.net-dt": "^1.10.20",
22-
"datatables.net-scroller": "^1.5.1",
23-
"debug": "^4.1.0",
24-
"ejs": "^3.1.9",
25-
"electron-debug": "^3.2.0",
26-
"express": "^4.18.2",
27-
"fs-plus": "^3.0.2",
28-
"fuzzysort": "2.0.4",
12+
"@playwright/test": "1.56.1",
13+
"@types/node": "^24.9.1",
14+
"ansi-parser": "^3.2.11",
15+
"ansi_up": "^6.0.6",
16+
"browser-sync": "^3.0.4",
17+
"chalk": "^5.6.2",
18+
"chart.js": "^4.5.1",
19+
"core-util-is": "^1.0.3",
20+
"datatables.net": "^2.3.4",
21+
"datatables.net-dt": "^2.3.4",
22+
"datatables.net-scroller": "^2.4.3",
23+
"debug": "^4.4.3",
24+
"ejs": "^3.1.10",
25+
"electron-debug": "^4.1.0",
26+
"express": "^5.1.0",
27+
"fs-plus": "^3.1.1",
28+
"fuzzysort": "3.1.0",
2929
"golden-layout": "2.6.0",
3030
"jquery": "3.7.1",
31-
"jstree": "3.3.16",
31+
"jstree": "3.3.17",
3232
"monaco-editor": "0.47.0",
3333
"mousetrap": "^1.6.5",
34-
"node-abi": "^3.63.0",
35-
"node-gyp": "^8.4.0",
36-
"node-ipc": "^9.1.1",
37-
"nouislider": "^15.7.1",
34+
"node-abi": "^4.14.0",
35+
"node-gyp": "^11.5.0",
36+
"node-ipc": "^12.0.0",
37+
"nouislider": "^15.8.1",
3838
"object-keys": "^1.1.1",
39-
"random-js": "^1.0.8",
39+
"random-js": "^2.1.0",
4040
"remove": "^0.1.5",
41-
"request": "https://registry.npmjs.org/request/-/request-2.83.0.tgz",
42-
"selenium-webdriver": "^4.5.0",
43-
"socket.io": "^4.5.3",
44-
"tar": "^4.4.13",
45-
"tippy.js": "^6.3.1",
41+
"request": "^2.88.2",
42+
"selenium-webdriver": "^4.37.0",
43+
"socket.io": "^4.8.1",
44+
"tar": "^7.5.1",
45+
"tippy.js": "^6.3.7",
4646
"vex-dialog": "^1.1.0",
4747
"vex-js": "^4.1.0",
4848
"wdio-spec-reporter": "^0.1.5",
4949
"wnumb": "^1.2.0",
50-
"ws": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz",
51-
"xterm": "^5.0.0",
52-
"xterm-addon-fit": "^0.6.0",
53-
"xterm-headless": "^5.0.0",
54-
"yamljs": "^0.2.10"
50+
"ws": "^8.18.3",
51+
"xterm": "^5.3.0",
52+
"xterm-addon-fit": "^0.8.0",
53+
"xterm-headless": "^5.3.0",
54+
"yamljs": "^0.3.0"
5555
},
5656
"devDependencies": {
57-
"@eslint/js": "^9.12.0",
58-
"@playwright/test": "^1.48.1",
59-
"@testing-library/dom": "^8.18.1",
60-
"@testing-library/webdriverio": "^3.0.6",
61-
"@types/mocha": "^9.1.1",
62-
"@types/node": "^22.7.6",
63-
"@typescript-eslint/eslint-plugin": "^5.30.3",
64-
"@typescript-eslint/parser": "^5.30.3",
65-
"css-loader": "6.10.0",
66-
"electron-builder": "^22.14.13",
67-
"electron-rebuild": "^3.2.7",
57+
"@eslint/js": "^9.38.0",
58+
"@playwright/test": "^1.56.1",
59+
"@testing-library/dom": "^10.4.1",
60+
"@testing-library/webdriverio": "^3.2.1",
61+
"@types/mocha": "^10.0.10",
62+
"@types/node": "^24.9.1",
63+
"@typescript-eslint/eslint-plugin": "^8.46.2",
64+
"@typescript-eslint/parser": "^8.46.2",
65+
"css-loader": "7.1.2",
66+
"electron-builder": "26.1.0",
67+
"electron-rebuild": "^3.2.9",
6868
"env-paths": "^3.0.0",
69-
"eslint": "^9.12.0",
70-
"eslint-config-love": "^87.0.0",
71-
"globals": "^15.11.0",
72-
"google-fonts-offline": "^0.1.2",
69+
"eslint": "^9.38.0",
70+
"eslint-config-love": "^133.0.0",
71+
"globals": "^16.4.0",
72+
"google-fonts-offline": "^0.1.5",
7373
"js-yaml": "^4.1.0",
74-
"livereload": "^0.6.3",
75-
"monaco-editor-webpack-plugin": "7.1.0",
76-
"napi-build-utils": "^1.0.2",
74+
"livereload": "^0.10.3",
75+
"monaco-editor-webpack-plugin": "7.1.1",
76+
"napi-build-utils": "^2.0.0",
7777
"npm-run-all": "^4.1.5",
78-
"prettier": "3.3.3",
79-
"style-loader": "3.3.4",
80-
"stylus": "github:stylus/stylus#0.54.8",
81-
"typescript": "5.4.2",
82-
"typescript-eslint": "^8.9.0",
83-
"vite": "5.0.0",
84-
"wdio-electron-service": "^3.5.0",
85-
"webpack": "5.90.3",
86-
"webpack-cli": "5.1.4"
78+
"prettier": "3.6.2",
79+
"style-loader": "4.0.0",
80+
"stylus": "^0.64.0",
81+
"typescript": "5.9.3",
82+
"typescript-eslint": "^8.46.2",
83+
"vite": "7.1.12",
84+
"wdio-electron-service": "^9.2.0",
85+
"webpack": "5.102.1",
86+
"webpack-cli": "6.0.1"
8787
},
8888
"scripts": {
8989
"test": "ava",

node-packages/yarn-project.nix

Lines changed: 84 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
11
# This file is generated by running "yarn install" inside your project.
22
# Manual changes might be lost - proceed with caution!
33

4-
{
5-
lib,
6-
stdenv,
7-
nodejs,
8-
git,
9-
cacert,
10-
fetchurl,
11-
writeShellScript,
12-
writeShellScriptBin,
13-
}:
14-
{
15-
src,
16-
overrideAttrs ? null,
17-
...
18-
}@args:
4+
{ lib, stdenv, nodejs, git, cacert, fetchurl, writeShellScript, writeShellScriptBin }:
5+
{ src, overrideAttrs ? null, ... } @ args:
196

207
let
218

@@ -25,7 +12,8 @@ let
2512
lockfile = ./yarn.lock;
2613

2714
# Call overrideAttrs on a derivation if a function is provided.
28-
optionalOverride = fn: drv: if fn == null then drv else drv.overrideAttrs fn;
15+
optionalOverride = fn: drv:
16+
if fn == null then drv else drv.overrideAttrs fn;
2917

3018
# Simple stub that provides the global yarn command.
3119
yarn = writeShellScriptBin "yarn" ''
@@ -35,10 +23,7 @@ let
3523
# Common attributes between Yarn derivations.
3624
drvCommon = {
3725
# Make sure the build uses the right Node.js version everywhere.
38-
buildInputs = [
39-
nodejs
40-
yarn
41-
];
26+
buildInputs = [ nodejs yarn ];
4227
# All dependencies should already be cached.
4328
yarn_enable_network = "0";
4429
# Tell node-gyp to use the provided Node.js headers for native code builds.
@@ -55,16 +40,9 @@ let
5540
export yarn_enable_nixify=false
5641
'';
5742

58-
cacheDrv = stdenv.mkDerivation rec {
43+
cacheDrv = stdenv.mkDerivation {
5944
name = "yarn-cache";
60-
buildInputs = [
61-
yarn
62-
git
63-
cacert
64-
];
65-
66-
nativeBuildInputs = buildInputs ++ [ nodejs ];
67-
45+
buildInputs = [ yarn git cacert ];
6846
buildCommand = ''
6947
cp --reflink=auto --recursive '${src}' ./src
7048
cd ./src/
@@ -74,105 +52,96 @@ let
7452
rm $out/.gitignore
7553
'';
7654
outputHashMode = "recursive";
77-
outputHash = (
78-
if stdenv.isAarch64 then
79-
"sha512-+f3z4zwF2YlzskL7uDwVvQ3Fg0EYJ1HGPEqIGNb2VsiQpXoY2tU+EufqX79YRCOW7lXkuDfMQHYI3XcPioAEvg=="
80-
else
81-
"sha512-8spVLTYEciHn5q0N1R4fRB9EBM4gzZ1Zd4EeZdLwQM6ob+wvgP3oMH6JHQXUxKraP8TlpuVg7l2gNsTaAH5NoQ=="
82-
);
55+
outputHash = "sha512-vYIsSgRtzeRWe6L5DcVqWRmBSbcjX0aYrr2V4bnAw+S4UnWVzqaTbS9GY02XSEgrBvcs0r5mqDdR8Ha/DOxpoA==";
8356
};
8457

8558
# Main project derivation.
86-
project = stdenv.mkDerivation (
87-
drvCommon
88-
// {
89-
inherit src;
90-
name = "codetracer";
91-
92-
configurePhase = ''
93-
${buildVars}
94-
95-
# Copy over the Yarn cache.
96-
rm -fr '${cacheFolder}'
97-
mkdir -p '${cacheFolder}'
98-
cp --reflink=auto --recursive ${cacheDrv}/* '${cacheFolder}/'
99-
100-
# Yarn may need a writable home directory.
101-
export yarn_global_folder="$TMP"
102-
103-
# Ensure global cache is disabled. Cache must be part of our output.
104-
touch .yarnrc.yml
105-
sed -i -e '/^enableGlobalCache/d' .yarnrc.yml
106-
echo 'enableGlobalCache: false' >> .yarnrc.yml
107-
108-
# Some node-gyp calls may call out to npm, which could fail due to an
109-
# read-only home dir.
110-
export HOME="$TMP"
111-
112-
# running preConfigure after the cache is populated allows for
113-
# preConfigure to contain substituteInPlace for dependencies as well as the
114-
# main project. This is necessary for native bindings that maybe have
115-
# hardcoded values.
116-
runHook preConfigure
117-
118-
# Run normal Yarn install to complete dependency installation.
119-
yarn install --immutable --immutable-cache
120-
121-
runHook postConfigure
122-
'';
59+
project = stdenv.mkDerivation (drvCommon // {
60+
inherit src;
61+
name = "codetracer";
12362

124-
buildPhase = ''
125-
runHook preBuild
126-
runHook postBuild
127-
'';
63+
configurePhase = ''
64+
${buildVars}
12865
129-
installPhase = ''
130-
runHook preInstall
66+
# Copy over the Yarn cache.
67+
rm -fr '${cacheFolder}'
68+
mkdir -p '${cacheFolder}'
69+
cp --reflink=auto --recursive ${cacheDrv}/* '${cacheFolder}/'
13170
132-
# Move the package contents to the output directory.
133-
if grep -q '"workspaces"' package.json; then
134-
# We can't use `yarn pack` in a workspace setup, because it only
135-
# packages the outer workspace.
136-
mkdir -p "$out/libexec"
137-
mv $PWD "$out/libexec/$name"
138-
else
139-
# - If the package.json has a `files` field, only files matching those patterns are copied
140-
# - Otherwise all files are copied.
141-
yarn pack --out package.tgz
142-
mkdir -p "$out/libexec/$name"
143-
tar xzf package.tgz --directory "$out/libexec/$name" --strip-components=1
71+
# Yarn may need a writable home directory.
72+
export yarn_global_folder="$TMP"
14473
145-
cp --reflink=auto .yarnrc* "$out/libexec/$name"
146-
cp --reflink=auto ${lockfile} "$out/libexec/$name/yarn.lock"
147-
cp --reflink=auto --recursive .yarn "$out/libexec/$name"
74+
# Ensure global cache is disabled. Cache must be part of our output.
75+
touch .yarnrc.yml
76+
sed -i -e '/^enableGlobalCache/d' .yarnrc.yml
77+
echo 'enableGlobalCache: false' >> .yarnrc.yml
14878
149-
# Copy the Yarn linker output into the package.
150-
cp --reflink=auto --recursive node_modules "$out/libexec/$name"
151-
fi
79+
# Some node-gyp calls may call out to npm, which could fail due to an
80+
# read-only home dir.
81+
export HOME="$TMP"
15282
153-
cd "$out/libexec/$name"
83+
# running preConfigure after the cache is populated allows for
84+
# preConfigure to contain substituteInPlace for dependencies as well as the
85+
# main project. This is necessary for native bindings that maybe have
86+
# hardcoded values.
87+
runHook preConfigure
15488
155-
# Invoke a plugin internal command to setup binaries.
156-
mkdir -p "$out/bin"
157-
yarn nixify install-bin $out/bin
89+
# Run normal Yarn install to complete dependency installation.
90+
yarn install --immutable --immutable-cache
15891
159-
# A package with node_modules doesn't need the cache
160-
yarn cache clean
92+
runHook postConfigure
93+
'';
16194

162-
runHook postInstall
163-
'';
95+
buildPhase = ''
96+
runHook preBuild
97+
runHook postBuild
98+
'';
99+
100+
installPhase = ''
101+
runHook preInstall
164102
165-
passthru = {
166-
inherit nodejs;
167-
yarn-freestanding = yarn;
168-
yarn = writeShellScriptBin "yarn" ''
169-
exec '${yarn}/bin/yarn' --cwd '${overriddenProject}/libexec/${overriddenProject.name}' "$@"
170-
'';
171-
};
172-
}
173-
);
103+
# Move the package contents to the output directory.
104+
if grep -q '"workspaces"' package.json; then
105+
# We can't use `yarn pack` in a workspace setup, because it only
106+
# packages the outer workspace.
107+
mkdir -p "$out/libexec"
108+
mv $PWD "$out/libexec/$name"
109+
else
110+
# - If the package.json has a `files` field, only files matching those patterns are copied
111+
# - Otherwise all files are copied.
112+
yarn pack --out package.tgz
113+
mkdir -p "$out/libexec/$name"
114+
tar xzf package.tgz --directory "$out/libexec/$name" --strip-components=1
115+
116+
cp --reflink=auto .yarnrc* "$out/libexec/$name"
117+
cp --reflink=auto ${lockfile} "$out/libexec/$name/yarn.lock"
118+
cp --reflink=auto --recursive .yarn "$out/libexec/$name"
119+
120+
# Copy the Yarn linker output into the package.
121+
cp --reflink=auto --recursive node_modules "$out/libexec/$name"
122+
fi
123+
124+
cd "$out/libexec/$name"
125+
126+
# Invoke a plugin internal command to setup binaries.
127+
mkdir -p "$out/bin"
128+
yarn nixify install-bin $out/bin
129+
130+
# A package with node_modules doesn't need the cache
131+
yarn cache clean
132+
133+
runHook postInstall
134+
'';
135+
136+
passthru = {
137+
inherit nodejs;
138+
yarn-freestanding = yarn;
139+
yarn = writeShellScriptBin "yarn" ''
140+
exec '${yarn}/bin/yarn' --cwd '${overriddenProject}/libexec/${overriddenProject.name}' "$@"
141+
'';
142+
};
143+
});
174144

175145
overriddenProject = optionalOverride overrideAttrs project;
176146

177-
in
178-
overriddenProject
147+
in overriddenProject

0 commit comments

Comments
 (0)