-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update deps, add graphql-tag-min
- Loading branch information
Showing
50 changed files
with
307 additions
and
159 deletions.
There are no files selected for viewing
Binary file removed
BIN
-5.65 MB
.yarn/cache/@fortawesome-fontawesome-free-npm-6.5.1-38b9277012-ff6627084d.zip
Binary file not shown.
Binary file added
BIN
+5.66 MB
.yarn/cache/@fortawesome-fontawesome-free-npm-6.5.2-81f99be10c-8eb70fa762.zip
Binary file not shown.
Binary file removed
BIN
-14.1 KB
.yarn/cache/@humanwhocodes-object-schema-npm-2.0.2-77b42018f9-ef915e3e2f.zip
Binary file not shown.
Binary file added
BIN
+8.53 KB
.yarn/cache/@humanwhocodes-object-schema-npm-2.0.3-4f0e508cd9-05bb99ed06.zip
Binary file not shown.
Binary file renamed
BIN
+389 KB
...de-npm-20.11.30-b20dd3f11f-78515bc768.zip → ...ode-npm-20.12.7-3bb3d3303d-b4a28a3b59.zip
Binary file not shown.
Binary file renamed
BIN
+12.4 KB
...dom-npm-18.2.22-5cfb6052f5-310da22244.zip → ...dom-npm-18.2.24-46cb818e4c-bbd4005f2f.zip
Binary file not shown.
Binary file renamed
BIN
+82 KB
...act-npm-18.2.71-331d3140c4-b9473a30b5.zip → ...act-npm-18.2.75-6840469812-d609cdc52d.zip
Binary file not shown.
Binary file renamed
BIN
+19.2 KB
...emver-npm-7.5.6-9d2637fc95-e77282b17f.zip → ...emver-npm-7.5.8-26073743d7-3496808818.zip
Binary file not shown.
Binary file renamed
BIN
+810 KB
...lugin-npm-7.4.0-559b255afa-9bd8852c7e.zip → ...lugin-npm-7.6.0-e3a1f1768d-6977c5fb53.zip
Binary file not shown.
Binary file removed
BIN
-8.79 KB
.yarn/cache/@typescript-eslint-parser-npm-7.4.0-0c13447ea1-142a9e1187.zip
Binary file not shown.
Binary file added
BIN
+8.93 KB
.yarn/cache/@typescript-eslint-parser-npm-7.6.0-56aac94370-245b975280.zip
Binary file not shown.
Binary file renamed
BIN
+333 KB
...nager-npm-7.4.0-0b20c139fb-8cf9292444.zip → ...nager-npm-7.6.0-8477c6fabc-1daa0b84f7.zip
Binary file not shown.
Binary file renamed
BIN
+53.4 KB
...utils-npm-7.4.0-7aaf170a20-a8bd0929d8.zip → ...utils-npm-7.6.0-b622454806-1011e1d3ff.zip
Binary file not shown.
Binary file renamed
BIN
+30.5 KB
...types-npm-7.4.0-3e79d39332-2782c5bf65.zip → ...types-npm-7.6.0-f4e9bd747a-830c1b12d8.zip
Binary file not shown.
Binary file renamed
BIN
+174 KB
...stree-npm-7.4.0-c2218411fa-162ec9d758.zip → ...stree-npm-7.6.0-a84b883343-a10ae98166.zip
Binary file not shown.
Binary file renamed
BIN
+111 KB
...utils-npm-7.4.0-cc89951e7f-ffed27e770.zip → ...utils-npm-7.6.0-b846728061-45bcc1b00e.zip
Binary file not shown.
Binary file renamed
BIN
+9.79 KB
...-keys-npm-7.4.0-fcd4bb6855-70dc99f2ad.zip → ...-keys-npm-7.6.0-dbe1be615f-2703629f13.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+5.62 MB
...cript-npm-5.4.3-702063d215-de4c69f49a.zip → ...cript-npm-5.4.4-a827b905f6-bade322d88.zip
Binary file not shown.
Binary file renamed
BIN
+5.62 MB
...ypescript-patch-0b5476accc-5aedd97595.zip → ...ypescript-patch-caac36e033-88aff3244c.zip
Binary file not shown.
Binary file renamed
BIN
+49.9 KB
...tcher-npm-2.3.0-80db912527-6ee220a8c1.zip → ...tcher-npm-2.3.1-38b66090bc-bd223109a5.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,8 @@ | |
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.5.12", | ||
"@typescript-eslint/eslint-plugin": "^7.4.0", | ||
"@typescript-eslint/parser": "^7.4.0", | ||
"@typescript-eslint/eslint-plugin": "^7.6.0", | ||
"@typescript-eslint/parser": "^7.6.0", | ||
"coveralls": "^3.1.1", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
|
@@ -39,7 +39,7 @@ | |
"react": "^18.2.0", | ||
"rimraf": "^5.0.5", | ||
"ts-jest": "^29.1.2", | ||
"typescript": "^5.4.3" | ||
"typescript": "^5.4.4" | ||
}, | ||
"license": "MIT", | ||
"packageManager": "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "@reform/graphql-tag-min", | ||
"version": "0.1", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"module": "dist/index.js", | ||
"type": "module", | ||
"files": [ | ||
"dist" | ||
], | ||
"repository": "https://github.com/izatop/reform", | ||
"keywords": [ | ||
"esbuild", | ||
"bundle", | ||
"graphql", | ||
"react", | ||
"typescript" | ||
], | ||
"scripts": { | ||
"build": "tsc" | ||
}, | ||
"dependencies": { | ||
"@reform/bundle": "^0.14.8", | ||
"@types/node": "^20.12.7" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"author": { | ||
"name": "Artur Bier", | ||
"email": "[email protected]" | ||
}, | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import {assignWithFilter, BuildContext, PluginAbstract} from "@reform/bundle"; | ||
import {readFile} from "fs/promises"; | ||
|
||
export type Config = {filter: RegExp}; | ||
|
||
const extensions = ["ts", "tsx"]; | ||
const defaultFilter = new RegExp(`\\.gql\\.(${extensions.join("|")})$`); | ||
|
||
export class Plugin extends PluginAbstract<Config> { | ||
public readonly name = "@reform/graphql-tag-min"; | ||
|
||
constructor(context: BuildContext, config?: Config) { | ||
super(context, assignWithFilter({filter: defaultFilter}, config)); | ||
} | ||
|
||
public configure(): void { | ||
this | ||
.on("load", this.config, async ({path}) => { | ||
const contents = await readFile(path, {encoding: "utf-8"}); | ||
|
||
return {contents: this.#patch(contents), loader: "tsx"}; | ||
}); | ||
} | ||
|
||
#patch(contents: string): string { | ||
if (contents.includes("gql`")) { | ||
return contents.replace(/gql`([^`]+)`;/g, (_, $1) => { | ||
return `gql\`${$1.replace(/\s+/g, " ")}\`;`; | ||
}); | ||
} | ||
|
||
return contents; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import {Plugin} from "./Plugin.js"; | ||
|
||
export default Plugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "../../tsconfig.node.json", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"rootDir": "src" | ||
}, | ||
"references": [ | ||
{ | ||
"path": "../bundle" | ||
} | ||
], | ||
"include": [ | ||
"src" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
|
||
import HelloQuery from "./HelloQuery.graphql"; | ||
|
||
export * from "./inline.gql"; | ||
export {HelloQuery}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import gql from "graphql-tag"; | ||
|
||
export const InlineQuery1 = gql`query InlineQuery1 { | ||
message | ||
}`; | ||
|
||
export const InlineQuery2 = gql`query InlineQuery2 { | ||
message | ||
}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ | |
{ | ||
"path": "graphql" | ||
}, | ||
{ | ||
"path": "graphql-tag-min" | ||
}, | ||
{ | ||
"path": "html" | ||
} | ||
|
Oops, something went wrong.