view-ignored 0.8.0 → 0.9.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/README.md +21 -19
- package/out/browser_stream.d.ts +1 -1
- package/out/patterns/gitignore.js +10 -3
- package/out/patterns/jsrjson.js +9 -5
- package/out/patterns/matcherStream.d.ts +1 -1
- package/out/patterns/packagejson.js +16 -12
- package/out/patterns/pattern.d.ts +5 -0
- package/out/patterns/patternMatcher.d.ts +2 -2
- package/out/patterns/resolveSources.js +3 -6
- package/out/patterns/signedPattern.d.ts +8 -37
- package/out/patterns/signedPattern.js +21 -64
- package/out/patterns/source.d.ts +2 -2
- package/out/patterns/source.js +3 -4
- package/out/patterns/stringCompile.js +3 -1
- package/out/targets/bun.d.ts +5 -0
- package/out/targets/bun.js +123 -0
- package/out/targets/deno.d.ts +5 -0
- package/out/targets/deno.js +70 -0
- package/out/targets/git.js +8 -6
- package/out/targets/index.d.ts +2 -0
- package/out/targets/index.js +2 -0
- package/out/targets/jsr.js +33 -14
- package/out/targets/jsrManifest.d.ts +10 -0
- package/out/targets/jsrManifest.js +9 -0
- package/out/targets/npm.js +78 -45
- package/out/targets/npmManifest.d.ts +46 -0
- package/out/targets/npmManifest.js +23 -0
- package/out/targets/vsce.js +66 -39
- package/out/targets/yarn.js +43 -44
- package/out/targets/yarnClassic.js +67 -44
- package/out/unixify.d.ts +1 -0
- package/out/unixify.js +3 -0
- package/package.json +10 -7
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { type } from "arktype";
|
|
1
2
|
import { signedPatternIgnores, signedPatternCompile, extractPackageJsonNocase, extractGitignoreNocase, } from "../patterns/index.js";
|
|
3
|
+
import { unixify } from "../unixify.js";
|
|
4
|
+
import { npmManifestParse } from "./npmManifest.js";
|
|
2
5
|
const extractors = [
|
|
3
6
|
{
|
|
4
7
|
extract: extractPackageJsonNocase,
|
|
@@ -17,54 +20,74 @@ const extractors = [
|
|
|
17
20
|
path: ".gitignore",
|
|
18
21
|
},
|
|
19
22
|
];
|
|
20
|
-
const internal =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
23
|
+
const internal = [
|
|
24
|
+
signedPatternCompile({
|
|
25
|
+
excludes: true,
|
|
26
|
+
pattern: [
|
|
27
|
+
// https://github.com/yarnpkg/berry/blob/master/packages/plugin-pack/sources/packUtils.ts#L26
|
|
28
|
+
".git",
|
|
29
|
+
"CVS",
|
|
30
|
+
".svn",
|
|
31
|
+
".hg",
|
|
32
|
+
"node_modules",
|
|
33
|
+
"yarn.lock",
|
|
34
|
+
".lock-wscript",
|
|
35
|
+
".wafpickle-0",
|
|
36
|
+
".wafpickle-1",
|
|
37
|
+
".wafpickle-2",
|
|
38
|
+
".wafpickle-3",
|
|
39
|
+
".wafpickle-4",
|
|
40
|
+
".wafpickle-5",
|
|
41
|
+
".wafpickle-6",
|
|
42
|
+
".wafpickle-7",
|
|
43
|
+
".wafpickle-8",
|
|
44
|
+
".wafpickle-9",
|
|
45
|
+
"*.swp",
|
|
46
|
+
"._*",
|
|
47
|
+
"npm-debug.log",
|
|
48
|
+
"yarn-error.log",
|
|
49
|
+
".npmrc",
|
|
50
|
+
".yarnrc",
|
|
51
|
+
".yarnrc.yml",
|
|
52
|
+
".npmignore",
|
|
53
|
+
".gitignore",
|
|
54
|
+
".DS_Store",
|
|
55
|
+
],
|
|
56
|
+
compiled: null,
|
|
57
|
+
}, { nocase: true }),
|
|
58
|
+
signedPatternCompile({
|
|
59
|
+
excludes: false,
|
|
60
|
+
pattern: [
|
|
61
|
+
// https://github.com/yarnpkg/berry/blob/master/packages/plugin-pack/sources/packUtils.ts#L10
|
|
62
|
+
"/package.json",
|
|
63
|
+
"/readme*",
|
|
64
|
+
"/license*",
|
|
65
|
+
"/licence*",
|
|
66
|
+
"/changes*",
|
|
67
|
+
"/changelog*",
|
|
68
|
+
"/history*",
|
|
69
|
+
],
|
|
70
|
+
compiled: null,
|
|
71
|
+
}, { nocase: true }),
|
|
72
|
+
];
|
|
64
73
|
/**
|
|
65
74
|
* @since 0.8.0
|
|
66
75
|
*/
|
|
67
76
|
export const YarnClassic = {
|
|
77
|
+
async init({ fs, cwd }) {
|
|
78
|
+
let content;
|
|
79
|
+
const normalCwd = unixify(cwd);
|
|
80
|
+
try {
|
|
81
|
+
content = await fs.promises.readFile(normalCwd + "/" + "package.json");
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
throw new Error("Error while initializing Yarn classic", { cause: error });
|
|
85
|
+
}
|
|
86
|
+
const dist = npmManifestParse(content.toString());
|
|
87
|
+
if (dist instanceof type.errors) {
|
|
88
|
+
throw new Error("Invalid 'package.json': " + dist.summary, { cause: dist });
|
|
89
|
+
}
|
|
90
|
+
},
|
|
68
91
|
extractors,
|
|
69
92
|
ignores(o) {
|
|
70
93
|
return signedPatternIgnores({
|
package/out/unixify.d.ts
CHANGED
package/out/unixify.js
CHANGED
|
@@ -28,6 +28,9 @@ export function relative(base, to) {
|
|
|
28
28
|
const result = to.replace(base, "");
|
|
29
29
|
return result;
|
|
30
30
|
}
|
|
31
|
+
export function base(path) {
|
|
32
|
+
return path.substring(path.lastIndexOf("/") + 1);
|
|
33
|
+
}
|
|
31
34
|
function strip(path) {
|
|
32
35
|
return path.replaceAll("\\", "/").replace(/\w:/, "");
|
|
33
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "view-ignored",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Retrieve list of files ignored/included by Git, NPM, Yarn, JSR, VSCE or other tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
".gitignore",
|
|
@@ -77,6 +77,9 @@
|
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"prerelease": "bun run test && bun run prod && bun run lint && bun run fmt --check && bun publint --pack bun --strict",
|
|
80
|
+
"cpu": "bun run cpu:igw; bun run cpu:me",
|
|
81
|
+
"cpu:igw": "bun run --cpu-prof-md --cpu-prof-name CPU.igw.md scripts/ignoreWalk.js",
|
|
82
|
+
"cpu:me": "bun run --cpu-prof-md --cpu-prof-name CPU.me.md scripts/scan.js --fastInternal",
|
|
80
83
|
"test": "bun test src",
|
|
81
84
|
"test:patterns": "bun test src/patterns",
|
|
82
85
|
"test:targets": "bun test src/targets",
|
|
@@ -94,21 +97,21 @@
|
|
|
94
97
|
},
|
|
95
98
|
"dependencies": {
|
|
96
99
|
"arktype": "^2.1.29",
|
|
97
|
-
"minimatch": "^10.
|
|
100
|
+
"minimatch": "^10.2.2",
|
|
98
101
|
"strip-json-comments": "^5.0.3"
|
|
99
102
|
},
|
|
100
103
|
"devDependencies": {
|
|
101
104
|
"@release-it/keep-a-changelog": "^7.0.1",
|
|
102
|
-
"@types/bun": "^1.3.
|
|
105
|
+
"@types/bun": "^1.3.9",
|
|
103
106
|
"@types/ignore-walk": "^4.0.3",
|
|
104
107
|
"@types/node": "^18.19.130",
|
|
105
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
108
|
+
"@typescript/native-preview": "^7.0.0-dev.20260223.1",
|
|
106
109
|
"ignore-walk": "^8.0.0",
|
|
107
110
|
"memfs": "^4.56.10",
|
|
108
111
|
"mitata": "^1.0.34",
|
|
109
|
-
"oxfmt": "^0.
|
|
110
|
-
"oxlint": "^1.
|
|
111
|
-
"oxlint-tsgolint": "^0.
|
|
112
|
+
"oxfmt": "^0.35.0",
|
|
113
|
+
"oxlint": "^1.50.0",
|
|
114
|
+
"oxlint-tsgolint": "^0.14.2",
|
|
112
115
|
"publint": "^0.3.17",
|
|
113
116
|
"release-it": "^19.2.4"
|
|
114
117
|
},
|