Avoid building Rust on pnpm install

This commit is contained in:
Nigel Breslaw 2024-11-13 20:19:17 +02:00 committed by Simon Hausmann
parent 9cfe8862f9
commit 0461abfc73
21 changed files with 54 additions and 45 deletions

View file

@ -57,7 +57,7 @@ runs:
uses: pnpm/action-setup@v4.0.0
with:
version: 9.11.0
run: pnpm install --frozen-lockfile --ignore-scripts
run: pnpm install --frozen-lockfile
shell: bash
working-directory: tools/slintpad

View file

@ -100,7 +100,7 @@ jobs:
- name: "Node docs"
run: |
pnpm install --frozen-lockfile --ignore-scripts
pnpm install --frozen-lockfile
pnpm run docs
working-directory: api/node

View file

@ -142,7 +142,7 @@ jobs:
key: x-napi-v2-${{ steps.node-install.outputs.node-version }} # the cache key consists of a manually bumpable version and the node version, as the cached rustc artifacts contain linking information where to find node.lib, which is in a versioned directory.
- name: Run pnpm install
working-directory: api/node
run: pnpm install --frozen-lockfile --ignore-scripts
run: pnpm install --frozen-lockfile
- name: Build node plugin in debug
run: pnpm build:testing
working-directory: api/node
@ -345,7 +345,7 @@ jobs:
echo 1 > target/debug/slint-lsp
- name: Run pnpm install
working-directory: editors/vscode
run: pnpm install --frozen-lockfile --ignore-scripts
run: pnpm install --frozen-lockfile
- name: vscode prebuild
working-directory: editors/vscode
run: pnpm vscode:prepublish

View file

@ -39,7 +39,7 @@ jobs:
run: biome format biome.json
- name: Format, Lint on npm projects
run: |
pnpm install --frozen-lockfile --ignore-scripts
pnpm install --frozen-lockfile
pnpm format
pnpm lint
- name: Suggest format changes

View file

@ -291,7 +291,7 @@ jobs:
shell: bash
- name: "pnpm install"
working-directory: editors/vscode
run: pnpm install --frozen-lockfile --ignore-scripts
run: pnpm install --frozen-lockfile
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build package and optionally publish to Visual Studio Marketplace

View file

@ -67,7 +67,7 @@ jobs:
with:
name: wasm
- name: Install NPM dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
run: pnpm install --frozen-lockfile
working-directory: tools/slintpad
- name: Compile slintpad

View file

