@gql.tada/cli-utils 1.2.1 → 1.2.2-canary-babdc47d139f34efa7be031264892c9c6fefdb78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @gql.tada/cli-utils
2
2
 
3
+ ## 1.2.2-canary-babdc47d139f34efa7be031264892c9c6fefdb78
4
+
5
+ ### Patch Changes
6
+
7
+ - Upgrade `@vue/language-core` and maintain backwards-compatibility
8
+ Submitted by [@kitten](https://github.com/kitten) (See [#253](https://github.com/0no-co/gql.tada/pull/253))
9
+ - Updated dependencies (See [#255](https://github.com/0no-co/gql.tada/pull/255))
10
+ - @gql.tada/internal@0.2.4-canary-babdc47d139f34efa7be031264892c9c6fefdb78
11
+
3
12
  ## 1.2.1
4
13
 
5
14
  ### Patch Changes
@@ -25,32 +25,39 @@ function _interopNamespaceDefault(e) {
25
25
 
26
26
  var a = _interopNamespaceDefault(r);
27
27
 
28
- var o = _interopNamespaceDefault(t);
28
+ var i = _interopNamespaceDefault(t);
29
29
 
30
- var i = a.VueGeneratedCode || a.VirtualCode;
30
+ var o;
31
+
32
+ if ("VueVirtualCode" in a) {
33
+ o = a.VueVirtualCode;
34
+ } else if ("VueGeneratedCode" in a) {
35
+ o = a.VueGeneratedCode;
36
+ }
31
37
 
32
38
  var u = a.resolveVueCompilerOptions({});
33
39
 
34
40
  var n;
35
41
 
36
42
  exports.transform = t => {
37
- if (!n) {
43
+ if (!o) {
44
+ return;
45
+ } else if (!n) {
38
46
  n = r.getDefaultVueLanguagePlugins({
39
47
  modules: {
40
48
  typescript: e,
41
- "@vue/compiler-dom": o
49
+ "@vue/compiler-dom": i
42
50
  },
43
51
  compilerOptions: {},
44
- codegenStack: !1,
45
52
  globalTypesHolder: void 0,
46
53
  vueCompilerOptions: u
47
54
  });
48
55
  }
49
56
  var a = e.ScriptSnapshot.fromString(t.getFullText());
50
- var p = new i(t.fileName, "vue", a, u, n, e, !1);
51
- for (var l of r.forEachEmbeddedCode(p)) {
52
- if (l.id.startsWith("script_")) {
53
- return l;
57
+ var l = new o(t.fileName, "vue", a, u, n, ...[ e, !1 ]);
58
+ for (var p of r.forEachEmbeddedCode(l)) {
59
+ if (p.id.startsWith("script_")) {
60
+ return p;
54
61
  }
55
62
  }
56
63
  };
@@ -1 +1 @@
1
- {"version":3,"file":"vue-chunk.js","sources":["../../src/ts/transformers/vue.ts"],"sourcesContent":["import ts from 'typescript';\nimport type { VirtualCode } from '@vue/language-core';\nimport { forEachEmbeddedCode, getDefaultVueLanguagePlugins } from '@vue/language-core';\nimport * as vueCompilerDOM from '@vue/compiler-dom';\nimport * as vue from '@vue/language-core';\n\nconst VueVirtualCode =\n vue.VueGeneratedCode || ((vue as any).VirtualCode as typeof vue.VueGeneratedCode);\n\nconst vueCompilerOptions = vue.resolveVueCompilerOptions({});\n\nlet plugins: ReturnType<typeof getDefaultVueLanguagePlugins> | undefined;\n\nexport const transform = (sourceFile: ts.SourceFile): VirtualCode | undefined => {\n if (!plugins) {\n plugins = getDefaultVueLanguagePlugins({\n modules: {\n typescript: ts,\n '@vue/compiler-dom': vueCompilerDOM,\n },\n compilerOptions: {},\n codegenStack: false,\n globalTypesHolder: undefined,\n vueCompilerOptions,\n });\n }\n\n const snapshot = ts.ScriptSnapshot.fromString(sourceFile.getFullText());\n const root = new VueVirtualCode(\n sourceFile.fileName,\n 'vue',\n snapshot,\n vueCompilerOptions,\n plugins,\n ts,\n false\n );\n for (const code of forEachEmbeddedCode(root)) if (code.id.startsWith('script_')) return code;\n};\n"],"names":["VueVirtualCode","vue","VueGeneratedCode","VirtualCode","vueCompilerOptions","resolveVueCompilerOptions","plugins","sourceFile","getDefaultVueLanguagePlugins","modules","typescript","ts","vueCompilerDOM","compilerOptions","codegenStack","globalTypesHolder","undefined","snapshot","ScriptSnapshot","fromString","getFullText","root","fileName","code","forEachEmbeddedCode","id","startsWith"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAMA,IACJC,EAAIC,oBAAsBD,EAAYE;;AAExC,IAAMC,IAAqBH,EAAII,0BAA0B,CAAA;;AAEzD,IAAIC;;oBAEsBC;EACxB,KAAKD;IACHA,IAAUE,EAAAA,6BAA6B;MACrCC,SAAS;QACPC,YAAYC;QACZ,qBAAqBC;;MAEvBC,iBAAiB,CAAE;MACnBC,eAAc;MACdC,wBAAmBC;MACnBZ;;;EAIJ,IAAMa,IAAWN,EAAGO,eAAeC,WAAWZ,EAAWa;EACzD,IAAMC,IAAO,IAAIrB,EACfO,EAAWe,UACX,OACAL,GACAb,GACAE,GACAK,IACA;EAEF,KAAK,IAAMY,KAAQC,sBAAoBH;IAAO,IAAIE,EAAKE,GAAGC,WAAW;MAAY,OAAOH;;;AAAI"}
1
+ {"version":3,"file":"vue-chunk.js","sources":["../../src/ts/transformers/vue.ts"],"sourcesContent":["import ts from 'typescript';\nimport type { VirtualCode } from '@vue/language-core';\nimport { forEachEmbeddedCode, getDefaultVueLanguagePlugins } from '@vue/language-core';\nimport * as vueCompilerDOM from '@vue/compiler-dom';\nimport * as vue from '@vue/language-core';\n\nlet VueVirtualCode: typeof vue.VueVirtualCode | undefined;\nif ('VueVirtualCode' in vue) {\n VueVirtualCode = vue.VueVirtualCode;\n} else if ('VueGeneratedCode' in vue) {\n VueVirtualCode = (vue as any).VueGeneratedCode;\n}\n\nconst vueCompilerOptions = vue.resolveVueCompilerOptions({});\n\nlet plugins: ReturnType<typeof getDefaultVueLanguagePlugins> | undefined;\n\nexport const transform = (sourceFile: ts.SourceFile): VirtualCode | undefined => {\n if (!VueVirtualCode) {\n return undefined;\n } else if (!plugins) {\n plugins = getDefaultVueLanguagePlugins({\n modules: {\n typescript: ts,\n '@vue/compiler-dom': vueCompilerDOM,\n },\n compilerOptions: {},\n globalTypesHolder: undefined,\n vueCompilerOptions,\n });\n }\n\n const snapshot = ts.ScriptSnapshot.fromString(sourceFile.getFullText());\n const root = new VueVirtualCode(\n sourceFile.fileName,\n 'vue',\n snapshot,\n vueCompilerOptions,\n plugins,\n ...([ts, false] as any as [typeof ts])\n );\n for (const code of forEachEmbeddedCode(root)) if (code.id.startsWith('script_')) return code;\n};\n"],"names":["VueVirtualCode","vue","VueGeneratedCode","vueCompilerOptions","resolveVueCompilerOptions","plugins","sourceFile","getDefaultVueLanguagePlugins","modules","typescript","ts","vueCompilerDOM","compilerOptions","globalTypesHolder","undefined","snapshot","ScriptSnapshot","fromString","getFullText","root","fileName","code","forEachEmbeddedCode","id","startsWith"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAIA;;AACJ,IAAI,oBAAoBC;EACtBD,IAAiBC,EAAID;OAChB,IAAI,sBAAsBC;EAC/BD,IAAkBC,EAAYC;;;AAGhC,IAAMC,IAAqBF,EAAIG,0BAA0B,CAAA;;AAEzD,IAAIC;;oBAEsBC;EACxB,KAAKN;IACH;SACK,KAAKK;IACVA,IAAUE,EAAAA,6BAA6B;MACrCC,SAAS;QACPC,YAAYC;QACZ,qBAAqBC;;MAEvBC,iBAAiB,CAAE;MACnBC,wBAAmBC;MACnBX;;;EAIJ,IAAMY,IAAWL,EAAGM,eAAeC,WAAWX,EAAWY;EACzD,IAAMC,IAAO,IAAInB,EACfM,EAAWc,UACX,OACAL,GACAZ,GACAE,MACI,EAACK,IAAI;EAEX,KAAK,IAAMW,KAAQC,sBAAoBH;IAAO,IAAIE,EAAKE,GAAGC,WAAW;MAAY,OAAOH;;;AAAI"}
@@ -2,32 +2,39 @@ import e from "typescript";
2
2
 
3
3
  import * as r from "@vue/language-core";
4
4
 
5
- import { getDefaultVueLanguagePlugins as o, forEachEmbeddedCode as t } from "@vue/language-core";
5
+ import { getDefaultVueLanguagePlugins as o, forEachEmbeddedCode as i } from "@vue/language-core";
6
6
 
7
- import * as i from "@vue/compiler-dom";
7
+ import * as t from "@vue/compiler-dom";
8
8
 
9
- var p = r.VueGeneratedCode || r.VirtualCode;
9
+ var a;
10
10
 
11
- var a = r.resolveVueCompilerOptions({});
11
+ if ("VueVirtualCode" in r) {
12
+ a = r.VueVirtualCode;
13
+ } else if ("VueGeneratedCode" in r) {
14
+ a = r.VueGeneratedCode;
15
+ }
12
16
 
13
- var m;
17
+ var p = r.resolveVueCompilerOptions({});
18
+
19
+ var l;
14
20
 
15
21
  var transform = r => {
16
- if (!m) {
17
- m = o({
22
+ if (!a) {
23
+ return;
24
+ } else if (!l) {
25
+ l = o({
18
26
  modules: {
19
27
  typescript: e,
20
- "@vue/compiler-dom": i
28
+ "@vue/compiler-dom": t
21
29
  },
22
30
  compilerOptions: {},
23
- codegenStack: !1,
24
31
  globalTypesHolder: void 0,
25
- vueCompilerOptions: a
32
+ vueCompilerOptions: p
26
33
  });
27
34
  }
28
- var l = e.ScriptSnapshot.fromString(r.getFullText());
29
- var v = new p(r.fileName, "vue", l, a, m, e, !1);
30
- for (var s of t(v)) {
35
+ var u = e.ScriptSnapshot.fromString(r.getFullText());
36
+ var m = new a(r.fileName, "vue", u, p, l, ...[ e, !1 ]);
37
+ for (var s of i(m)) {
31
38
  if (s.id.startsWith("script_")) {
32
39
  return s;
33
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"vue-chunk.mjs","sources":["../../src/ts/transformers/vue.ts"],"sourcesContent":["import ts from 'typescript';\nimport type { VirtualCode } from '@vue/language-core';\nimport { forEachEmbeddedCode, getDefaultVueLanguagePlugins } from '@vue/language-core';\nimport * as vueCompilerDOM from '@vue/compiler-dom';\nimport * as vue from '@vue/language-core';\n\nconst VueVirtualCode =\n vue.VueGeneratedCode || ((vue as any).VirtualCode as typeof vue.VueGeneratedCode);\n\nconst vueCompilerOptions = vue.resolveVueCompilerOptions({});\n\nlet plugins: ReturnType<typeof getDefaultVueLanguagePlugins> | undefined;\n\nexport const transform = (sourceFile: ts.SourceFile): VirtualCode | undefined => {\n if (!plugins) {\n plugins = getDefaultVueLanguagePlugins({\n modules: {\n typescript: ts,\n '@vue/compiler-dom': vueCompilerDOM,\n },\n compilerOptions: {},\n codegenStack: false,\n globalTypesHolder: undefined,\n vueCompilerOptions,\n });\n }\n\n const snapshot = ts.ScriptSnapshot.fromString(sourceFile.getFullText());\n const root = new VueVirtualCode(\n sourceFile.fileName,\n 'vue',\n snapshot,\n vueCompilerOptions,\n plugins,\n ts,\n false\n );\n for (const code of forEachEmbeddedCode(root)) if (code.id.startsWith('script_')) return code;\n};\n"],"names":["VueVirtualCode","vue","VueGeneratedCode","VirtualCode","vueCompilerOptions","resolveVueCompilerOptions","plugins","transform","sourceFile","getDefaultVueLanguagePlugins","modules","typescript","ts","vueCompilerDOM","compilerOptions","codegenStack","globalTypesHolder","undefined","snapshot","ScriptSnapshot","fromString","getFullText","root","fileName","code","forEachEmbeddedCode","id","startsWith"],"mappings":";;;;;;;;AAMA,IAAMA,IACJC,EAAIC,oBAAsBD,EAAYE;;AAExC,IAAMC,IAAqBH,EAAII,0BAA0B,CAAA;;AAEzD,IAAIC;;AAESC,IAAAA,YAAaC;EACxB,KAAKF;IACHA,IAAUG,EAA6B;MACrCC,SAAS;QACPC,YAAYC;QACZ,qBAAqBC;;MAEvBC,iBAAiB,CAAE;MACnBC,eAAc;MACdC,wBAAmBC;MACnBb;;;EAIJ,IAAMc,IAAWN,EAAGO,eAAeC,WAAWZ,EAAWa;EACzD,IAAMC,IAAO,IAAItB,EACfQ,EAAWe,UACX,OACAL,GACAd,GACAE,GACAM,IACA;EAEF,KAAK,IAAMY,KAAQC,EAAoBH;IAAO,IAAIE,EAAKE,GAAGC,WAAW;MAAY,OAAOH;;;AAAI;;"}
1
+ {"version":3,"file":"vue-chunk.mjs","sources":["../../src/ts/transformers/vue.ts"],"sourcesContent":["import ts from 'typescript';\nimport type { VirtualCode } from '@vue/language-core';\nimport { forEachEmbeddedCode, getDefaultVueLanguagePlugins } from '@vue/language-core';\nimport * as vueCompilerDOM from '@vue/compiler-dom';\nimport * as vue from '@vue/language-core';\n\nlet VueVirtualCode: typeof vue.VueVirtualCode | undefined;\nif ('VueVirtualCode' in vue) {\n VueVirtualCode = vue.VueVirtualCode;\n} else if ('VueGeneratedCode' in vue) {\n VueVirtualCode = (vue as any).VueGeneratedCode;\n}\n\nconst vueCompilerOptions = vue.resolveVueCompilerOptions({});\n\nlet plugins: ReturnType<typeof getDefaultVueLanguagePlugins> | undefined;\n\nexport const transform = (sourceFile: ts.SourceFile): VirtualCode | undefined => {\n if (!VueVirtualCode) {\n return undefined;\n } else if (!plugins) {\n plugins = getDefaultVueLanguagePlugins({\n modules: {\n typescript: ts,\n '@vue/compiler-dom': vueCompilerDOM,\n },\n compilerOptions: {},\n globalTypesHolder: undefined,\n vueCompilerOptions,\n });\n }\n\n const snapshot = ts.ScriptSnapshot.fromString(sourceFile.getFullText());\n const root = new VueVirtualCode(\n sourceFile.fileName,\n 'vue',\n snapshot,\n vueCompilerOptions,\n plugins,\n ...([ts, false] as any as [typeof ts])\n );\n for (const code of forEachEmbeddedCode(root)) if (code.id.startsWith('script_')) return code;\n};\n"],"names":["VueVirtualCode","vue","VueGeneratedCode","vueCompilerOptions","resolveVueCompilerOptions","plugins","transform","sourceFile","getDefaultVueLanguagePlugins","modules","typescript","ts","vueCompilerDOM","compilerOptions","globalTypesHolder","undefined","snapshot","ScriptSnapshot","fromString","getFullText","root","fileName","code","forEachEmbeddedCode","id","startsWith"],"mappings":";;;;;;;;AAMA,IAAIA;;AACJ,IAAI,oBAAoBC;EACtBD,IAAiBC,EAAID;OAChB,IAAI,sBAAsBC;EAC/BD,IAAkBC,EAAYC;;;AAGhC,IAAMC,IAAqBF,EAAIG,0BAA0B,CAAA;;AAEzD,IAAIC;;AAESC,IAAAA,YAAaC;EACxB,KAAKP;IACH;SACK,KAAKK;IACVA,IAAUG,EAA6B;MACrCC,SAAS;QACPC,YAAYC;QACZ,qBAAqBC;;MAEvBC,iBAAiB,CAAE;MACnBC,wBAAmBC;MACnBZ;;;EAIJ,IAAMa,IAAWL,EAAGM,eAAeC,WAAWX,EAAWY;EACzD,IAAMC,IAAO,IAAIpB,EACfO,EAAWc,UACX,OACAL,GACAb,GACAE,MACI,EAACM,IAAI;EAEX,KAAK,IAAMW,KAAQC,EAAoBH;IAAO,IAAIE,EAAKE,GAAGC,WAAW;MAAY,OAAOH;;;AAAI;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gql.tada/cli-utils",
3
- "version": "1.2.1",
3
+ "version": "1.2.2-canary-babdc47d139f34efa7be031264892c9c6fefdb78",
4
4
  "public": true,
5
5
  "description": "Main logic for gql.tada’s CLI tool.",
6
6
  "author": "0no.co <hi@0no.co>",
@@ -53,10 +53,10 @@
53
53
  "dependencies": {
54
54
  "@0no-co/graphqlsp": "^1.10.3",
55
55
  "@vue/compiler-dom": "^3.4.23",
56
- "@vue/language-core": "^2.0.13",
56
+ "@vue/language-core": "^2.0.0",
57
57
  "graphql": "^16.8.1",
58
58
  "svelte2tsx": "^0.7.6",
59
- "@gql.tada/internal": "0.2.3"
59
+ "@gql.tada/internal": "0.2.4-canary-babdc47d139f34efa7be031264892c9c6fefdb78"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "typescript": "^5.0.0"