Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
echo "${ACTIONLINT_SHA256} actionlint.tar.gz" | sha256sum --check
tar -xzf actionlint.tar.gz actionlint
- run: '"$RUNNER_TEMP/actionlint" -color'
- uses: zizmorcore/zizmor-action@85b2b9fb8e3325e7a23d7d0a9d7ba5ae0f999e3e # v0.7.1
- uses: zizmorcore/zizmor-action@1b4550e929643b8b26a62303c6bd64814271a4f1 # v0.9.2
with:
version: 1.31.1
version: 1.33.1
advanced-security: false

# The one check the branch ruleset requires, so the ruleset stays the same when jobs change. List every other job
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
},
"devDependencies": {
"@types/node": "26.6.11",
"ajv": "6.15.0",
"eslint": "10.15.0",
"prettier": "3.10.1",
"typescript-eslint": "8.74.0",
Expand Down
110 changes: 110 additions & 0 deletions test/fixtures/saved-reports/0.2.1/entry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"snapshotId": "8bd2ce9c39c425ba3eaf13d8df667abf253ab6ca0694b49aa870520b98fbe804",
"entries": [
"consumer.test.js"
],
"completeness": "partial",
"diagnostics": [
{
"code": "TS2345",
"message": "Argument of type 'string' is not assignable to parameter of type 'number'.",
"location": {
"file": "consumer.test.js",
"start": 106,
"end": 124,
"line": 6,
"column": 11
}
},
{
"code": "unresolved-call",
"message": "Call target cannot be tied to a concrete project declaration.",
"location": {
"file": "consumer.test.js",
"start": 127,
"end": 139,
"line": 7,
"column": 1
}
}
],
"reached": [
{
"id": "module:consumer.test.js",
"via": null
},
{
"id": "codec.js:0:function",
"via": {
"from": "module:consumer.test.js",
"kind": "call",
"location": {
"file": "consumer.test.js",
"start": 46,
"end": 58,
"line": 4,
"column": 1
}
}
},
{
"id": "module:index.js",
"via": {
"from": "module:consumer.test.js",
"kind": "import",
"location": {
"file": "consumer.test.js",
"start": 31,
"end": 43,
"line": 2,
"column": 19
}
}
},
{
"id": "module:codec.js",
"via": {
"from": "module:index.js",
"kind": "import",
"location": {
"file": "index.js",
"start": 23,
"end": 35,
"line": 1,
"column": 24
}
}
}
],
"declarations": [
{
"id": "codec.js:0:function",
"name": "encode",
"location": {
"file": "codec.js",
"start": 0,
"end": 57,
"line": 1,
"column": 1
},
"status": "reachable"
},
{
"id": "codec.js:59:function",
"name": "hidden",
"location": {
"file": "codec.js",
"start": 59,
"end": 92,
"line": 5,
"column": 1
},
"status": "no-known-path"
}
],
"limitations": [
"Paths follow resolved direct calls, construction and source module edges. Conditional code can contribute a path.",
"Callbacks, external API consumers, framework dispatch, class initialization and computed imports can hide paths.",
"No known path is relative to the selected entries and supported edges. Runtime execution is unknown."
]
}
198 changes: 198 additions & 0 deletions test/fixtures/saved-reports/0.2.1/inventory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
{
"schemaVersion": 1,
"analyzer": {
"name": "code-inventory",
"version": "0.2.1",
"compilerVersion": "6.0.3"
},
"snapshotId": "8bd2ce9c39c425ba3eaf13d8df667abf253ab6ca0694b49aa870520b98fbe804",
"config": {
"path": null,
"hash": null,
"entries": [],
"projects": [],
"inputs": []
},
"completeness": "partial",
"files": [
{
"path": "codec.d.ts",
"hash": "b8bec2aad318bd58250907119b1485ca1a371a0d37d5c6951a4a574f0de8f48f",
"status": "excluded",
"reason": "declaration-file"
},
{
"path": "codec.js",
"hash": "08de306e774d7de5ec92bf8d985d7bc2029cb4c79b0ff431a646e40ab0550b8e",
"status": "analyzed",
"reason": null
},
{
"path": "consumer.test.js",
"hash": "9e306ebb088853e687b18524bee4a94ae41d6b89151ddf8483311a2729dd6935",
"status": "analyzed",
"reason": null
},
{
"path": "index.d.ts",
"hash": "d5aea7680ec590ead73cdf0ae4399a83543d8eb694529b3136a503923ef3d051",
"status": "excluded",
"reason": "declaration-file"
},
{
"path": "index.js",
"hash": "d5aea7680ec590ead73cdf0ae4399a83543d8eb694529b3136a503923ef3d051",
"status": "analyzed",
"reason": null
}
],
"symbols": [
{
"id": "codec.js:0:function",
"name": "encode",
"kind": "function",
"location": {
"file": "codec.js",
"start": 0,
"end": 57,
"line": 1,
"column": 1
},
"containerId": null,
"scope": "production",
"exportedAs": [
"codec.js#encode"
]
},
{
"id": "codec.js:59:function",
"name": "hidden",
"kind": "function",
"location": {
"file": "codec.js",
"start": 59,
"end": 92,
"line": 5,
"column": 1
},
"containerId": null,
"scope": "production",
"exportedAs": []
}
],
"references": [
{
"targetId": "codec.js:0:function",
"kind": "call",
"location": {
"file": "consumer.test.js",
"start": 46,
"end": 58,
"line": 4,
"column": 1
},
"callerId": null,
"scope": "test"
},
{
"targetId": "codec.js:0:function",
"kind": "read",
"location": {
"file": "consumer.test.js",
"start": 88,
"end": 94,
"line": 5,
"column": 25
},
"callerId": null,
"scope": "test"
},
{
"targetId": "codec.js:0:function",
"kind": "call",
"location": {
"file": "consumer.test.js",
"start": 96,
"end": 105,
"line": 6,
"column": 1
},
"callerId": null,
"scope": "test"
}
],
"modules": [
{
"callerId": null,
"specifier": "./index.js",
"kind": "import",
"location": {
"file": "consumer.test.js",
"start": 31,
"end": 43,
"line": 2,
"column": 19
},
"typeOnly": false,
"resolvedFile": "index.js"
},
{
"callerId": null,
"specifier": "./codec.js",
"kind": "import",
"location": {
"file": "index.js",
"start": 23,
"end": 35,
"line": 1,
"column": 24
},
"typeOnly": false,
"resolvedFile": "codec.js"
}
],
"exports": [
{
"file": "codec.js",
"name": "encode",
"targetId": "codec.js:0:function"
},
{
"file": "index.js",
"name": "default",
"targetId": null
}
],
"diagnostics": [
{
"code": "TS2345",
"message": "Argument of type 'string' is not assignable to parameter of type 'number'.",
"location": {
"file": "consumer.test.js",
"start": 106,
"end": 124,
"line": 6,
"column": 11
}
},
{
"code": "unresolved-call",
"message": "Call target cannot be tied to a concrete project declaration.",
"location": {
"file": "consumer.test.js",
"start": 127,
"end": 139,
"line": 7,
"column": 1
}
}
],
"limitations": [
"References describe source occurrences, not execution counts or reachability.",
"Public exports may have consumers outside the scanned root.",
"Reflection, framework conventions, mutable aliases and runtime dispatch may hide usages.",
"Default discovery omits dependency/build directories and does not follow symlinks.",
"Each source file is counted in one project context; configuration-dependent alternatives may differ.",
"Symbol IDs are snapshot-local and may change when source locations change."
]
}
Loading