@ -36,11 +36,10 @@
},
"scripts": {
"artifacts": "napi artifacts",
"compile": "tsc",
"compile": "tsc --build",
"build": "napi build --platform --release --js rust-module.cjs --dts rust-module.d.ts -c binaries.json",
"build:debug": "napi build --platform --js rust-module.cjs --dts rust-module.d.ts -c binaries.json && pnpm compile",
"build:testing": "napi build --platform --js rust-module.cjs --dts rust-module.d.ts -c binaries.json --features testing && pnpm compile",
"install": "node build-on-demand.mjs",
"docs": "pnpm build && typedoc --hideGenerator --treatWarningsAsErrors --readme cover.md typescript/index.ts",
"check": "biome check",
"format": "biome format",

View file

@ -106,6 +106,7 @@
"opengl",
"opengles",
"pixmap",
"prestart",
"printerdemo",
"riscv",
"rowspan",

View file

@ -5,10 +5,11 @@
"type": "module",
"dependencies": {
"@biomejs/biome": "1.9.3",
"slint-ui": "../../../api/node"
"slint-ui": "workspace:*"
},
"scripts": {
"start": "node .",
"prestart": "cd ../../../api/node/ && node build-on-demand.mjs && pnpm compile",
"check": "biome check",
"format": "biome format",
"format:fix": "biome format --write",

View file

@ -1,8 +1,4 @@
Run with
# pushd ../../../api/node
# pnpm install
# pnpm compile
# popd
# pnpm install --ignore-scripts
# pnpm start

View file

@ -4,9 +4,10 @@
"main": "main.js",
"type": "module",
"dependencies": {
"slint-ui": "../../../api/node"
"slint-ui": "workspace:*"
},
"scripts": {
"start": "node ."
"start": "node .",
"prestart": "cd ../../../api/node/ && node build-on-demand.mjs && pnpm compile"
}
}

View file

@ -45,7 +45,7 @@ The following step will build a local version of the vscode extension and the LS
cargo install wasm-pack
cargo build -p slint-lsp
cd editors/vscode
pnpm install --frozen-lockfile --ignore-scripts
pnpm install --frozen-lockfile
pnpm build:wasm_lsp
pnpm compile
```

View file

@ -1,7 +1,3 @@
Run with
# pushd ../../../api/node
# npm install
# npm run compile
# popd
# npm install
# npm start
# pnpm install
# pnpm start

View file

@ -4,9 +4,10 @@
"main": "main.js",
"type": "module",
"dependencies": {
"slint-ui": "../../../api/node"
"slint-ui": "workspace:*"
},
"scripts": {
"start": "node ."
"start": "node .",
"prestart": "cd ../../../api/node/ && node build-on-demand.mjs && pnpm compile"
}
}

View file

@ -1,8 +1,3 @@
Run with
# pushd ../../../api/node
# pnpm install
# pnpm run compile
# popd
# pnpm install --ignore-scripts
# pnpm start

View file

@ -4,7 +4,7 @@
"main": "main.js",
"type": "module",
"dependencies": {
"slint-ui": "../../../api/node",
"slint-ui": "workspace:*",
"jimp": "1.6.0"
},
"devDependencies": {
@ -13,7 +13,7 @@
},
"scripts": {
"start": "tsc --build && node ./main.js",
"prestart": "cd ../../../api/node/ && node build-on-demand.mjs && pnpm compile",
"type-check": "tsc --noEmit"
}
}

View file

@ -4,9 +4,10 @@
"main": "main.js",
"type": "module",
"dependencies": {
"slint-ui": "../../api/node"
"slint-ui": "workspace:*"
},
"scripts": {
"start": "node ."
"start": "node .",
"prestart": "cd ../../api/node/ && node build-on-demand.mjs && pnpm compile"
}
}

View file

@ -1,7 +1,3 @@
Run with
# pushd ../../../api/node
# npm install
# npm run compile
# popd
# npm install
# npm start
# pnpm install
# pnpm start

View file

@ -4,9 +4,10 @@
"main": "main.js",
"type": "module",
"dependencies": {
"slint-ui": "../../../api/node"
"slint-ui": "workspace:*"
},
"scripts": {
"start": "node ."
"start": "node .",
"prestart": "cd ../../../api/node/ && node build-on-demand.mjs && pnpm compile"
}
}

24
pnpm-lock.yaml generated
View file

@ -51,13 +51,13 @@ importers:
specifier: 1.9.3
version: 1.9.3
slint-ui:
specifier: ../../../api/node
specifier: workspace:*
version: link:../../../api/node
demos/printerdemo/node:
dependencies:
slint-ui:
specifier: ../../../api/node
specifier: workspace:*
version: link:../../../api/node
docs/editor:
@ -146,13 +146,19 @@ importers:
specifier: 0.1.3
version: 0.1.3
examples/carousel/node:
dependencies:
slint-ui:
specifier: workspace:*
version: link:../../../api/node
examples/imagefilter/node:
dependencies:
jimp:
specifier: 1.6.0
version: 1.6.0
slint-ui:
specifier: ../../../api/node
specifier: workspace:*
version: link:../../../api/node
devDependencies:
'@types/node':
@ -162,6 +168,18 @@ importers:
specifier: 5.6.2
version: 5.6.2
examples/memory:
dependencies:
slint-ui:
specifier: workspace:*
version: link:../../api/node
examples/todo/node:
dependencies:
slint-ui:
specifier: workspace:*
version: link:../../../api/node
tools/slintpad:
devDependencies:
'@biomejs/biome':

View file

@ -7,4 +7,7 @@ packages:
- "demos/printerdemo/node"
- "demos/home-automation/node"
- "examples/imagefilter/node"
- "examples/carousel/node"
- "examples/todo/node"
- "examples/memory"
- "docs/editor"