mirror of
https://github.com/TextPlace/CoreTextPlace.git
synced 2025-12-16 20:32:34 +00:00
fix: Strip JSR deps before publishing and add deno.json
JSR itself does not accept 'jsr:' dependencies in package.json, remove them in the publish workflow before publishing. Add $schema to jsr.json.
This commit is contained in:
parent
34e710f036
commit
b51545ab39
3 changed files with 22 additions and 0 deletions
16
.github/workflows/publish_jsr.yml
vendored
16
.github/workflows/publish_jsr.yml
vendored
|
|
@ -32,5 +32,21 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
# This step removes JSR dependencies from package.json before publishing,
|
||||
# Because apparently now while major npm compatible package managers
|
||||
# support JSR dependencies in package.json, JSR itself does not.
|
||||
- name: Remove JSR deps from package.json
|
||||
run: |
|
||||
node -e "
|
||||
const fs = require('fs');
|
||||
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
|
||||
for (const dep in pkg.dependencies ?? {}) {
|
||||
if (pkg.dependencies[dep].startsWith('jsr:')) {
|
||||
delete pkg.dependencies[dep];
|
||||
}
|
||||
}
|
||||
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
|
||||
"
|
||||
|
||||
- name: Publish to JSR
|
||||
run: pnpm dlx jsr publish
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue