khal-os 1.260326.1 → 1.260326.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -114,6 +114,29 @@ jobs:
|
|
|
114
114
|
cd packages/npx-cli
|
|
115
115
|
bun build src/cli.ts --outfile dist/cli.js --target node
|
|
116
116
|
|
|
117
|
+
- name: Resolve workspace references for npm
|
|
118
|
+
run: |
|
|
119
|
+
VERSION="${{ steps.version.outputs.version }}"
|
|
120
|
+
node -e "
|
|
121
|
+
const fs = require('fs');
|
|
122
|
+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
123
|
+
let changed = false;
|
|
124
|
+
for (const depType of ['dependencies', 'devDependencies', 'peerDependencies']) {
|
|
125
|
+
for (const [key, val] of Object.entries(pkg[depType] || {})) {
|
|
126
|
+
if (typeof val === 'string' && val.startsWith('workspace:')) {
|
|
127
|
+
pkg[depType][key] = '${VERSION}';
|
|
128
|
+
changed = true;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (changed) {
|
|
133
|
+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, '\t') + '\n');
|
|
134
|
+
console.log('Resolved workspace:* → ${VERSION}');
|
|
135
|
+
} else {
|
|
136
|
+
console.log('No workspace references to resolve');
|
|
137
|
+
}
|
|
138
|
+
"
|
|
139
|
+
|
|
117
140
|
- name: Publish to npm
|
|
118
141
|
env:
|
|
119
142
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|