pluggable-codegen 0.4.0 → 0.5.1

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.
Files changed (56) hide show
  1. package/README.md +2 -2
  2. package/dist/_virtual/_rolldown/runtime.cjs +2 -4
  3. package/dist/_virtual/_rolldown/runtime.mjs +2 -3
  4. package/dist/cache.cjs +10 -7
  5. package/dist/cache.mjs +9 -5
  6. package/dist/cli.d.mts +1 -1
  7. package/dist/cli.mjs +6 -5
  8. package/dist/codegen.cjs +30 -54
  9. package/dist/codegen.d.cts +10 -0
  10. package/dist/codegen.d.mts +4 -8
  11. package/dist/codegen.mjs +25 -49
  12. package/dist/file.cjs +1 -3
  13. package/dist/file.d.cts +9 -0
  14. package/dist/file.d.mts +2 -5
  15. package/dist/file.mjs +1 -2
  16. package/dist/index.cjs +7 -5
  17. package/dist/index.d.cts +7 -0
  18. package/dist/index.d.mts +4 -2
  19. package/dist/index.mjs +2 -1
  20. package/dist/options.cjs +8 -8
  21. package/dist/options.mjs +7 -6
  22. package/dist/plugin.cjs +2 -3
  23. package/dist/plugin.d.cts +9 -0
  24. package/dist/plugin.d.mts +4 -8
  25. package/dist/plugin.mjs +1 -2
  26. package/dist/postprocessors/eslint.cjs +20 -0
  27. package/dist/postprocessors/eslint.d.cts +8 -0
  28. package/dist/postprocessors/eslint.d.mts +8 -0
  29. package/dist/postprocessors/eslint.mjs +20 -0
  30. package/dist/postprocessors/index.cjs +12 -0
  31. package/dist/postprocessors/index.d.cts +7 -0
  32. package/dist/postprocessors/index.d.mts +7 -0
  33. package/dist/postprocessors/index.mjs +12 -0
  34. package/dist/postprocessors/oxfmt.cjs +34 -0
  35. package/dist/postprocessors/oxfmt.d.cts +9 -0
  36. package/dist/postprocessors/oxfmt.d.mts +9 -0
  37. package/dist/postprocessors/oxfmt.mjs +34 -0
  38. package/dist/postprocessors/prettier.cjs +15 -0
  39. package/dist/postprocessors/prettier.d.cts +7 -0
  40. package/dist/postprocessors/prettier.d.mts +7 -0
  41. package/dist/postprocessors/prettier.mjs +15 -0
  42. package/dist/postprocessors/types.d.cts +9 -0
  43. package/dist/postprocessors/types.d.mts +9 -0
  44. package/dist/presets/graphql-codegen.cjs +2 -4
  45. package/dist/presets/graphql-codegen.d.cts +6 -0
  46. package/dist/presets/graphql-codegen.d.mts +2 -6
  47. package/dist/presets/graphql-codegen.mjs +2 -3
  48. package/dist/types.cjs +1 -3
  49. package/dist/types.d.cts +24 -0
  50. package/dist/types.d.mts +11 -23
  51. package/dist/types.mjs +1 -2
  52. package/dist/utils.cjs +1 -3
  53. package/dist/utils.mjs +1 -2
  54. package/package.json +53 -42
  55. package/dist/oxfmt.cjs +0 -24
  56. package/dist/oxfmt.mjs +0 -23
package/package.json CHANGED
@@ -1,15 +1,11 @@
1
1
  {
2
2
  "name": "pluggable-codegen",
3
- "version": "0.4.0",
4
- "license": "MIT",
3
+ "version": "0.5.1",
5
4
  "homepage": "https://github.com/jahudka/pluggable-codegen",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/jahudka/pluggable-codegen.git"
9
- },
10
5
  "bugs": {
11
6
  "url": "https://github.com/jahudka/pluggable-codegen/issues"
12
7
  },
8
+ "license": "MIT",
13
9
  "maintainers": [
14
10
  {
15
11
  "name": "Eliška Daniela Kaderová",
@@ -17,35 +13,63 @@
17
13
  "url": "https://github.com/jahudka"
18
14
  }
19
15
  ],
20
- "files": [
21
- "dist"
22
- ],
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/jahudka/pluggable-codegen.git"
19
+ },
23
20
  "bin": {
24
21
  "pluggable-codegen": "dist/cli.mjs"
25
22
  },
23
+ "files": [
24
+ "dist"
25
+ ],
26
26
  "type": "module",
27
- "types": "./dist/index.d.ts",
27
+ "sideEffects": false,
28
28
  "main": "./dist/index.cjs",
29
29
  "module": "./dist/index.mjs",
30
+ "types": "./dist/index.d.mts",
30
31
  "exports": {
31
32
  ".": {
32
- "types": "./dist/index.d.ts",
33
- "require": "./dist/index.cjs",
34
- "import": "./dist/index.mjs"
33
+ "types": {
34
+ "require": "./dist/index.d.cts",
35
+ "import": "./dist/index.d.mts"
36
+ },
37
+ "default": {
38
+ "require": "./dist/index.cjs",
39
+ "import": "./dist/index.mjs"
40
+ }
35
41
  },
36
42
  "./presets/*": {
37
- "types": "./dist/presets/*.d.ts",
38
- "require": "./dist/presets/*.cjs",
39
- "import": "./dist/presets/*.mjs"
43
+ "types": {
44
+ "require": "./dist/presets/*.d.cts",
45
+ "import": "./dist/presets/*.d.mts"
46
+ },
47
+ "default": {
48
+ "require": "./dist/presets/*.cjs",
49
+ "import": "./dist/presets/*.mjs"
50
+ }
40
51
  }
41
52
  },
