node-abi 3.45.0 → 3.47.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/abi_registry.json CHANGED
@@ -110,14 +110,14 @@
110
110
  "future": false,
111
111
  "lts": false,
112
112
  "runtime": "electron",
113
- "target": "8.0.0-beta.1"
113
+ "target": "9.0.0-beta.1"
114
114
  },
115
115
  {
116
116
  "abi": "76",
117
117
  "future": false,
118
118
  "lts": false,
119
119
  "runtime": "electron",
120
- "target": "9.0.0-beta.1"
120
+ "target": "8.0.0-beta.1"
121
121
  },
122
122
  {
123
123
  "abi": "80",
@@ -131,14 +131,14 @@
131
131
  "future": false,
132
132
  "lts": false,
133
133
  "runtime": "electron",
134
- "target": "10.0.0-beta.1"
134
+ "target": "11.0.0-beta.1"
135
135
  },
136
136
  {
137
137
  "abi": "82",
138
138
  "future": false,
139
139
  "lts": false,
140
140
  "runtime": "electron",
141
- "target": "11.0.0-beta.1"
141
+ "target": "10.0.0-beta.1"
142
142
  },
143
143
  {
144
144
  "abi": "85",
@@ -159,21 +159,21 @@
159
159
  "future": false,
160
160
  "lts": false,
161
161
  "runtime": "electron",
162
- "target": "13.0.0-beta.2"
162
+ "target": "15.0.0-alpha.1"
163
163
  },
164
164
  {
165
165
  "abi": "89",
166
166
  "future": false,
167
167
  "lts": false,
168
168
  "runtime": "electron",
169
- "target": "15.0.0-alpha.1"
169
+ "target": "14.0.0-beta.1"
170
170
  },
171
171
  {
172
172
  "abi": "89",
173
173
  "future": false,
174
174
  "lts": false,
175
175
  "runtime": "electron",
176
- "target": "14.0.0-beta.1"
176
+ "target": "13.0.0-beta.2"
177
177
  },
178
178
  {
179
179
  "abi": "97",
@@ -254,7 +254,7 @@
254
254
  },
255
255
  {
256
256
  "abi": "116",
257
- "future": true,
257
+ "future": false,
258
258
  "lts": false,
259
259
  "runtime": "electron",
260
260
  "target": "26.0.0-alpha.1"
@@ -265,5 +265,12 @@
265
265
  "lts": false,
266
266
  "runtime": "electron",
267
267
  "target": "25.0.0-alpha.1"
268
+ },
269
+ {
270
+ "abi": "118",
271
+ "future": true,
272
+ "lts": false,
273
+ "runtime": "electron",
274
+ "target": "27.0.0-alpha.1"
268
275
  }
269
276
  ]
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "node-abi",
3
- "version": "3.45.0",
3
+ "version": "3.47.0",
4
4
  "description": "Get the Node ABI for a given target and runtime, and vice versa.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "tape test/index.js",
8
8
  "update-abi-registry": "node --unhandled-rejections=strict scripts/update-abi-registry.js"
9
9
  },
