@photostructure/fs-metadata 0.9.0 → 1.0.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 +9 -0
- package/README.md +7 -7
- package/binding.gyp +36 -32
- package/claude.sh +4 -1
- package/package.json +11 -11
- package/prebuilds/darwin-arm64/@photostructure+fs-metadata.glibc.node +0 -0
- package/prebuilds/darwin-x64/@photostructure+fs-metadata.glibc.node +0 -0
- package/prebuilds/linux-arm64/@photostructure+fs-metadata.glibc.node +0 -0
- package/prebuilds/linux-arm64/@photostructure+fs-metadata.musl.node +0 -0
- package/prebuilds/linux-x64/@photostructure+fs-metadata.glibc.node +0 -0
- package/prebuilds/linux-x64/@photostructure+fs-metadata.musl.node +0 -0
- package/prebuilds/win32-arm64/@photostructure+fs-metadata.glibc.node +0 -0
- package/prebuilds/win32-x64/@photostructure+fs-metadata.glibc.node +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,15 @@ Fixed for any bug fixes.
|
|
|
14
14
|
Security in case of vulnerabilities.
|
|
15
15
|
-->
|
|
16
16
|
|
|
17
|
+
## 1.0.0 - 2026-02-23
|
|
18
|
+
|
|
19
|
+
### Security
|
|
20
|
+
|
|
21
|
+
- Windows: add `/NXCOMPAT` (DEP) and `/HIGHENTROPYVA` (x64 high-entropy ASLR) linker flags
|
|
22
|
+
- Windows: add `WarningLevel: 4` as structured MSBuild property on x64 and ARM64 targets (avoids `/W` flag ordering conflicts with node-gyp defaults)
|
|
23
|
+
- Linux/macOS: add `-D_FORTIFY_SOURCE=2` and `-Wformat-security` compiler flags
|
|
24
|
+
- Linux x64: add `-fcf-protection=full` (Intel CET); Linux ARM64: add `-mbranch-protection=standard` (PAC+BTI)
|
|
25
|
+
|
|
17
26
|
## 0.9.0 - 2025-12-28
|
|
18
27
|
|
|
19
28
|
### Added
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<img src="https://raw.githubusercontent.com/photostructure/fs-metadata/main/doc/logo.svg" alt="PhotoStructure fs-metadata logo" width="200">
|
|
2
2
|
|
|
3
3
|
Cross-platform native Node.js module for filesystem metadata, mount points, and volume information. Built for and supported by [PhotoStructure](https://photostructure.com).
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ Cross-platform native Node.js module for filesystem metadata, mount points, and
|
|
|
7
7
|
[](https://nodejs.org/dist/latest/docs/api/n-api.html#node-api-version-matrix)
|
|
8
8
|
[](https://github.com/photostructure/fs-metadata)
|
|
9
9
|
|
|
10
|
-
## Quick
|
|
10
|
+
## Quick start
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
13
|
npm install @photostructure/fs-metadata
|
|
@@ -28,14 +28,14 @@ const metadata = await getVolumeMetadata("/");
|
|
|
28
28
|
console.log(metadata);
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Features
|
|
32
32
|
|
|
33
|
-
- **Volume
|
|
34
|
-
- **Hidden
|
|
33
|
+
- **Volume management**: List mount points, get volume metadata, space usage
|
|
34
|
+
- **Hidden files**: Get/set hidden attributes, recursive checks, cross-platform support
|
|
35
35
|
- **Performance**: Non-blocking async operations with timeout protection
|
|
36
|
-
- **TypeScript**:
|
|
36
|
+
- **TypeScript**: Type definitions with ESM and CommonJS support
|
|
37
37
|
|
|
38
|
-
## Supported
|
|
38
|
+
## Supported platforms
|
|
39
39
|
|
|
40
40
|
| Platform | Architecture | Node.js | OS Version |
|
|
41
41
|
| ------------- | ------------ | ------- | ------------------------- |
|
package/binding.gyp
CHANGED
|
@@ -32,14 +32,32 @@
|
|
|
32
32
|
],
|
|
33
33
|
"cflags": [
|
|
34
34
|
"-fPIC",
|
|
35
|
-
"-fstack-protector-strong"
|
|
35
|
+
"-fstack-protector-strong",
|
|
36
|
+
"-D_FORTIFY_SOURCE=2",
|
|
37
|
+
"-Wformat-security"
|
|
36
38
|
],
|
|
37
39
|
"cflags_cc": [
|
|
38
40
|
"-fexceptions",
|
|
39
41
|
"-fPIC",
|
|
40
|
-
"-fstack-protector-strong"
|
|
42
|
+
"-fstack-protector-strong",
|
|
43
|
+
"-D_FORTIFY_SOURCE=2",
|
|
44
|
+
"-Wformat-security"
|
|
41
45
|
],
|
|
42
46
|
"conditions": [
|
|
47
|
+
[
|
|
48
|
+
"target_arch=='x64'",
|
|
49
|
+
{
|
|
50
|
+
"cflags": ["-fcf-protection=full"],
|
|
51
|
+
"cflags_cc": ["-fcf-protection=full"]
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
"target_arch=='arm64'",
|
|
56
|
+
{
|
|
57
|
+
"cflags": ["-mbranch-protection=standard"],
|
|
58
|
+
"cflags_cc": ["-mbranch-protection=standard"]
|
|
59
|
+
}
|
|
60
|
+
],
|
|
43
61
|
[
|
|
44
62
|
"enable_gio=='true'",
|
|
45
63
|
{
|
|
@@ -88,6 +106,7 @@
|
|
|
88
106
|
],
|
|
89
107
|
"msvs_settings": {
|
|
90
108
|
"VCCLCompilerTool": {
|
|
109
|
+
"WarningLevel": 4,
|
|
91
110
|
"AdditionalOptions": [
|
|
92
111
|
"/Qspectre",
|
|
93
112
|
"/guard:cf",
|
|
@@ -101,6 +120,8 @@
|
|
|
101
120
|
"AdditionalOptions": [
|
|
102
121
|
"/guard:cf",
|
|
103
122
|
"/DYNAMICBASE",
|
|
123
|
+
"/HIGHENTROPYVA",
|
|
124
|
+
"/NXCOMPAT",
|
|
104
125
|
"/CETCOMPAT"
|
|
105
126
|
]
|
|
106
127
|
}
|
|
@@ -118,6 +139,7 @@
|
|
|
118
139
|
],
|
|
119
140
|
"msvs_settings": {
|
|
120
141
|
"VCCLCompilerTool": {
|
|
142
|
+
"WarningLevel": 4,
|
|
121
143
|
"AdditionalOptions": [
|
|
122
144
|
"/guard:cf", # Control Flow Guard (supported on ARM64)
|
|
123
145
|
"/ZH:SHA_256", # SHA-256 hash algorithm for checksums
|
|
@@ -133,38 +155,14 @@
|
|
|
133
155
|
"VCLinkerTool": {
|
|
134
156
|
"AdditionalOptions": [
|
|
135
157
|
"/guard:cf", # Control Flow Guard at link time
|
|
136
|
-
"/DYNAMICBASE"
|
|
137
|
-
#
|
|
158
|
+
"/DYNAMICBASE", # ASLR (Address Space Layout Randomization)
|
|
159
|
+
"/NXCOMPAT" # DEP (Data Execution Prevention)
|
|
160
|
+
# NOTE: /HIGHENTROPYVA and /CETCOMPAT are x64-specific
|
|
138
161
|
# ARM64 has equivalent hardware security features
|
|
139
162
|
]
|
|
140
163
|
}
|
|
141
164
|
}
|
|
142
165
|
}
|
|
143
|
-
],
|
|
144
|
-
[
|
|
145
|
-
"target_arch=='ia32'",
|
|
146
|
-
{
|
|
147
|
-
"defines": [
|
|
148
|
-
"_M_IX86"
|
|
149
|
-
],
|
|
150
|
-
"msvs_settings": {
|
|
151
|
-
"VCCLCompilerTool": {
|
|
152
|
-
"AdditionalOptions": [
|
|
153
|
-
"/guard:cf",
|
|
154
|
-
"/ZH:SHA_256",
|
|
155
|
-
"/sdl"
|
|
156
|
-
],
|
|
157
|
-
"ExceptionHandling": 1,
|
|
158
|
-
"RuntimeTypeInfo": "true"
|
|
159
|
-
},
|
|
160
|
-
"VCLinkerTool": {
|
|
161
|
-
"AdditionalOptions": [
|
|
162
|
-
"/guard:cf",
|
|
163
|
-
"/DYNAMICBASE"
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
166
|
]
|
|
169
167
|
]
|
|
170
168
|
}
|
|
@@ -183,17 +181,23 @@
|
|
|
183
181
|
"CLANG_CXX_LIBRARY": "libc++",
|
|
184
182
|
"MACOSX_DEPLOYMENT_TARGET": "10.15",
|
|
185
183
|
"OTHER_CFLAGS": [
|
|
186
|
-
"-fstack-protector-strong"
|
|
184
|
+
"-fstack-protector-strong",
|
|
185
|
+
"-D_FORTIFY_SOURCE=2",
|
|
186
|
+
"-Wformat-security"
|
|
187
187
|
]
|
|
188
188
|
},
|
|
189
189
|
"cflags": [
|
|
190
190
|
"-fexceptions",
|
|
191
191
|
"-fPIC",
|
|
192
|
-
"-fstack-protector-strong"
|
|
192
|
+
"-fstack-protector-strong",
|
|
193
|
+
"-D_FORTIFY_SOURCE=2",
|
|
194
|
+
"-Wformat-security"
|
|
193
195
|
],
|
|
194
196
|
"cflags_cc": [
|
|
195
197
|
"-fexceptions",
|
|
196
|
-
"-fstack-protector-strong"
|
|
198
|
+
"-fstack-protector-strong",
|
|
199
|
+
"-D_FORTIFY_SOURCE=2",
|
|
200
|
+
"-Wformat-security"
|
|
197
201
|
],
|
|
198
202
|
"link_settings": {
|
|
199
203
|
"libraries": [
|
package/claude.sh
CHANGED
|
@@ -12,7 +12,10 @@ claude --append-system-prompt "$(
|
|
|
12
12
|
# MANDATORY GUIDELINES
|
|
13
13
|
- **Study your CLAUDE.md** - Every conversation begins by studying CLAUDE.md
|
|
14
14
|
- **Always Start By Reading** - You must study the referenced codebase and related documentation before making any change. NEVER assume APIs or implementation details.
|
|
15
|
-
- **Assume Concurrent Edits** -
|
|
15
|
+
- **Assume Concurrent Edits** - if you encounter a compilation error that you don't think you caused, **STOP immediately**, do not try to fix it blindly, **describe the error** to the user clearly, and **use AskUserQuestion** with these options:
|
|
16
|
+
- "Build is now fixed, continue"
|
|
17
|
+
- "Please fix the build and then continue"
|
|
18
|
+
|
|
16
19
|
- **Validate your work** - Does your code compile? Can we clean up compilation warnings? Do the related tests pass?
|
|
17
20
|
- **Don't use git checkout to undo changes** - Instead, re-apply your diff in reverse. You have to assume that the git tree was not clean when you made edits.
|
|
18
21
|
- **Ask questions** - If anything is nebulous or unclear, it is IMPERATIVE that you ask clarifying questions to maximize velocity and avoid spurious work.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@photostructure/fs-metadata",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Cross-platform native filesystem metadata retrieval for Node.js",
|
|
5
5
|
"homepage": "https://photostructure.github.io/fs-metadata/",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -96,29 +96,29 @@
|
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@types/jest": "^30.0.0",
|
|
99
|
-
"@types/node": "^25.0
|
|
99
|
+
"@types/node": "^25.3.0",
|
|
100
100
|
"@types/semver": "^7.7.1",
|
|
101
101
|
"cross-env": "^10.1.0",
|
|
102
102
|
"del-cli": "^7.0.0",
|
|
103
103
|
"eslint": "9.39.1",
|
|
104
|
-
"eslint-plugin-regexp": "^
|
|
105
|
-
"eslint-plugin-security": "^
|
|
106
|
-
"globals": "^
|
|
104
|
+
"eslint-plugin-regexp": "^3.0.0",
|
|
105
|
+
"eslint-plugin-security": "^4.0.0",
|
|
106
|
+
"globals": "^17.3.0",
|
|
107
107
|
"jest": "^30.2.0",
|
|
108
108
|
"jest-environment-node": "^30.2.0",
|
|
109
109
|
"jest-extended": "^7.0.0",
|
|
110
|
-
"node-gyp": "^12.
|
|
111
|
-
"npm-check-updates": "^19.
|
|
110
|
+
"node-gyp": "^12.2.0",
|
|
111
|
+
"npm-check-updates": "^19.4.1",
|
|
112
112
|
"npm-run-all2": "8.0.4",
|
|
113
113
|
"prebuildify": "^6.0.1",
|
|
114
|
-
"prettier": "^3.
|
|
114
|
+
"prettier": "^3.8.1",
|
|
115
115
|
"prettier-plugin-organize-imports": "4.3.0",
|
|
116
|
-
"terser": "^5.
|
|
116
|
+
"terser": "^5.46.0",
|
|
117
117
|
"ts-jest": "^29.4.6",
|
|
118
118
|
"tsup": "^8.5.1",
|
|
119
119
|
"tsx": "^4.21.0",
|
|
120
|
-
"typedoc": "^0.28.
|
|
120
|
+
"typedoc": "^0.28.17",
|
|
121
121
|
"typescript": "^5.9.3",
|
|
122
|
-
"typescript-eslint": "^8.
|
|
122
|
+
"typescript-eslint": "^8.56.1"
|
|
123
123
|
}
|
|
124
124
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|