@atlaspack/apvm 0.0.2-dev.3818 → 0.0.3-canary.3743

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/apvm.mjs +27 -19
  3. package/package.json +7 -7
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @atlaspack/apvm
2
+
3
+ ## 0.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#452](https://github.com/atlassian-labs/atlaspack/pull/452) [`7d01d65`](https://github.com/atlassian-labs/atlaspack/commit/7d01d65900c4b458a3ef14ded9e7ccc84d4a5cc1) Thanks [@alshdavid](https://github.com/alshdavid)! - Introducing hello world package
package/apvm.mjs CHANGED
@@ -1,36 +1,44 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import * as child_process from 'node:child_process'
4
- import * as process from "node:process";
5
- import * as fs from "node:fs";
6
- import * as path from "node:path";
7
- import * as url from "node:url";
3
+ import * as child_process from 'node:child_process';
4
+ import * as process from 'node:process';
5
+ import * as fs from 'node:fs';
6
+ import * as path from 'node:path';
7
+ import * as url from 'node:url';
8
8
 
9
9
  const arch = {
10
- 'x64': 'amd64',
11
- 'arm64': 'arm64',
10
+ x64: 'amd64',
11
+ arm64: 'arm64',
12
12
  }[process.arch];
13
13
 
14
14
  const platform = {
15
- 'linux': 'linux',
16
- 'darwin': 'macos',
17
- 'win32': 'windows',
15
+ linux: 'linux',
16
+ darwin: 'macos',
17
+ win32: 'windows',
18
18
  }[process.platform];
19
19
 
20
- let binPath = process.env.APVM_BIN_PATH
20
+ let binPath = process.env.APVM_BIN_PATH;
21
21
 
22
22
  if (!binPath) {
23
- const packageJsonPath = url.fileURLToPath(import.meta.resolve(`@atlaspack/apvm-${platform}-${arch}/package.json`))
24
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
25
- const packageJsonDir = path.dirname(packageJsonPath)
26
- binPath = path.join(packageJsonDir, packageJson.bin[`apvm-${platform}-${arch}`])
23
+ const packageJsonPath = url.fileURLToPath(
24
+ import.meta.resolve(`@atlaspack/apvm-${platform}-${arch}/package.json`),
25
+ );
26
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
27
+ const packageJsonDir = path.dirname(packageJsonPath);
28
+ binPath = path.join(
29
+ packageJsonDir,
30
+ packageJson.bin[`apvm-${platform}-${arch}`],
31
+ );
27
32
  }
28
33
 
29
34
  if (!fs.existsSync(binPath)) {
30
35
  // eslint-disable-next-line no-console
31
- console.error(`BinaryDoesNotExist: ${binPath}`)
32
- process.exit(1)
36
+ console.error(`BinaryDoesNotExist: ${binPath}`);
37
+ process.exit(1);
33
38
  }
34
39
 
35
- const [,,...args] = process.argv
36
- child_process.execFileSync(`${binPath} ${args.join(' ')}`, { stdio: 'inherit', shell: true })
40
+ const [, , ...args] = process.argv;
41
+ child_process.execFileSync(`${binPath} ${args.join(' ')}`, {
42
+ stdio: 'inherit',
43
+ shell: true,
44
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atlaspack/apvm",
3
3
  "description": "Atlaspack version manager",
4
- "version": "0.0.2-dev.3818+4f5d524fd",
4
+ "version": "0.0.3-canary.3743+e27fbfb75",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "type": "commonjs",
7
7
  "bin": {
@@ -15,11 +15,11 @@
15
15
  "url": "https://github.com/atlassian-labs/atlaspack.git"
16
16
  },
17
17
  "optionalDependencies": {
18
- "@atlaspack/apvm-linux-amd64": "0.0.2-dev.3818+4f5d524fd",
19
- "@atlaspack/apvm-linux-arm64": "0.0.2-dev.3818+4f5d524fd",
20
- "@atlaspack/apvm-macos-amd64": "0.0.2-dev.3818+4f5d524fd",
21
- "@atlaspack/apvm-macos-arm64": "0.0.2-dev.3818+4f5d524fd",
22
- "@atlaspack/apvm-windows-amd64": "0.0.2-dev.3818+4f5d524fd"
18
+ "@atlaspack/apvm-linux-amd64": "0.0.2-canary.3743+e27fbfb75",
19
+ "@atlaspack/apvm-linux-arm64": "0.0.2-canary.3743+e27fbfb75",
20
+ "@atlaspack/apvm-macos-amd64": "0.0.2-canary.3743+e27fbfb75",
21
+ "@atlaspack/apvm-macos-arm64": "0.0.2-canary.3743+e27fbfb75",
22
+ "@atlaspack/apvm-windows-amd64": "0.0.2-canary.3743+e27fbfb75"
23
23
  },
24
- "gitHead": "4f5d524fdb28f9955f3a26abe0115d7545eb41f4"
24
+ "gitHead": "e27fbfb75c4809f493e2a48548546fbeddb375af"
25
25
  }