@graphql-markdown/core 1.25.0 → 1.26.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,KAAK,EACL,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,uDAAuD;AACvD,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IACrC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAChC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3B,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAgDD;;GAEG;AACH,eAAO,MAAM,uBAAuB,WAC1B,IAAI,CACV,eAAe,EACf,SAAS,GAAG,gBAAgB,GAAG,WAAW,GAAG,SAAS,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ACH,eAAO,MAAM,uBAAuB,WAC1B,IAAI,CACV,eAAe,EACf,SAAS,GAAG,gBAAgB,GAAG,WAAW,GAAG,SAAS,CACvD,KACA,gBASF,CAAC;AA0BF;;;GAGG;AACH,eAAO,MAAM,eAAe,WAClB,eAAe,KACtB,OAAO,CAAC,IAAI,CAoCd,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,WACnB,gBAAgB,KACvB,OAAO,CAAC,IAAI,CAqCd,CAAC"}
package/dist/telemetry.js CHANGED
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reportGeneration = exports.reportTelemetry = exports.resolveTelemetryContext = void 0;
4
2
  /**
5
3
  * Anonymous usage telemetry hook for `buildConfig`.
6
4
  *
@@ -8,7 +6,9 @@ exports.reportGeneration = exports.reportTelemetry = exports.resolveTelemetryCon
8
6
  *
9
7
  * @module telemetry
10
8
  */
11
- const node_module_1 = require("node:module");
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.reportGeneration = exports.reportTelemetry = exports.resolveTelemetryContext = void 0;
11
+ const version_ts_1 = require("./version.js");
12
12
  /** In-flight config event, awaited before the generate event is sent. */
13
13
  let pending = Promise.resolve();
14
14
  /** Fingerprints already reported by this process. */
@@ -61,15 +61,6 @@ const fingerprintOf = (report) => {
61
61
  return typeof value === "function" ? "<function>" : value;
62
62
  });
63
63
  };
64
- const readVersion = () => {
65
- try {
66
- const pkg = (0, node_module_1.createRequire)(__filename)("../package.json");
67
- return pkg.version ?? "unknown";
68
- }
69
- catch {
70
- return "unknown";
71
- }
72
- };
73
64
  const readGraphqlMajor = async () => {
74
65
  try {
75
66
  const { versionInfo } = await import("graphql");
@@ -101,7 +92,7 @@ const reportTelemetry = async (report) => {
101
92
  trigger: report.trigger ?? "programmatic",
102
93
  option,
103
94
  pkg: "@graphql-markdown/core",
104
- pkgVersion: readVersion(),
95
+ pkgVersion: version_ts_1.VERSION,
105
96
  graphqlMajor: await readGraphqlMajor(),
106
97
  config: { ...report.extension, ...report.configFileOpts },
107
98
  cli: report.cliOpts ?? undefined,
@@ -148,7 +139,7 @@ const reportGeneration = async (report) => {
148
139
  trigger: trigger ?? "programmatic",
149
140
  option,
150
141
  pkg: "@graphql-markdown/core",
151
- pkgVersion: readVersion(),
142
+ pkgVersion: version_ts_1.VERSION,
152
143
  graphqlMajor: await readGraphqlMajor(),
153
144
  pages: report.pages,
154
145
  durationMs: report.durationMs,
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Package version, kept as a constant (no runtime `package.json` lookup) for ESM/JSR compatibility.
3
+ * A unit test asserts it matches `package.json`.
4
+ */
5
+ export declare const VERSION: string;
6
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,MAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VERSION = void 0;
4
+ /**
5
+ * Package version, kept as a constant (no runtime `package.json` lookup) for ESM/JSR compatibility.
6
+ * A unit test asserts it matches `package.json`.
7
+ */
8
+ exports.VERSION = "1.26.0";
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@graphql-markdown/core",
3
3
  "homepage": "https://graphql-markdown.dev",
4
- "description": "GraphQL-Markdown core package for generating Markdown documentation from a GraphQL schema.",
4
+ "description": "Core of GraphQL-Markdown: generates Markdown documentation from a GraphQL schema.",
5
5
  "bugs": {
6
6
  "url": "https://github.com/graphql-markdown/graphql-markdown/issues"
7
7
  },
8
- "version": "1.25.0",
8
+ "version": "1.26.0",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
@@ -62,8 +62,8 @@
62
62
  "build": "tsgo --build",
63
63
  "lint": "eslint --config ../../packages/tooling-config/eslint/config.ts \"{src,tests}/**/*.{ts,js,json,gql}\"",
64
64
  "lint:fix": "eslint --config ../../packages/tooling-config/eslint/config.ts \"{src,tests}/**/*.{ts,js,json,gql}\" --fix",
65
- "prettier": "prettier \"{src,tests,assets}/**/*.{ts,js,json,md,gql}\" --check",
66
- "prettier:fix": "prettier \"{src,tests,assets}/**/*.{ts,js,json,md,gql}\" --write",
65
+ "prettier": "prettier \"{src,tests,assets}/**/*.{ts,js,json,md,gql}\" README.md --check",
66
+ "prettier:fix": "prettier \"{src,tests,assets}/**/*.{ts,js,json,md,gql}\" README.md --write",
67
67
  "ts:check": "tsgo --noEmit",
68
68
  "test": "vitest run --passWithNoTests",
69
69
  "test:unit": "vitest run --passWithNoTests tests/unit",
@@ -72,22 +72,22 @@
72
72
  "test:watch": "vitest --watch"
73
73
  },
74
74
  "dependencies": {
75
- "@fastify/deepmerge": "^3.2.2",
76
- "@graphql-markdown/graphql": "^1.3.3",
77
- "@graphql-markdown/logger": "^1.1.3",
78
- "@graphql-markdown/printer-legacy": "^1.19.2",
79
- "@graphql-markdown/telemetry": "^0.1.0",
80
- "@graphql-markdown/types": "^1.17.0",
81
- "@graphql-markdown/utils": "^1.14.0"
75
+ "@fastify/deepmerge": "^3.2.4",
76
+ "@graphql-markdown/graphql": "^1.3.4",
77
+ "@graphql-markdown/logger": "^1.1.4",
78
+ "@graphql-markdown/printer-legacy": "^1.19.3",
79
+ "@graphql-markdown/telemetry": "^0.1.1",
80
+ "@graphql-markdown/types": "^1.17.1",
81
+ "@graphql-markdown/utils": "^1.14.1"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@graphql-markdown/tooling-config": "^1.0.0"
85
85
  },
86
86
  "peerDependencies": {
87
- "@graphql-markdown/diff": "^1.1.22",
88
- "@graphql-markdown/helpers": "^1.2.3",
87
+ "@graphql-markdown/diff": "^1.1.23",
88
+ "@graphql-markdown/helpers": "^1.2.4",
89
89
  "graphql": "^16.0.0 || ^17.0.0",
90
- "graphql-config": "5.1.6"
90
+ "graphql-config": "^5.1.8 || ^6.0.0"
91
91
  },
92
92
  "peerDependenciesMeta": {
93
93
  "@graphql-markdown/diff": {
@@ -104,7 +104,7 @@
104
104
  "test": "tests"
105
105
  },
106
106
  "engines": {
107
- "node": ">=22.12.0"
107
+ "node": ">=22.18.0"
108
108
  },
109
109
  "publishConfig": {
110
110
  "access": "public"