@intentius/chant-k8s-client 0.44.14 → 0.46.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-k8s-client",
3
- "version": "0.44.14",
3
+ "version": "0.46.0",
4
4
  "description": "Typed Kubernetes API client for chant — the read/write path of the k8s lexicon, kept out of the build path",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant/lexicons/k8s/api-client/",
@@ -43,7 +43,7 @@
43
43
  "prepack": "npm run build"
44
44
  },
45
45
  "dependencies": {
46
- "@kubernetes/client-node": "^1.4.0"
46
+ "@kubernetes/client-node": "^2.0.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "typescript": "^5.9.3"
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Loading the client must not print Node's `[DEP0040] punycode deprecated`
3
+ * warning (chant #1190). `@kubernetes/client-node` 1.x pulled `node-fetch@2`,
4
+ * whose `whatwg-url` requires the deprecated `punycode` builtin, so the very
5
+ * first `chant kube` command a newcomer ran started with a deprecation line.
6
+ * 2.0.0 moved the HTTP layer to undici and dropped node-fetch.
7
+ *
8
+ * The check runs in a fresh child process: warnings are emitted once per
9
+ * process, and vitest's own worker may already have loaded the module.
10
+ */
11
+
12
+ import { describe, test, expect } from "vitest";
13
+ import { spawnSync } from "node:child_process";
14
+ import { fileURLToPath } from "node:url";
15
+
16
+ describe("loading @kubernetes/client-node (#1190)", () => {
17
+ test("emits no punycode deprecation warning", () => {
18
+ const result = spawnSync(
19
+ process.execPath,
20
+ ["--input-type=module", "-e", 'await import("@kubernetes/client-node");'],
21
+ { cwd: fileURLToPath(new URL("..", import.meta.url)), encoding: "utf-8" },
22
+ );
23
+ expect(result.status).toBe(0);
24
+ expect(result.stderr).not.toMatch(/DEP0040|punycode/);
25
+ });
26
+ });