Skip to content

Commit

Permalink
build: avoid always having workspaces=true
Browse files Browse the repository at this point in the history
this is problematic when a workspace calls npm run
as well as issues like actions/setup-node#712
  • Loading branch information
dvirtz committed Apr 8, 2024
1 parent ade699b commit 5ef258d
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
env:
npm_config_workspaces: false
- uses: actions/setup-python@v5
with:
python-version: '3.10'
Expand All @@ -46,7 +49,7 @@ jobs:
with:
path: ${{ env.CONAN_HOME }}
key: ${{ matrix.os }}-conan-${{ hashFiles('packages/parquet-reader/conanfile.txt') }}
- run: npm ci --foreground-scripts
- run: npm ci --forward-scripts --workspaces
- name: Static checks
run: |
npm run spellcheck
Expand Down Expand Up @@ -80,6 +83,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
env:
npm_config_workspaces: false
- uses: actions/setup-python@v5
with:
python-version: '3.10'
Expand All @@ -92,13 +98,13 @@ jobs:
path: packages/parquet-reader/prebuilds
pattern: prebuilds-*
merge-multiple: true
- run: npm ci
- run: npm ci --forward-scripts --workspaces
- name: Release
env:
GH_TOKEN: ${{ secrets.RELEASE_PAT }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: npx --no-workspaces semantic-release
run: npx semantic-release
- name: Package
if: github.ref != 'refs/heads/master'
uses: lannonbr/vsce-action@master
Expand Down
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,21 @@
"hidden": false,
}
},
},
{
"name": "Conan Install",
"type": "debugpy",
"request": "launch",
"module": "conans.conan",
"justMyCode": false,
"args": [
"install",
"${workspaceFolder}/packages/parquet-reader",
"-of=${workspaceFolder}/packages/parquet-reader/dist/build/conan",
"-pr=${workspaceFolder}/packages/parquet-reader/dist/build/conan_host_profile",
"--build=missing",
"-g CMakeDeps"
]
}
]
}
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"tasks": [
{
"type": "npm",
"script": "clean",
"script": "clean --workspaces",
"problemMatcher": [],
"label": "npm: clean",
"detail": "rimraf dist .vscode-test"
},
{
"type": "npm",
"script": "build",
"script": "build --workspaces",
"group": {
"kind": "build",
"isDefault": true
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"license": "MIT",
"version": "2.7.1",
"workspaces": [
"./packages/*"
"./packages/*",
"."
],
"engines": {
"vscode": "^1.66.0"
Expand Down

0 comments on commit 5ef258d

Please sign in to comment.