plccheck 0.0.1 → 2.2.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 CHANGED
@@ -19,9 +19,12 @@ npx plccheck check ./path/to/project
19
19
 
20
20
  Initial publish requires npm auth once (to create the package entries in the registry). After that, releases use GitHub Actions + npm Trusted Publishing.
21
21
 
22
- From the repo root:
22
+ To release a new version:
23
23
 
24
24
  ```bash
25
- npm adduser
26
- node npm/scripts/bootstrap-publish-plccheck.mjs
25
+ cd ../.. # repo root
26
+ npm version patch # or minor/major
27
+ git push --follow-tags
27
28
  ```
29
+
30
+ `npm version` automatically syncs the version across all `plccheck-*` platform packages before it creates the git tag.
package/bin/plccheck.js CHANGED
@@ -90,12 +90,12 @@ function downloadFile(url, destPath) {
90
90
  },
91
91
  (res) => {
92
92
  if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
93
- out.close(() => fs.unlink(tmpPath, () => {}));
93
+ out.close(() => fs.unlink(tmpPath, () => { }));
94
94
  downloadFile(res.headers.location, destPath).then(resolve, reject);
95
95
  return;
96
96
  }
97
97
  if (res.statusCode && res.statusCode >= 400) {
98
- out.close(() => fs.unlink(tmpPath, () => {}));
98
+ out.close(() => fs.unlink(tmpPath, () => { }));
99
99
  reject(new Error(`HTTP ${res.statusCode} downloading ${url}`));
100
100
  return;
101
101
  }
@@ -113,7 +113,7 @@ function downloadFile(url, destPath) {
113
113
  },
114
114
  );
115
115
  req.on('error', (err) => {
116
- out.close(() => fs.unlink(tmpPath, () => {}));
116
+ out.close(() => fs.unlink(tmpPath, () => { }));
117
117
  reject(err);
118
118
  });
119
119
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plccheck",
3
- "version": "0.0.1",
3
+ "version": "2.2.0",
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": {
@@ -10,13 +10,16 @@
10
10
  "bin/plccheck.js",
11
11
  "README.md"
12
12
  ],
13
+ "scripts": {
14
+ "version": "node ../scripts/plccheck-npm-version-hook.mjs"
15
+ },
13
16
  "optionalDependencies": {
14
- "@danielv123/plccheck-win-x64": "0.0.0",
15
- "@danielv123/plccheck-win-arm64": "0.0.0",
16
- "@danielv123/plccheck-linux-x64": "0.0.0",
17
- "@danielv123/plccheck-linux-arm64": "0.0.0",
18
- "@danielv123/plccheck-darwin-x64": "0.0.0",
19
- "@danielv123/plccheck-darwin-arm64": "0.0.0"
17
+ "@danielv123/plccheck-win-x64": "2.2.0",
18
+ "@danielv123/plccheck-win-arm64": "2.2.0",
19
+ "@danielv123/plccheck-linux-x64": "2.2.0",
20
+ "@danielv123/plccheck-linux-arm64": "2.2.0",
21
+ "@danielv123/plccheck-darwin-x64": "2.2.0",
22
+ "@danielv123/plccheck-darwin-arm64": "2.2.0"
20
23
  },
21
24
  "repository": {
22
25
  "type": "git",