platformdirs 4.3.6-rc1 → 4.3.7
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/README.md +6 -4
- package/dist/main.js +0 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -54,9 +54,9 @@ npm install platformdirs
|
|
|
54
54
|
import * as fs from "node:fs/promises";
|
|
55
55
|
import * as path from "node:path";
|
|
56
56
|
import * as stream from "node:stream";
|
|
57
|
-
import
|
|
57
|
+
import { userCacheDir } from "platformdirs";
|
|
58
58
|
|
|
59
|
-
const cacheDir =
|
|
59
|
+
const cacheDir = userCacheDir("awesome-app", "octocat", "1.2")
|
|
60
60
|
const bigCSVPath = path.join(cacheDir, "big.csv");
|
|
61
61
|
if (!fs.existsSync(bigCSVPath)) {
|
|
62
62
|
const response = await fetch("https://example.com/big.csv");
|
|
@@ -66,6 +66,8 @@ if (!fs.existsSync(bigCSVPath)) {
|
|
|
66
66
|
|
|
67
67
|
📚 For more information check out [the documentation](https://jsdocs.io/package/platformdirs)
|
|
68
68
|
|
|
69
|
+
You can quickly dump all the directories for the current environment by running the included `platformdirs` CLI command. This is helpful for quickly determining what `dirs.userConfigDir` and friends return.
|
|
70
|
+
|
|
69
71
|
```sh
|
|
70
72
|
npx platformdirs
|
|
71
73
|
```
|
|
@@ -73,7 +75,7 @@ npx platformdirs
|
|
|
73
75
|
<details><summary>Output on Windows</summary>
|
|
74
76
|
|
|
75
77
|
```
|
|
76
|
-
|
|
78
|
+
TODO
|
|
77
79
|
```
|
|
78
80
|
|
|
79
81
|
</details>
|
|
@@ -81,7 +83,7 @@ npx platformdirs
|
|
|
81
83
|
<details><summary>Output on macOS</summary>
|
|
82
84
|
|
|
83
85
|
```
|
|
84
|
-
|
|
86
|
+
TODO
|
|
85
87
|
```
|
|
86
88
|
|
|
87
89
|
</details>
|
package/dist/main.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "platformdirs",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.7",
|
|
4
4
|
"description": "📂 Unified interface to get platform-specific directories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nodejs",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"known-folders",
|
|
14
14
|
"platformdirs"
|
|
15
15
|
],
|
|
16
|
-
"homepage": "https://
|
|
16
|
+
"homepage": "https://jsdocs.io/package/platformdirs",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "git+https://github.com/jcbhmr/platformdirs.js.git"
|
|
@@ -32,13 +32,16 @@
|
|
|
32
32
|
"bin": {
|
|
33
33
|
"platformdirs": "dist/main.js"
|
|
34
34
|
},
|
|
35
|
-
"files": [
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
36
38
|
"scripts": {
|
|
37
39
|
"build": "tsc --noCheck",
|
|
38
40
|
"format": "biome format --write .",
|
|
39
41
|
"lint": "biome check --write . && tsc --noEmit",
|
|
40
42
|
"run": "tsx src/main.ts",
|
|
41
|
-
"test": "tsx --test"
|
|
43
|
+
"test": "tsx --test",
|
|
44
|
+
"prepack": "npm run build"
|
|
42
45
|
},
|
|
43
46
|
"devDependencies": {
|
|
44
47
|
"@biomejs/biome": "1.9.4",
|