10
+ "files": [
11
+ "abi_registry.json"
12
+ ],
10
13
  "repository": {
11
14
  "type": "git",
12
15
  "url": "https://github.com/electron/node-abi.git"
@@ -1,45 +0,0 @@
1
- step-restore-cache: &step-restore-cache
2
- restore_cache:
3
- keys:
4
- - v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
5
- - v1-dependencies-{{ arch }}
6
-
7
- steps-test: &steps-test
8
- steps:
9
- - checkout
10
- - *step-restore-cache
11
- - run: yarn --frozen-lockfile
12
- - save_cache:
13
- paths:
14
- - node_modules
15
- key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
16
- - run: yarn test
17
-
18
- version: 2.1
19
- orbs:
20
- cfa: continuousauth/npm@1.0.2
21
- jobs:
22
- test-linux-14:
23
- docker:
24
- - image: cimg/node:14.21
25
- <<: *steps-test
26
- test-linux-16:
27
- docker:
28
- - image: cimg/node:16.19
29
- <<: *steps-test
30
-
31
- workflows:
32
- test_and_release:
33
- # Run test jobs first, release only when all the test jobs are successful
34
- jobs:
35
- - test-linux-14
36
- - test-linux-16
37
- - cfa/release:
38
- requires:
39
- - test-linux-14
40
- - test-linux-16
41
- filters:
42
- branches:
43
- only:
44
- - main
45
- context: cfa-release
@@ -1 +0,0 @@
1
- * @electron/wg-ecosystem @electron/wg-releases @electron/wg-upgrades
@@ -1,26 +0,0 @@
1
- name: "Check Semantic Commit"
2
-
3
- on:
4
- pull_request:
5
- types:
6
- - opened
7
- - edited
8
- - synchronize
9
-
10
- permissions:
11
- contents: read
12
-
13
- jobs:
14
- main:
15
- permissions:
16
- pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
17
- statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
18
- name: Validate PR Title
19
- runs-on: ubuntu-latest
20
- steps:
21
- - name: semantic-pull-request
22
- uses: amannn/action-semantic-pull-request@c3cd5d1ea3580753008872425915e343e351ab54 # v5.2.0
23
- env:
24
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25
- with:
26
- validateSingleCommit: false
@@ -1,42 +0,0 @@
1
- name: Auto-update ABI JSON file
2
- on:
3
- workflow_dispatch:
4
- schedule:
5
- - cron: '0 * * * *'
6
- jobs:
7
- autoupdate:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
11
- - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
12
- with:
13
- node-version: '12.x'
14
- - name: Get npm cache directory
15
- id: npm-cache
16
- run: |
17
- echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
18
- - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 # tag: v3.2.4
19
- with:
20
- path: ${{ steps.npm-cache.outputs.dir }}
21
- key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
22
- restore-keys: |
23
- ${{ runner.os }}-node-
24
- - run: npm install --no-package-lock
25
- - name: Update ABI registry
26
- run: npm run update-abi-registry
27
- - name: Commit Changes to ABI registry
28
- env:
29
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30
- run: |
31
- echo "machine github.com login $GITHUB_ACTOR password $GITHUB_TOKEN" > ~/.netrc
32
- chmod 600 ~/.netrc
33
- git add abi_registry.json
34
- if test -n "$(git status -s)"; then
35
- git config user.name "GitHub Actions"
36
- git config user.email "github-actions@users.noreply.github.com"
37
- git diff --cached
38
- git commit -m "feat: update ABI registry"
39
- git push origin HEAD:$GITHUB_REF
40
- else
41
- echo No update needed
42
- fi
package/.releaserc.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "plugins": [
3
- "@semantic-release/commit-analyzer",
4
- "@semantic-release/release-notes-generator",
5
- "@continuous-auth/semantic-release-npm",
6
- "@semantic-release/github"
7
- ],
8
- "branches": [ "main" ]
9
- }
@@ -1,73 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at lukas.geiger94@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at https://www.contributor-covenant.org/version/1/4/code-of-conduct/
72
-
73
- [homepage]: https://www.contributor-covenant.org
package/CONTRIBUTING.md DELETED
@@ -1,62 +0,0 @@
1
- # Contributing to `node-abi`
2
-
3
- :+1::tada: First off, thanks for taking the time to contribute to `node-abi`! :tada::+1:
4
-
5
- ## Commit Message Guidelines
6
-
7
- This module uses [`semantic-release`](https://github.com/semantic-release/semantic-release) to automatically release new versions via [Continuous Auth](https://continuousauth.dev/).
8
- Therefor we have very precise rules over how our git commit messages can be formatted.
9
-
10
- Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
11
- format that includes a **type**, a **scope** and a **subject** ([full explanation](https://github.com/stevemao/conventional-changelog-angular/blob/master/convention.md)):
12
-
13
- ```
14
- <type>(<scope>): <subject>
15
- <BLANK LINE>
16
- <body>
17
- <BLANK LINE>
18
- <footer>
19
- ```
20
-
21
- ### Type
22
-
23
- Must be one of the following:
24
-
25
- - **feat**: A new feature. **Will trigger a new release**
26
- - **fix**: A bug fix or a addition to one of the target arrays. **Will trigger a new release**
27
- - **docs**: Documentation only changes
28
- - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
29
- - **refactor**: A code change that neither fixes a bug nor adds a feature
30
- - **perf**: A code change that improves performance
31
- - **test**: Adding missing or correcting existing tests
32
- - **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
33
-
34
-
35
- ### Patch Release
36
-
37
- ```
38
- fix(electron): Support Electron 1.8.0
39
- ```
40
-
41
- ### ~~Minor~~ Feature Release
42
-
43
- ```
44
- feat: add .getTarget(abi, runtime)
45
- ```
46
-
47
- ### ~~Major~~ Breaking Release
48
-
49
- ```
50
- feat: Add amazing new feature
51
-
52
- BREAKING CHANGE: This removes support for Node 0.10 and 0.12.
53
- ```
54
-
55
- ## Pull request guidelines
56
-
57
- Here are some things to keep in mind as you file pull requests to fix bugs, add new features, etc.:
58
-
59
- - CircleCI is used to make sure that the project builds packages as expected on the supported platforms, using supported Node.js versions.
60
- - Unless it's impractical, please write tests for your changes. This will help us so that we can spot regressions much easier.
61
- - Squashing commits during discussion of the pull request is almost always unnecessary, and makes it more difficult for both the submitters and reviewers to understand what changed in between comments. However, rebasing is encouraged when practical, particularly when there's a merge conflict.
62
- - If you are continuing the work of another person's PR and need to rebase/squash, please retain the attribution of the original author(s) and continue the work in subsequent commits.
@@ -1,119 +0,0 @@
1
- const got = require('got')
2
- const path = require('path')
3
- const semver = require('semver')
4
- const { writeFile } = require('fs').promises
5
-
6
- async function getJSONFromCDN (urlPath) {
7
- const response = await got(`https://cdn.jsdelivr.net/gh/${urlPath}`)
8
- return JSON.parse(response.body)
9
- }
10
-
11
- async function fetchElectronReleases () {
12
- const response = await got(`https://electronjs.org/headers/index.json`)
13
- return JSON.parse(response.body)
14
- }
15
-
16
- async function fetchNodeVersions () {
17
- const schedule = await getJSONFromCDN('nodejs/Release@main/schedule.json')
18
- const versions = {}
19
-
20
- for (const [majorVersion, metadata] of Object.entries(schedule)) {
21
- if (majorVersion.startsWith('v0')) {
22
- continue
23
- }
24
- const version = `${majorVersion.slice(1)}.0.0`
25
- const lts = metadata.hasOwnProperty('lts') ? [metadata.lts, metadata.maintenance] : false
26
- versions[version] = {
27
- runtime: 'node',
28
- target: version,
29
- lts: lts,
30
- future: new Date(Date.parse(metadata.start)) > new Date()
31
- }
32
- }
33
-
34
- return versions
35
- }
36
-
37
- async function fetchAbiVersions () {
38
- return (await getJSONFromCDN('nodejs/node@main/doc/abi_version_registry.json'))
39
- .NODE_MODULE_VERSION
40
- .filter(({ modules }) => modules > 66)
41
- }
42
-
43
- function electronReleasesToTargets (releases) {
44
- const versions = releases.map(({ version }) => version)
45
- const versionsByModules = releases
46
- .filter(release => Number(release.modules) >= 70)
47
- .map(({ version, modules }) => ({
48
- version,
49
- modules,
50
- }))
51
- .filter(({ version }) => !version.includes('nightly'))
52
- .sort((a, b) => Number(a.modules) - Number(b.modules))
53
- .reduce(
54
- (acc, { modules, version }) => ({
55
- ...acc,
56
- [`${version.split('.')[0]}-${modules}`]: {
57
- version,
58
- modules,
59
- }
60
- }),
61
- {}
62
- )
63
-
64
- return Object.entries(versionsByModules)
65
- .map(
66
- ([major, {version, modules}]) => ({
67
- abi: modules,
68
- future: !versions.find(
69
- v => {
70
- const major = version.split(".")[0]
71
- return semver.satisfies(
72
- v,
73
- /^[0-9]/.test(major) ? `>= ${major}` : major
74
- )
75
- }
76
- ),
77
- lts: false,
78
- runtime: 'electron',
79
- target: version
80
- })
81
- )
82
- }
83
-
84
- function nodeVersionsToTargets (abiVersions, nodeVersions) {
85
- return Object.values(
86
- abiVersions
87
- .filter(({ runtime }) => runtime === 'node')
88
- .reduce(
89
- (acc, abiVersion) => {
90
- const { version: nodeVersion } = semver.coerce(abiVersion.versions)
91
-
92
- return {
93
- [nodeVersion]: {
94
- ...nodeVersions[nodeVersion],
95
- abi: abiVersion.modules.toString(),
96
- },
97
- ...acc,
98
- };
99
- },
100
- {}
101
- )
102
- )
103
- }
104
-
105
- async function main () {
106
- const nodeVersions = await fetchNodeVersions()
107
- const abiVersions = await fetchAbiVersions()
108
- const electronReleases = await fetchElectronReleases()
109
- const electronTargets = electronReleasesToTargets(electronReleases)
110
- const nodeTargets = nodeVersionsToTargets(abiVersions, nodeVersions)
111
- const supportedTargets = [
112
- ...nodeTargets,
113
- ...electronTargets,
114
- ]
115
-
116
- await writeFile(path.resolve(__dirname, '..', 'abi_registry.json'), JSON.stringify(supportedTargets, null, 2))
117
- }
118
-
119
- main()
package/test/index.js DELETED
@@ -1,166 +0,0 @@
1
- var test = require('tape')
2
- var semver = require('semver')
3
- var getAbi = require('../index').getAbi
4
- var getTarget = require('../index').getTarget
5
- var getNextTarget = require('../index')._getNextTarget
6
- var allTargets = require('../index').allTargets
7
-
8
- test('getNextTarget gets the next unsupported target', function (t) {
9
- var mockTargets = [
10
- {runtime: 'node', target: '7.0.0', abi: '51', lts: false},
11
- {runtime: 'node', target: '8.0.0', abi: '57', lts: false},
12
- {runtime: 'electron', target: '0.36.0', abi: '47', lts: false},
13
- {runtime: 'electron', target: '1.1.0', abi: '48', lts: false}
14
- ]
15
- t.equal(getNextTarget('node', mockTargets), '9.0.0')
16
- t.equal(getNextTarget('electron', mockTargets), '1.2.0')
17
- t.end()
18
- })
19
-
20
- test('getTarget calculates correct Node target', function (t) {
21
- t.equal(getTarget(undefined), process.versions.node)
22
- t.equal(getTarget(null), process.versions.node)
23
- t.equal(getTarget('11'), '0.10.4')
24
- t.equal(getTarget('14'), '0.11.11')
25
- t.equal(getTarget('46'), '4.0.0')
26
- t.equal(getTarget('47'), '5.0.0')
27
- t.equal(getTarget('48'), '6.0.0')
28
- t.equal(getTarget('51'), '7.0.0')
29
- t.equal(getTarget('67'), '11.0.0')
30
- t.equal(getTarget('72'), '12.0.0')
31
- t.equal(getTarget('83'), '14.0.0')
32
- t.equal(getTarget('88'), '15.0.0')
33
- t.end()
34
- })
35
-
36
- test('getTarget calculates correct Electron target', function (t) {
37
- t.throws(getTarget.bind(null, '14', 'electron'))
38
- t.equal(getTarget('47', 'electron'), '0.36.0')
39
- t.equal(getTarget('48', 'electron'), '1.1.0')
40
- t.equal(getTarget('49', 'electron'), '1.3.0')
41
- t.equal(getTarget('50', 'electron'), '1.4.0')
42
- t.equal(getTarget('76', 'electron'), '8.0.0')
43
- t.equal(getTarget('82', 'electron'), '10.0.0')
44
- t.equal(getTarget('89', 'electron'), '13.0.0')
45
- t.end()
46
- })
47
-
48
- test('getTarget calculates correct Node-Webkit target', function (t) {
49
- t.throws(getTarget.bind(null, '14', 'ode-webkit'))
50
- t.equal(getTarget('47', 'node-webkit'), '0.13.0')
51
- t.equal(getTarget('48', 'node-webkit'), '0.15.0')
52
- t.equal(getTarget('51', 'node-webkit'), '0.18.3')
53
- t.equal(getTarget('57', 'node-webkit'), '0.23.0')
54
- t.equal(getTarget('59', 'node-webkit'), '0.26.5')
55
- t.end()
56
- })
57
-
58
- test('getAbi calculates correct Node ABI', function (t) {
59
- t.equal(getAbi(undefined), process.versions.modules)
60
- t.equal(getAbi(null), process.versions.modules)
61
- t.throws(function () { getAbi('a.b.c') })
62
- t.throws(function () { getAbi(getNextTarget('node')) })
63
- t.equal(getAbi('15.0.0'), '88')
64
- t.equal(getAbi('14.0.0'), '83')
65
- t.equal(getAbi('13.0.0'), '79')
66
- t.equal(getAbi('12.0.0'), '72')
67
- t.equal(getAbi('11.0.0'), '67')
68
- t.equal(getAbi('7.2.0'), '51')
69
- t.equal(getAbi('7.0.0'), '51')
70
- t.equal(getAbi('6.9.9'), '48')
71
- t.equal(getAbi('6.0.0'), '48')
72
- t.equal(getAbi('5.9.9'), '47')
73
- t.equal(getAbi('5.0.0'), '47')
74
- t.equal(getAbi('4.9.9'), '46')
75
- t.equal(getAbi('4.0.0'), '46')
76
- t.equal(getAbi('0.12.17'), '14')
77
- t.equal(getAbi('0.12.0'), '14')
78
- t.equal(getAbi('0.11.16'), '14')
79
- t.equal(getAbi('0.11.11'), '14')
80
- t.equal(getAbi('0.11.10'), '13')
81
- t.equal(getAbi('0.11.8'), '13')
82
- t.equal(getAbi('0.11.7'), '0x000C')
83
- t.equal(getAbi('0.11.0'), '0x000C')
84
- t.equal(getAbi('0.10.48'), '11')
85
- t.equal(getAbi('0.10.30'), '11')
86
- t.equal(getAbi('0.10.4'), '11')
87
- t.equal(getAbi('0.10.3'), '0x000B')
88
- t.equal(getAbi('0.10.1'), '0x000B')
89
- t.equal(getAbi('0.10.0'), '0x000B')
90
- t.equal(getAbi('0.9.12'), '0x000B')
91
- t.equal(getAbi('0.9.9'), '0x000B')
92
- t.equal(getAbi('0.9.8'), '0x000A')
93
- t.equal(getAbi('0.9.1'), '0x000A')
94
- t.equal(getAbi('0.9.0'), '1')
95
- t.equal(getAbi('0.8.0'), '1')
96
- t.equal(getAbi('0.2.0'), '1')
97
- t.end()
98
- })
99
-
100
- test('getAbi calculates correct Electron ABI', function (t) {
101
- t.throws(function () { getAbi(undefined, 'electron') })
102
- t.throws(function () { getAbi(getNextTarget('electron'), 'electron') })
103
- t.equal(getAbi('15.0.0-beta.1', 'electron'), '89')
104
- t.equal(getAbi('14.1.1', 'electron'), '97')
105
- t.equal(getAbi('14.0.0', 'electron'), '89')
106
- t.equal(getAbi('13.0.0', 'electron'), '89')
107
- t.equal(getAbi('12.0.0', 'electron'), '87')
108
- t.equal(getAbi('11.0.0', 'electron'), '85')
109
- t.equal(getAbi('10.0.0', 'electron'), '82')
110
- t.equal(getAbi('9.0.0', 'electron'), '80')
111
- t.equal(getAbi('8.0.0', 'electron'), '76')
112
- t.equal(getAbi('7.0.0', 'electron'), '75')
113
- t.equal(getAbi('6.0.0', 'electron'), '73')
114
- t.equal(getAbi('5.0.0', 'electron'), '70')
115
- t.equal(getAbi('4.1.4', 'electron'), '69')
116
- t.equal(getAbi('4.0.4', 'electron'), '69')
117
- t.equal(getAbi('4.0.3', 'electron'), '64')
118
- t.equal(getAbi('3.1.8', 'electron'), '64')
119
- t.equal(getAbi('2.0.18', 'electron'), '57')
120
- t.equal(getAbi('1.4.0', 'electron'), '50')
121
- t.equal(getAbi('1.3.0', 'electron'), '49')
122
- t.equal(getAbi('1.2.0', 'electron'), '48')
123
- t.equal(getAbi('1.1.0', 'electron'), '48')
124
- t.equal(getAbi('1.0.0', 'electron'), '47')
125
- t.equal(getAbi('0.37.0', 'electron'), '47')
126
- t.equal(getAbi('0.36.0', 'electron'), '47')
127
- t.equal(getAbi('0.35.0', 'electron'), '46')
128
- t.equal(getAbi('0.34.0', 'electron'), '46')
129
- t.equal(getAbi('0.33.0', 'electron'), '46')
130
- t.equal(getAbi('0.32.0', 'electron'), '45')
131
- t.equal(getAbi('0.31.0', 'electron'), '45')
132
- t.equal(getAbi('0.30.0', 'electron'), '44')
133
- t.end()
134
- })
135
-
136
- test('getAbi calculates correct Node-Webkit ABI', function (t) {
137
- t.throws(function () { getAbi(undefined, 'node-webkit') })
138
- t.throws(function () { getAbi(getNextTarget('node-webkit'), 'node-webkit') })
139
- t.equal(getAbi('0.13.0', 'node-webkit'), '47')
140
- t.equal(getAbi('0.14.0', 'node-webkit'), '47')
141
- t.equal(getAbi('0.15.0', 'node-webkit'), '48')
142
- t.equal(getAbi('0.16.0', 'node-webkit'), '48')
143
- t.equal(getAbi('0.17.0', 'node-webkit'), '48')
144
- t.equal(getAbi('0.18.2', 'node-webkit'), '48')
145
- t.equal(getAbi('0.18.3', 'node-webkit'), '51')
146
- t.equal(getAbi('0.19.0', 'node-webkit'), '51')
147
- t.equal(getAbi('0.20.0', 'node-webkit'), '51')
148
- t.equal(getAbi('0.21.0', 'node-webkit'), '51')
149
- t.equal(getAbi('0.22.0', 'node-webkit'), '51')
150
- t.equal(getAbi('0.23.0', 'node-webkit'), '57')
151
- t.equal(getAbi('0.24.0', 'node-webkit'), '57')
152
- t.equal(getAbi('0.25.0', 'node-webkit'), '57')
153
- t.equal(getAbi('0.26.4', 'node-webkit'), '57')
154
- t.equal(getAbi('0.26.5', 'node-webkit'), '59')
155
- t.end()
156
- })
157
-
158
- test('getAbi supports leading v', function (t) {
159
- t.equal(getAbi('v7.2.0'), '51')
160
- t.end()
161
- })
162
-
163
- test('getAbi returns abi if passed as target', function (t) {
164
- t.equal(getAbi('57'), '57')
165
- t.end()
166
- })