Skip to content

Commit 6837b03

Browse files
committed
[ADD] a step in the workflow to remove the vsce and ovsx dependencies from the package.json to avoid conflicts
1 parent 4a4f75b commit 6837b03

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/publish_vsix.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,25 @@ jobs:
6060
env:
6161
VSCODE_VERSION: ${{ matrix.vscode_version }}
6262

63+
- name: Strip CI-only dependencies
64+
run: |
65+
node <<'EOF'
66+
const fs = require('fs');
67+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
68+
69+
function stripDeps(section) {
70+
if (pkg[section]) {
71+
delete pkg[section].vsce;
72+
delete pkg[section].ovsx;
73+
}
74+
}
75+
76+
stripDeps('devDependencies');
77+
stripDeps('dependencies');
78+
79+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
80+
EOF
81+
6382
- name: Install deps
6483
run: npm ci
6584

0 commit comments

Comments
 (0)