@archlinter/cli 0.5.0 → 0.6.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/bin/archlint.js CHANGED
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env node
2
+ /* eslint-disable no-console */
2
3
 
3
4
  const { platform, arch } = process;
4
- const { existsSync } = require('fs');
5
- const { join } = require('path');
6
- const { spawnSync } = require('child_process');
5
+ const { existsSync } = require('node:fs');
6
+ const { join } = require('node:path');
7
+ const { spawnSync } = require('node:child_process');
7
8
 
8
9
  function getBinaryName() {
9
10
  return platform === 'win32' ? 'archlint.exe' : 'archlint';
@@ -12,12 +13,12 @@ function getBinaryName() {
12
13
  function isMusl() {
13
14
  if (platform !== 'linux') return false;
14
15
  try {
15
- const { execSync } = require('child_process');
16
+ const { execSync } = require('node:child_process');
16
17
  const output = execSync('ldd --version 2>&1 || true', { encoding: 'utf8' });
17
18
  return output.includes('musl');
18
19
  } catch {
19
20
  try {
20
- const os = require('fs').readFileSync('/etc/os-release', 'utf8');
21
+ const os = require('node:fs').readFileSync('/etc/os-release', 'utf8');
21
22
  return os.includes('Alpine');
22
23
  } catch {
23
24
  return false;
@@ -44,7 +45,7 @@ function getPlatformKey() {
44
45
  if (!platformArch) {
45
46
  throw new Error(
46
47
  `Unsupported platform: ${platform}-${arch}. ` +
47
- `Supported: darwin-arm64, darwin-x64, linux-x64, linux-arm64, linux-x64-musl, win32-x64`
48
+ `Supported: darwin-arm64, darwin-x64, linux-x64, linux-arm64, linux-x64-musl, win32-x64`
48
49
  );
49
50
  }
50
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archlinter/cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Fast architecture smell detector for TypeScript/JavaScript",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,12 +21,12 @@
21
21
  "README.md"
22
22
  ],
23
23
  "optionalDependencies": {
24
- "@archlinter/cli-darwin-arm64": "0.5.0",
25
- "@archlinter/cli-darwin-x64": "0.5.0",
26
- "@archlinter/cli-linux-x64": "0.5.0",
27
- "@archlinter/cli-linux-arm64": "0.5.0",
28
- "@archlinter/cli-linux-x64-musl": "0.5.0",
29
- "@archlinter/cli-win32-x64": "0.5.0"
24
+ "@archlinter/cli-darwin-arm64": "0.6.0",
25
+ "@archlinter/cli-darwin-x64": "0.6.0",
26
+ "@archlinter/cli-linux-x64": "0.6.0",
27
+ "@archlinter/cli-linux-arm64": "0.6.0",
28
+ "@archlinter/cli-linux-x64-musl": "0.6.0",
29
+ "@archlinter/cli-win32-x64": "0.6.0"
30
30
  },
31
31
  "engines": {
32
32
  "node": ">=18"
@@ -3,7 +3,7 @@ const { platform, arch } = process;
3
3
 
4
4
  function isMusl() {
5
5
  if (platform !== 'linux') return false;
6
- const { execSync } = require('child_process');
6
+ const { execSync } = require('node:child_process');
7
7
  try {
8
8
  const output = execSync('ldd --version 2>&1 || true', { encoding: 'utf8' });
9
9
  return output.includes('musl');
@@ -1,4 +1,5 @@
1
1
  // Postinstall script for @archlinter/cli
2
+ /* eslint-disable no-console */
2
3
  const { getPlatformKey } = require('./platform');
3
4
 
4
5
  const platformKey = getPlatformKey();