42
53
  "dependencies": {
43
- "picomatch": "^4.0.4",
44
- "tinyglobby": "^0.2.16"
54
+ "picomatch": "^4.0.7",
55
+ "tinyglobby": "^0.2.17"
56
+ },
57
+ "devDependencies": {
58
+ "@graphql-codegen/cli": "^7.4.6",
59
+ "@types/node": "^24.19.2",
60
+ "@types/picomatch": "^4.0.3",
61
+ "eslint": "^10.13.0",
62
+ "oxfmt": "^0.75.0",
63
+ "oxlint": "^1.90.0",
64
+ "prettier": "^3.9.10",
65
+ "publint": "^0.3.25",
66
+ "tsdown": "^0.23.2",
67
+ "typescript": "^6.0.3",
68
+ "yaml": "^2.9.1"
45
69
  },
46
70
  "peerDependencies": {
47
71
  "@graphql-codegen/cli": "^5.0.0 || ^6.0.0 || ^7.0.0",
48
- "yaml": "^2.9.0"
72
+ "yaml": "^2.9.1"
49
73
  },
50
74
  "peerDependenciesMeta": {
51
75
  "@graphql-codegen/cli": {
@@ -55,31 +79,18 @@
55
79
  "optional": true
56
80
  }
57
81
  },
58
- "devDependencies": {
59
- "@eslint/js": "^10.0.1",
60
- "@graphql-codegen/cli": "^7.0.0",
61
- "@types/node": "^22.19.19",
62
- "@types/picomatch": "^4.0.3",
63
- "eslint": "^10.4.0",
64
- "eslint-config-prettier": "^10.1.8",
65
- "eslint-plugin-simple-import-sort": "^13.0.0",
66
- "eslint-plugin-unused-imports": "^4.4.1",
67
- "globals": "^17.6.0",
68
- "oxfmt": "^0.63.0",
69
- "prettier": "^3.8.3",
70
- "tsdown": "^0.22.0",
71
- "typescript": "^6.0.3",
72
- "typescript-eslint": "^8.59.3",
73
- "yaml": "^2.9.0"
82
+ "engines": {
83
+ "node": ">=24"
74
84
  },
75
85
  "scripts": {
76
86
  "clean": "rm -rf dist",
77
- "eslint": "eslint .",
78
- "eslint:fix": "eslint --fix .",
79
- "prettier": "prettier --check .",
80
- "prettier:fix": "prettier --write .",
81
- "lint": "pnpm run '/^(eslint|prettier)$/'",
82
- "format": "pnpm run --sequential '/^(eslint|prettier):fix$/'",
83
- "build": "tsc && tsdown"
87
+ "oxlint": "oxlint",
88
+ "oxlint:fix": "oxlint --fix",
89
+ "oxfmt": "oxfmt --check",
90
+ "oxfmt:fix": "oxfmt --write",
91
+ "lint": "pnpm run '/^(oxlint|oxfmt)$/'",
92
+ "format": "pnpm run --sequential '/^(oxlint|oxfmt):fix$/'",
93
+ "build": "tsc && tsdown",
94
+ "publint": "publint"
84
95
  }
85
96
  }
package/dist/oxfmt.cjs DELETED
@@ -1,24 +0,0 @@
1
- const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
2
- const require_utils = require('./utils.cjs');
3
- let node_fs_promises = require("node:fs/promises");
4
- let node_path = require("node:path");
5
-
6
- //#region src/oxfmt.ts
7
- const candidates = [".oxfmtrc.json"];
8
- const cache = /* @__PURE__ */ new Map();
9
- async function resolveOxfmtConfig(from) {
10
- const dir = (0, node_path.dirname)(from);
11
- const cached = cache.get(dir);
12
- if (cached) return cached;
13
- const { promise, resolve } = Promise.withResolvers();
14
- cache.set(dir, promise);
15
- resolve(await require_utils.lookupPath(dir, candidates, loadConfig));
16
- return promise;
17
- }
18
- async function loadConfig(file) {
19
- const contents = await (0, node_fs_promises.readFile)(file, "utf-8");
20
- return JSON.parse(contents);
21
- }
22
-
23
- //#endregion
24
- exports.resolveOxfmtConfig = resolveOxfmtConfig;
package/dist/oxfmt.mjs DELETED
@@ -1,23 +0,0 @@
1
- import { lookupPath } from "./utils.mjs";
2
- import { readFile } from "node:fs/promises";
3
- import { dirname } from "node:path";
4
-
5
- //#region src/oxfmt.ts
6
- const candidates = [".oxfmtrc.json"];
7
- const cache = /* @__PURE__ */ new Map();
8
- async function resolveOxfmtConfig(from) {
9
- const dir = dirname(from);
10
- const cached = cache.get(dir);
11
- if (cached) return cached;
12
- const { promise, resolve } = Promise.withResolvers();
13
- cache.set(dir, promise);
14
- resolve(await lookupPath(dir, candidates, loadConfig));
15
- return promise;
16
- }
17
- async function loadConfig(file) {
18
- const contents = await readFile(file, "utf-8");
19
- return JSON.parse(contents);
20
- }
21
-
22
- //#endregion
23
- export { resolveOxfmtConfig };