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

Changed files
+45 -6
.github
workflows
scripts
src
+1
.github/workflows/release.yml
···
push:
branches:
- main
+
jobs:
release:
name: Release
+5
jsr.json
···
+
{
+
"name": "@0no-co/graphql-web",
+
"version": "1.0.7",
+
"exports": "./src/index.ts"
+
}
+3 -2
package.json
···
"clean": "rimraf dist node_modules/.cache",
"prepublishOnly": "run-s clean build check test",
"prepare": "node ./scripts/prepare.js",
-
"changeset:version": "changeset version && pnpm install --lockfile-only",
-
"changeset:publish": "changeset publish"
+
"changeset:version": "changeset version && pnpm install --lockfile-only && node ./scripts/jsr.js",
+
"changeset:publish": "changeset publish && jsr publish"
},
"repository": "https://github.com/0no-co/graphql.web",
"bugs": {
···
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-tsdoc": "^0.2.17",
"husky-v4": "^4.3.8",
+
"jsr": "^0.12.1",
"lint-staged": "^15.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.4",
+20
pnpm-lock.yaml
···
husky-v4:
specifier: ^4.3.8
version: 4.3.8
+
jsr:
+
specifier: ^0.12.1
+
version: 0.12.1
lint-staged:
specifier: ^15.2.0
version: 15.2.0
···
graceful-fs: 4.2.11
dev: true
+
/jsr@0.12.1:
+
resolution: {integrity: sha512-qekys430nNcIFD+mRDjzS6OOnWb6kjHZCvkt2awJhmM7agC3evMxWayHxDzUKnpERYZG6c+0OmyDZuZ+xOwNPw==}
+
hasBin: true
+
dependencies:
+
kolorist: 1.8.0
+
node-stream-zip: 1.15.0
+
dev: true
+
/keyv@4.5.4:
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
dependencies:
···
/kleur@4.1.5:
resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==}
engines: {node: '>=6'}
+
dev: true
+
+
/kolorist@1.8.0:
+
resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==}
dev: true
/levn@0.4.1:
···
/node-releases@2.0.14:
resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==}
+
dev: true
+
+
/node-stream-zip@1.15.0:
+
resolution: {integrity: sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw==}
+
engines: {node: '>=0.12.0'}
dev: true
/normalize-package-data@2.5.0:
+12
scripts/jsr.js
···
+
const path = require('path');
+
const fs = require('fs');
+
+
const packageJsonSource = path.resolve(__dirname, '../package.json');
+
const jsrJsonSource = path.resolve(__dirname, '../jsr.json');
+
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonSource, { encoding: 'utf-8' }));
+
const jsrJson = JSON.parse(fs.readFileSync(jsrJsonSource, { encoding: 'utf-8' }));
+
+
jsrJson.version = packageJson.version;
+
+
fs.writeFileSync(jsrJsonSource, JSON.stringify(jsrJson, undefined, 2));
+2 -2
src/error.ts
···
return { ...this, message: this.message };
}
-
toString() {
+
toString(): string {
return this.message;
}
-
get [Symbol.toStringTag]() {
+
get [Symbol.toStringTag](): string {
return 'GraphQLError';
}
}
+2 -2
src/printer.ts
···
return out;
}
-
function printString(string: string) {
+
function printString(string: string): string {
return JSON.stringify(string);
}
-
function printBlockString(string: string) {
+
function printBlockString(string: string): string {
return '"""\n' + string.replace(/"""/g, '\\"""') + '\n"""';
}