@nodesecure/js-x-ray 5.0.1 → 5.1.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 +5 -3
- package/index.d.ts +2 -1
- package/package.json +58 -58
- package/types/astdeps.d.ts +9 -6
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# js-x-ray
|
|
2
2
|

|
|
3
3
|
[](https://github.com/NodeSecure/js-x-ray/commit-activity)
|
|
4
|
-
[](https://github.com/nodejs/security-wg/blob/master/processes/responsible_disclosure_template.md
|
|
5
|
-
)
|
|
6
4
|
[](https://github.com/NodeSecure/js-x-ray/blob/master/LICENSE)
|
|
7
5
|

|
|
8
6
|
|
|
@@ -180,7 +178,7 @@ export type ReportOnFile = {
|
|
|
180
178
|
## Contributors ✨
|
|
181
179
|
|
|
182
180
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
183
|
-
[](#contributors-)
|
|
184
182
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
185
183
|
|
|
186
184
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
@@ -196,6 +194,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
196
194
|
<td align="center"><a href="https://github.com/Mathieuka"><img src="https://avatars.githubusercontent.com/u/34446722?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mathieu</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=Mathieuka" title="Code">💻</a></td>
|
|
197
195
|
<td align="center"><a href="https://github.com/Kawacrepe"><img src="https://avatars.githubusercontent.com/u/40260517?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vincent Dhennin</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=Kawacrepe" title="Code">💻</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=Kawacrepe" title="Tests">⚠️</a></td>
|
|
198
196
|
<td align="center"><a href="http://tonygo.dev"><img src="https://avatars.githubusercontent.com/u/22824417?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tony Gorez</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=tony-go" title="Code">💻</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=tony-go" title="Documentation">📖</a> <a href="https://github.com/NodeSecure/js-x-ray/commits?author=tony-go" title="Tests">⚠️</a></td>
|
|
197
|
+
<td align="center"><a href="https://github.com/PierreDemailly"><img src="https://avatars.githubusercontent.com/u/39910767?v=4?s=100" width="100px;" alt=""/><br /><sub><b>PierreD</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=PierreDemailly" title="Tests">⚠️</a></td>
|
|
198
|
+
</tr>
|
|
199
|
+
<tr>
|
|
200
|
+
<td align="center"><a href="https://www.linkedin.com/in/franck-hallaert/"><img src="https://avatars.githubusercontent.com/u/110826655?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Franck Hallaert</b></sub></a><br /><a href="https://github.com/NodeSecure/js-x-ray/commits?author=Aekk0" title="Code">💻</a></td>
|
|
199
201
|
</tr>
|
|
200
202
|
</table>
|
|
201
203
|
|
package/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
WarningName,
|
|
14
14
|
WarningNameWithValue
|
|
15
15
|
} from "./types/warnings";
|
|
16
|
-
import { ASTDeps } from "./types/astdeps";
|
|
16
|
+
import { ASTDeps, Dependency } from "./types/astdeps";
|
|
17
17
|
|
|
18
18
|
declare const warnings: Record<WarningName, Pick<WarningDefault, "experimental" | "i18n" | "severity">>;
|
|
19
19
|
|
|
@@ -26,6 +26,7 @@ export {
|
|
|
26
26
|
RuntimeFileOptions,
|
|
27
27
|
RuntimeOptions,
|
|
28
28
|
ASTDeps,
|
|
29
|
+
Dependency,
|
|
29
30
|
Warning,
|
|
30
31
|
WarningDefault,
|
|
31
32
|
WarningLocation,
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@nodesecure/js-x-ray",
|
|
3
|
-
"version": "5.0
|
|
4
|
-
"description": "JavaScript AST XRay analysis",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"exports": "./index.js",
|
|
7
|
-
"engines": {
|
|
8
|
-
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"lint": "eslint src test",
|
|
12
|
-
"prepublishOnly": "pkg-ok",
|
|
13
|
-
"test": "cross-env esm-tape-runner 'test/**/*.spec.js' | tap-monkey",
|
|
14
|
-
"check": "cross-env npm run lint && npm run test"
|
|
15
|
-
},
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "git+https://github.com/NodeSecure/js-x-ray.git"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"ast",
|
|
22
|
-
"nsecure",
|
|
23
|
-
"nodesecure",
|
|
24
|
-
"analysis",
|
|
25
|
-
"dependencies",
|
|
26
|
-
"security"
|
|
27
|
-
],
|
|
28
|
-
"files": [
|
|
29
|
-
"src",
|
|
30
|
-
"types",
|
|
31
|
-
"index.js",
|
|
32
|
-
"index.d.ts"
|
|
33
|
-
],
|
|
34
|
-
"author": "GENTILHOMME Thomas <gentilhomme.thomas@gmail.com>",
|
|
35
|
-
"license": "MIT",
|
|
36
|
-
"bugs": {
|
|
37
|
-
"url": "https://github.com/NodeSecure/js-x-ray/issues"
|
|
38
|
-
},
|
|
39
|
-
"homepage": "https://github.com/NodeSecure/js-x-ray#readme",
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"@nodesecure/sec-literal": "^1.1.0",
|
|
42
|
-
"estree-walker": "^3.0.1",
|
|
43
|
-
"is-minified-code": "^2.0.0",
|
|
44
|
-
"meriyah": "^4.
|
|
45
|
-
"safe-regex": "^2.1.1"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@nodesecure/eslint-config": "^1.
|
|
49
|
-
"@slimio/is": "^1.5.1",
|
|
50
|
-
"@small-tech/esm-tape-runner": "^2.0.0",
|
|
51
|
-
"@small-tech/tap-monkey": "^1.4.0",
|
|
52
|
-
"@types/node": "^
|
|
53
|
-
"cross-env": "^7.0.3",
|
|
54
|
-
"eslint": "^8.
|
|
55
|
-
"pkg-ok": "^3.0.0",
|
|
56
|
-
"tape": "^5.
|
|
57
|
-
}
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@nodesecure/js-x-ray",
|
|
3
|
+
"version": "5.1.0",
|
|
4
|
+
"description": "JavaScript AST XRay analysis",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": "./index.js",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"lint": "eslint src test",
|
|
12
|
+
"prepublishOnly": "pkg-ok",
|
|
13
|
+
"test": "cross-env esm-tape-runner 'test/**/*.spec.js' | tap-monkey",
|
|
14
|
+
"check": "cross-env npm run lint && npm run test"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/NodeSecure/js-x-ray.git"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"ast",
|
|
22
|
+
"nsecure",
|
|
23
|
+
"nodesecure",
|
|
24
|
+
"analysis",
|
|
25
|
+
"dependencies",
|
|
26
|
+
"security"
|
|
27
|
+
],
|
|
28
|
+
"files": [
|
|
29
|
+
"src",
|
|
30
|
+
"types",
|
|
31
|
+
"index.js",
|
|
32
|
+
"index.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"author": "GENTILHOMME Thomas <gentilhomme.thomas@gmail.com>",
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/NodeSecure/js-x-ray/issues"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/NodeSecure/js-x-ray#readme",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@nodesecure/sec-literal": "^1.1.0",
|
|
42
|
+
"estree-walker": "^3.0.1",
|
|
43
|
+
"is-minified-code": "^2.0.0",
|
|
44
|
+
"meriyah": "^4.3.0",
|
|
45
|
+
"safe-regex": "^2.1.1"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@nodesecure/eslint-config": "^1.5.0",
|
|
49
|
+
"@slimio/is": "^1.5.1",
|
|
50
|
+
"@small-tech/esm-tape-runner": "^2.0.0",
|
|
51
|
+
"@small-tech/tap-monkey": "^1.4.0",
|
|
52
|
+
"@types/node": "^18.7.13",
|
|
53
|
+
"cross-env": "^7.0.3",
|
|
54
|
+
"eslint": "^8.23.0",
|
|
55
|
+
"pkg-ok": "^3.0.0",
|
|
56
|
+
"tape": "^5.6.0"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/types/astdeps.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export {
|
|
2
2
|
ASTDeps,
|
|
3
|
-
SourceLocation
|
|
3
|
+
SourceLocation,
|
|
4
|
+
Dependency
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
interface SourceLocation {
|
|
@@ -14,6 +15,12 @@ interface SourceLocation {
|
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
interface Dependency {
|
|
19
|
+
unsafe: boolean;
|
|
20
|
+
inTry: boolean;
|
|
21
|
+
location?: SourceLocation;
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
declare class ASTDeps {
|
|
18
25
|
constructor();
|
|
19
26
|
removeByName(name: string): void;
|
|
@@ -21,10 +28,6 @@ declare class ASTDeps {
|
|
|
21
28
|
getDependenciesInTryStatement(): IterableIterator<string>;
|
|
22
29
|
|
|
23
30
|
public isInTryStmt: boolean;
|
|
24
|
-
public dependencies: Record<string,
|
|
25
|
-
unsafe: boolean;
|
|
26
|
-
inTry: boolean;
|
|
27
|
-
location?: SourceLocation;
|
|
28
|
-
}>;
|
|
31
|
+
public dependencies: Record<string, Dependency>;
|
|
29
32
|
public readonly size: number;
|
|
30
33
|
}
|