Skip to content

Commit 61115d9

Browse files
committed
Adjust npm subpackage namespacing, try getting arm64 working
1 parent 708b751 commit 61115d9

File tree

7 files changed

+31
-15
lines changed

7 files changed

+31
-15
lines changed

extra/npm/bin/lamdera

100644100755
File mode changed.

extra/npm/binary.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = function()
1515
// figure out package of binary
1616
// turn '0.19.1-1.2.3-alpha' into '0.19.1-1.2.3'
1717
var version = package.version.replace(/^(\d+\.\d+\.\d+)-(\d+\.\d+\.\d+).*$/, '$1');
18-
var subPackageName = 'lamdera-' + process.platform + '-' + process.arch;
18+
var subPackageName = '@lamdera/compiler-' + process.platform + '-' + process.arch;
1919

2020
verifyPlatform(version, subPackageName);
2121

@@ -75,7 +75,7 @@ function verifyPlatform(version, subPackageName)
7575
{
7676
if (subPackageName in package.optionalDependencies) return;
7777

78-
var situation = process.platform + '_' + process.arch;
78+
var situation = process.platform + '-' + process.arch;
7979
console.error(
8080
'-- ERROR -----------------------------------------------------------------------\n\n'
8181
+ 'The lamdera npm package does not support your platform (' + situation + ').\n\n'

extra/npm/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lamdera",
3-
"version": "0.19.1-1.1.1",
3+
"version": "0.19.1-1.1.1-2",
44
"description": "npm install wrapper for Lamdera",
55
"license": "BSD-3-Clause",
66
"repository": "lamdera/compiler",
@@ -28,11 +28,11 @@
2828
"lamdera": "bin/lamdera"
2929
},
3030
"optionalDependencies": {
31-
"lamdera-darwin-arm64": "0.19.1-1.1.1",
32-
"lamdera-darwin-x64": "0.19.1-1.1.1",
33-
"lamdera-linux-arm": "0.19.1-1.1.1",
34-
"lamdera-linux-arm64": "0.19.1-1.1.1",
35-
"lamdera-linux-x64": "0.19.1-1.1.1",
36-
"lamdera-win32-x64": "0.19.1-1.1.1"
31+
"@lamdera/compiler-darwin-arm64": "0.19.1-1.1.1",
32+
"@lamdera/compiler-darwin-x64": "0.19.1-1.1.1",
33+
"@lamdera/compiler-linux-arm": "0.19.1-1.1.1",
34+
"@lamdera/compiler-linux-arm64": "0.19.1-1.1.1",
35+
"@lamdera/compiler-linux-x64": "0.19.1-1.1.1",
36+
"@lamdera/compiler-win32-x64": "0.19.1-1.1.1"
3737
}
3838
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Lamdera
2+
3+
This is the macOS ARM 64-bit binary for [Lamdera](https://lamdera.com).
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "@lamdera/compiler-darwin-arm64",
3+
"version": "0.19.1-1.1.1",
4+
"description": "The macOS ARM 64-bit binary for Lamdera.",
5+
"repository": "lamdera/compiler",
6+
"license": "BSD-3-Clause",
7+
"os": [
8+
"darwin"
9+
],
10+
"cpu": [
11+
"arm64"
12+
]
13+
}

extra/npm/publishing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ Create each of these by running the `lamdera` executable for each platform throu
1919

2020
Put the above files at:
2121

22-
1. `packages/lamdera_darwin_arm64/lamdera`
23-
2. `packages/lamdera_darwin_x64/lamdera`
24-
3. `packages/lamdera_linux_x64/lamdera`
25-
4. `packages/lamdera_linux_arm64/lamdera`
26-
5. `packages/lamdera_win32_x64/lamdera.exe` (Note the `.exe` file extension!)
22+
1. `packages/lamdera-darwin-arm64/lamdera`
23+
2. `packages/lamdera-darwin-x64/lamdera`
24+
3. `packages/lamdera-linux-x64/lamdera`
25+
4. `packages/lamdera-linux-arm64/lamdera`
26+
5. `packages/lamdera-win32-x64/lamdera.exe` (Note the `.exe` file extension!)
2727

2828
(They are ignored by git.)
2929

extra/npm/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ You could also use this package to use different versions of Lamdera in differen
3737
This works, but there are usually faster and more reliable options:
3838

3939
1. You can download `lamdera` directly from [the downloads page](https://dashboard.lamdera.app/docs/download). This is all the `npm` installer does, but with extra HTTP requests to `npmjs.com` servers, making it slower and adding more failure points.
40-
2. Many continuous integration pipelines ways to cache files ([example](https://docs.travis-ci.com/user/caching/)) to make builds faster and more reliable.
40+
2. Many continuous integration pipelines offer ways to cache files ([i.e. github actions cache](https://github.com/marketplace/actions/cache)) to make builds faster and more reliable.
4141

4242
That said, it will definitely work to use the `npm` installer on CI if you prefer that option.
4343

0 commit comments

Comments
 (0)