Mirror: The spec-compliant minimum of client-side GraphQL.

chore(workspace): publish to jsr (#30)

* publish to jsr

* fix linting

* add experimental

* add action

* fix types

* change name to have a dash

* fixes

authored by Jovi De Croock and committed by GitHub 7a8ffeca 123f797a

Changed files
+45 -6
.github
workflows
scripts
src
+1
.github/workflows/release.yml
··· 3 3 push: 4 4 branches: 5 5 - main 6 + 6 7 jobs: 7 8 release: 8 9 name: Release
+5
jsr.json
··· 1 + { 2 + "name": "@0no-co/graphql-web", 3 + "version": "1.0.7", 4 + "exports": "./src/index.ts" 5 + }
+3 -2
package.json
··· 45 45 "clean": "rimraf dist node_modules/.cache", 46 46 "prepublishOnly": "run-s clean build check test", 47 47 "prepare": "node ./scripts/prepare.js", 48 - "changeset:version": "changeset version && pnpm install --lockfile-only", 49 - "changeset:publish": "changeset publish" 48 + "changeset:version": "changeset version && pnpm install --lockfile-only && node ./scripts/jsr.js", 49 + "changeset:publish": "changeset publish && jsr publish" 50 50 }, 51 51 "repository": "https://github.com/0no-co/graphql.web", 52 52 "bugs": { ··· 95 95 "eslint-plugin-prettier": "^5.1.3", 96 96 "eslint-plugin-tsdoc": "^0.2.17", 97 97 "husky-v4": "^4.3.8", 98 + "jsr": "^0.12.1", 98 99 "lint-staged": "^15.2.0", 99 100 "npm-run-all": "^4.1.5", 100 101 "prettier": "^3.2.4",
+20
pnpm-lock.yaml
··· 78 78 husky-v4: 79 79 specifier: ^4.3.8 80 80 version: 4.3.8 81 + jsr: 82 + specifier: ^0.12.1 83 + version: 0.12.1 81 84 lint-staged: 82 85 specifier: ^15.2.0 83 86 version: 15.2.0 ··· 3156 3159 graceful-fs: 4.2.11 3157 3160 dev: true 3158 3161 3162 + /jsr@0.12.1: 3163 + resolution: {integrity: sha512-qekys430nNcIFD+mRDjzS6OOnWb6kjHZCvkt2awJhmM7agC3evMxWayHxDzUKnpERYZG6c+0OmyDZuZ+xOwNPw==} 3164 + hasBin: true 3165 + dependencies: 3166 + kolorist: 1.8.0 3167 + node-stream-zip: 1.15.0 3168 + dev: true 3169 + 3159 3170 /keyv@4.5.4: 3160 3171 resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} 3161 3172 dependencies: ··· 3170 3181 /kleur@4.1.5: 3171 3182 resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} 3172 3183 engines: {node: '>=6'} 3184 + dev: true 3185 + 3186 + /kolorist@1.8.0: 3187 + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} 3173 3188 dev: true 3174 3189 3175 3190 /levn@0.4.1: ··· 3478 3493 3479 3494 /node-releases@2.0.14: 3480 3495 resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} 3496 + dev: true 3497 + 3498 + /node-stream-zip@1.15.0: 3499 + resolution: {integrity: sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw==} 3500 + engines: {node: '>=0.12.0'} 3481 3501 dev: true 3482 3502 3483 3503 /normalize-package-data@2.5.0:
+12
scripts/jsr.js
··· 1 + const path = require('path'); 2 + const fs = require('fs'); 3 + 4 + const packageJsonSource = path.resolve(__dirname, '../package.json'); 5 + const jsrJsonSource = path.resolve(__dirname, '../jsr.json'); 6 + 7 + const packageJson = JSON.parse(fs.readFileSync(packageJsonSource, { encoding: 'utf-8' })); 8 + const jsrJson = JSON.parse(fs.readFileSync(jsrJsonSource, { encoding: 'utf-8' })); 9 + 10 + jsrJson.version = packageJson.version; 11 + 12 + fs.writeFileSync(jsrJsonSource, JSON.stringify(jsrJson, undefined, 2));
+2 -2
src/error.ts
··· 45 45 return { ...this, message: this.message }; 46 46 } 47 47 48 - toString() { 48 + toString(): string { 49 49 return this.message; 50 50 } 51 51 52 - get [Symbol.toStringTag]() { 52 + get [Symbol.toStringTag](): string { 53 53 return 'GraphQLError'; 54 54 } 55 55 }
+2 -2
src/printer.ts
··· 35 35 return out; 36 36 } 37 37 38 - function printString(string: string) { 38 + function printString(string: string): string { 39 39 return JSON.stringify(string); 40 40 } 41 41 42 - function printBlockString(string: string) { 42 + function printBlockString(string: string): string { 43 43 return '"""\n' + string.replace(/"""/g, '\\"""') + '\n"""'; 44 44 } 45 45