plccheck 2.7.0 → 2.8.1
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 +4 -22
- package/bin/plccheck.js +7 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
CLI wrapper for the Siemens PLC checker/LSP written in Go.
|
|
4
4
|
|
|
5
|
+
Documentation: [danielv123.github.io/vscode_siemens/docs](https://danielv123.github.io/vscode_siemens/docs/index.html)
|
|
6
|
+
|
|
5
7
|
## Usage
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -13,7 +15,7 @@ npx plccheck check ./path/to/project
|
|
|
13
15
|
- `plccheck serve` (LSP server over stdio)
|
|
14
16
|
- `plccheck check <files-or-folders...>`
|
|
15
17
|
- `plccheck emit --target <language> <file>`
|
|
16
|
-
- `plccheck test [--filter <text>] [--events-json] [--coverage-json <file>] [--coverage-lcov <file>]
|
|
18
|
+
- `plccheck test [--filter <text>] [--events-json] [--coverage-json <file>] [--coverage-lcov <file>] <file-or-folder>`
|
|
17
19
|
- `plccheck version`
|
|
18
20
|
|
|
19
21
|
## Testing and Coverage
|
|
@@ -36,24 +38,4 @@ For zero-config discovery in the Coverage Gutters VS Code extension, write the L
|
|
|
36
38
|
npx plccheck test ./my-plc-project --coverage-json coverage.json --coverage-lcov lcov.info
|
|
37
39
|
```
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npx plccheck test ./my-plc-project --coverage-json coverage.json --coverage-branches
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Note: `--events-json` prints a stream of execution events to stdout, while `--coverage-json` writes a finalized coverage report to a file. By default, the JSON artifact stays statement/line-focused and still includes function summaries/details where available, and LCOV includes the matching function records. `--coverage-branches` widens the JSON artifact with additive branch summaries/details and also adds LCOV branch records where branch runtime data is available. For AI analysis, use the file artifact from `--coverage-json`.
|
|
46
|
-
|
|
47
|
-
## Publishing (maintainers)
|
|
48
|
-
|
|
49
|
-
Initial publish requires npm auth once (to create the package entries in the registry). After that, releases use GitHub Actions + npm Trusted Publishing.
|
|
50
|
-
|
|
51
|
-
To release a new version:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
cd ../.. # repo root
|
|
55
|
-
npm version patch # or minor/major
|
|
56
|
-
git push --follow-tags
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
`npm version` automatically syncs the version across all `plccheck-*` platform packages before it creates the git tag.
|
|
41
|
+
Note: `--events-json` prints a stream of execution events to stdout, while `--coverage-json` writes a finalized coverage report to a file. Coverage artifacts include statement, function, and branch data where runtime data is available. For AI analysis, use the file artifact from `--coverage-json`.
|
package/bin/plccheck.js
CHANGED
|
@@ -384,8 +384,14 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
384
384
|
|
|
385
385
|
args = reorderTestArgs(args);
|
|
386
386
|
|
|
387
|
+
const childEnv = {
|
|
388
|
+
...process.env,
|
|
389
|
+
PLCCHECK_INVOCATION_SOURCE: process.env.PLCCHECK_INVOCATION_SOURCE || (binaryPath === 'go' ? 'npm_wrapper_dev' : 'npm_wrapper'),
|
|
390
|
+
PLCCHECK_CLI_VERSION: process.env.PLCCHECK_CLI_VERSION || readOptionalDepVersion(pkg) || '',
|
|
391
|
+
};
|
|
392
|
+
|
|
387
393
|
return new Promise((resolve) => {
|
|
388
|
-
const child = spawn(executable, args, { stdio: 'inherit' });
|
|
394
|
+
const child = spawn(executable, args, { stdio: 'inherit', env: childEnv });
|
|
389
395
|
|
|
390
396
|
child.on('error', (err) => {
|
|
391
397
|
console.error(`plccheck: failed to start binary: ${binaryPath}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plccheck",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "Siemens PLC language checker + LSP CLI (SCL/ST/LAD/FBD, etc.)",
|
|
5
5
|
"license": "CC-BY-NC-4.0",
|
|
6
6
|
"bin": {
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"version": "node ../scripts/plccheck-npm-version-hook.mjs"
|
|
15
15
|
},
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@danielv123/plccheck-win-x64": "2.
|
|
18
|
-
"@danielv123/plccheck-win-arm64": "2.
|
|
19
|
-
"@danielv123/plccheck-linux-x64": "2.
|
|
20
|
-
"@danielv123/plccheck-linux-arm64": "2.
|
|
21
|
-
"@danielv123/plccheck-darwin-x64": "2.
|
|
22
|
-
"@danielv123/plccheck-darwin-arm64": "2.
|
|
17
|
+
"@danielv123/plccheck-win-x64": "2.8.1",
|
|
18
|
+
"@danielv123/plccheck-win-arm64": "2.8.1",
|
|
19
|
+
"@danielv123/plccheck-linux-x64": "2.8.1",
|
|
20
|
+
"@danielv123/plccheck-linux-arm64": "2.8.1",
|
|
21
|
+
"@danielv123/plccheck-darwin-x64": "2.8.1",
|
|
22
|
+
"@danielv123/plccheck-darwin-arm64": "2.8.1"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|