node-bin-gen 11.2.5 → 12.0.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.
@@ -0,0 +1,65 @@
1
+ name: Check and Sync Node.js Versions
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 0 * * *' # everyday
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ id-token: write
10
+ contents: read
11
+
12
+ jobs:
13
+ sync-node-versions:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Set up Node.js
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version: '20.x'
23
+ registry-url: 'https://registry.npmjs.org' # set ~/.npmrc need add repository secrets in the settings
24
+
25
+ - name: Ensure latest npm 11
26
+ run: npm install -g npm@11
27
+
28
+ - name: Install dependencies
29
+ run: npm ci
30
+
31
+ - name: Fetch Node.js versions released in the last 30 days
32
+ run: |
33
+ #set -x
34
+ DATE_30_DAYS_AGO=$(date --date='30 days ago' +%Y-%m-%d)
35
+ curl -s https://nodejs.org/dist/index.json | jq --arg DATE "$DATE_30_DAYS_AGO" -r '.[] | select(.date >= $DATE) | .version' > versions.txt
36
+ echo "Node.js versions released in the last 30 days:"
37
+ cat versions.txt
38
+ #set +x
39
+
40
+ - name: Check each version and sync if not published
41
+ run: |
42
+ #set -x
43
+ while IFS= read -r VERSION; do
44
+ echo "Checking version $VERSION..."
45
+ if [ -z "$(npm view node@$VERSION)" ]; then
46
+ echo "Version $VERSION is not published on npm. Running custom script."
47
+ mkdir -p "target/$VERSION" && cd "target/$VERSION"
48
+ node ../../index.js $VERSION
49
+ for dir in */ ; do
50
+ if [ -d "$dir" ]; then
51
+ echo "Publishing directory: $dir"
52
+ cd "$dir"
53
+ npm publish
54
+ # npm publish --dry-run
55
+ cd ..
56
+ else
57
+ echo "Directory $dir not found."
58
+ fi
59
+ done
60
+ cd ../../
61
+ else
62
+ echo "Version $VERSION is already published on npm. Skipping."
63
+ fi
64
+ done < versions.txt
65
+ #set +x
package/index.js CHANGED
@@ -78,6 +78,9 @@ async function buildArchPackage(os, cpu, version, pre) {
78
78
  cpu,
79
79
  version: version + (pre != null ? "-" + pre : ""),
80
80
  description: "node",
81
+ repository: {
82
+ url: "https://github.com/aredridel/node-bin-gen"
83
+ },
81
84
  bin: {
82
85
  node: executable,
83
86
  },
@@ -89,7 +92,7 @@ async function buildArchPackage(os, cpu, version, pre) {
89
92
  "LICENSE",
90
93
  ],
91
94
  os: platform,
92
- cpu: arch,
95
+ cpu: arch == 'ppc64le' ? 'ppc64' : arch,
93
96
  };
94
97
 
95
98
  debug("removing", dir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-bin-gen",
3
- "version": "11.2.5",
3
+ "version": "12.0.0",
4
4
  "description": "Generate a node binary package",
5
5
  "author": "Aria Stewart <aredridel@dinhe.net>",
6
6
  "main": "index.js",
@@ -15,9 +15,9 @@
15
15
  "node": ">=18.0.0"
16
16
  },
17
17
  "dependencies": {
18
- "rimraf": "^5.0.5",
18
+ "rimraf": "^6.0.0",
19
19
  "verror": "^1.9.0",
20
- "yargs": "^17.0.1"
20
+ "yargs": "^18.0.0"
21
21
  },
22
22
  "eslintConfig": {
23
23
  "sourceType": "module",
@@ -40,6 +40,6 @@
40
40
  }
41
41
  },
42
42
  "devDependencies": {
43
- "eslint": "^8.50.0"
43
+ "eslint": "^9.0.0"
44
44
  }
45
45
  }