pivotkit-node 0.1.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ All notable changes to `pivotkit-node` are documented in this file. The format i
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.0] - 2026-11-26
10
+
11
+ ### Changed
12
+
13
+ - Depends on `pivotkit-core` `^0.11.0`, `pivotkit-report` `^0.7.0` and `pivotkit-xlsx` `^0.8.0`.
14
+
15
+ ### Fixed
16
+
17
+ - `EISDIR` from `link()` counts as "no hard links", so `writeNew` and `writeSafe` with `exclusive`
18
+ write in place. libuv reports Windows' `ERROR_INVALID_FUNCTION` as `EISDIR`, the error reported for
19
+ hard links on FAT and exFAT. This was not tested on Windows.
20
+
9
21
  ## [0.1.0] - 2026-11-24
10
22
 
11
23
  ### Added
@@ -20,5 +32,6 @@ All notable changes to `pivotkit-node` are documented in this file. The format i
20
32
  which codes may work again.
21
33
  - `CliError` extends `CodedError` of `pivotkit-core/internal`.
22
34
 
23
- [Unreleased]: https://github.com/eizedev/pivotkit/compare/pivotkit-node@0.1.0...HEAD
35
+ [Unreleased]: https://github.com/eizedev/pivotkit/compare/pivotkit-node@0.2.0...HEAD
36
+ [0.2.0]: https://github.com/eizedev/pivotkit/compare/pivotkit-node@0.1.0...pivotkit-node@0.2.0
24
37
  [0.1.0]: https://github.com/eizedev/pivotkit/releases/tag/pivotkit-node@0.1.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pivotkit-node",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Internal to pivotkit: the Node.js file handling, REST contract and network readings that the pivotkit command line and pivotkit-server share. Use pivotkit-cli/files and pivotkit-cli/rest instead.",
5
5
  "license": "MIT",
6
6
  "author": "eizedev <oss@eize.dev>",
@@ -48,9 +48,9 @@
48
48
  "prepack": "npm run types && node -e \"require('node:fs').copyFileSync('../../LICENSE', 'LICENSE')\""
49
49
  },
50
50
  "dependencies": {
51
- "pivotkit-core": "^0.10.0",
52
- "pivotkit-report": "^0.6.0",
53
- "pivotkit-xlsx": "^0.7.0"
51
+ "pivotkit-core": "^0.11.0",
52
+ "pivotkit-report": "^0.7.0",
53
+ "pivotkit-xlsx": "^0.8.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/node": "24.19.2"
package/src/safe-files.js CHANGED
@@ -34,9 +34,13 @@ import { CliError, printable, shortName } from "./errors.js";
34
34
  /** The calls tests replace: a file system without hard links, a temporary file that cannot be removed. */
35
35
  export const fileMeans = { link, unlink };
36
36
 
37
- /** The codes of link() where a file system has no hard links (FAT, exFAT, some SMB and FUSE mounts). */
38
- /** @type {ReadonlySet<string>} */
39
- export const NO_HARD_LINKS = new Set(["EPERM", "ENOTSUP", "EOPNOTSUPP", "ENOSYS", "EXDEV", "EMLINK"]);
37
+ /**
38
+ * The codes of link() where a file system has no hard links (FAT, exFAT, some SMB and FUSE mounts).
39
+ * On Windows, libuv reports ERROR_INVALID_FUNCTION as EISDIR (src/win/error.c), the error
40
+ * CreateHardLinkW is reported to give on FAT and exFAT (not measured here).
41
+ * @type {ReadonlySet<string>}
42
+ */
43
+ export const NO_HARD_LINKS = new Set(["EPERM", "ENOTSUP", "EOPNOTSUPP", "ENOSYS", "EXDEV", "EMLINK", "EISDIR"]);
40
44
 
41
45
  const READ_FLAGS = constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0);
42
46
 
@@ -4,8 +4,12 @@ export declare const fileMeans: {
4
4
  link: typeof link;
5
5
  unlink: typeof unlink;
6
6
  };
7
- /** The codes of link() where a file system has no hard links (FAT, exFAT, some SMB and FUSE mounts). */
8
- /** @type {ReadonlySet<string>} */
7
+ /**
8
+ * The codes of link() where a file system has no hard links (FAT, exFAT, some SMB and FUSE mounts).
9
+ * On Windows, libuv reports ERROR_INVALID_FUNCTION as EISDIR (src/win/error.c), the error
10
+ * CreateHardLinkW is reported to give on FAT and exFAT (not measured here).
11
+ * @type {ReadonlySet<string>}
12
+ */
9
13
  export declare const NO_HARD_LINKS: ReadonlySet<string>;
10
14
  /** True when `real` is `dir` or lies inside it (both real paths). */
11
15
  export declare function isInside(real: any, dir: any): boolean;