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
|
- name: Install dependencies
|
||||||
run: pnpm install
|
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
|
- name: Publish to JSR
|
||||||
run: pnpm dlx jsr publish
|
run: pnpm dlx jsr publish
|
||||||
|
|
|
||||||
5
deno.json
Normal file
5
deno.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"imports": {
|
||||||
|
"@std/cli": "jsr:@std/cli@1"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
jsr.json
1
jsr.json
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"$schema": "https://jsr.io/schema/config-file.v1.json",
|
||||||
"name": "@textplace/core",
|
"name": "@textplace/core",
|
||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
"exports": "./src/mod.ts",
|
"exports": "./src/mod.ts",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue