update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
16
electron/node_modules/node-abi/abi_registry.json
generated
vendored
16
electron/node_modules/node-abi/abi_registry.json
generated
vendored
|
|
@ -431,9 +431,23 @@
|
|||
},
|
||||
{
|
||||
"abi": "146",
|
||||
"future": true,
|
||||
"future": false,
|
||||
"lts": false,
|
||||
"runtime": "electron",
|
||||
"target": "42.0.0-alpha.1"
|
||||
},
|
||||
{
|
||||
"abi": "148",
|
||||
"future": false,
|
||||
"lts": false,
|
||||
"runtime": "electron",
|
||||
"target": "43.0.0-alpha.1"
|
||||
},
|
||||
{
|
||||
"abi": "149",
|
||||
"future": true,
|
||||
"lts": false,
|
||||
"runtime": "electron",
|
||||
"target": "44.0.0-alpha.1"
|
||||
}
|
||||
]
|
||||
17
electron/node_modules/node-abi/getNextTarget.js
generated
vendored
Normal file
17
electron/node_modules/node-abi/getNextTarget.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import semver from 'semver';
|
||||
|
||||
export function getNextTarget(runtime, targets) {
|
||||
const latest = targets
|
||||
.filter((t) => {
|
||||
return t.runtime === runtime;
|
||||
})
|
||||
.slice(-1)[0];
|
||||
const increment = runtime === 'electron' ? 'minor' : 'major';
|
||||
let next = semver.inc(latest.target, increment);
|
||||
// Electron releases appear in the registry in their beta form, sometimes there is
|
||||
// no active beta line. During this time we need to double bump
|
||||
if (runtime === 'electron' && semver.parse(latest.target).prerelease.length) {
|
||||
next = semver.inc(next, 'major');
|
||||
}
|
||||
return next;
|
||||
}
|
||||
255
electron/node_modules/node-abi/index.js
generated
vendored
255
electron/node_modules/node-abi/index.js
generated
vendored
|
|
@ -1,179 +1,176 @@
|
|||
var semver = require('semver')
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
function getNextTarget (runtime, targets) {
|
||||
if (targets == null) targets = allTargets
|
||||
var latest = targets.filter(function (t) { return t.runtime === runtime }).slice(-1)[0]
|
||||
var increment = runtime === 'electron' ? 'minor' : 'major'
|
||||
var next = semver.inc(latest.target, increment)
|
||||
// Electron releases appear in the registry in their beta form, sometimes there is
|
||||
// no active beta line. During this time we need to double bump
|
||||
if (runtime === 'electron' && semver.parse(latest.target).prerelease.length) {
|
||||
next = semver.inc(next, 'major')
|
||||
}
|
||||
return next
|
||||
}
|
||||
import semver from 'semver';
|
||||
|
||||
function getAbi (target, runtime) {
|
||||
if (target === String(Number(target))) return target
|
||||
if (target) target = target.replace(/^v/, '')
|
||||
if (!runtime) runtime = 'node'
|
||||
import { getNextTarget } from './getNextTarget.js';
|
||||
|
||||
export function getAbi(target, runtime) {
|
||||
if (target === String(Number(target))) return target;
|
||||
if (target) target = target.replace(/^v/, '');
|
||||
if (!runtime) runtime = 'node';
|
||||
|
||||
if (runtime === 'node') {
|
||||
if (!target) return process.versions.modules
|
||||
if (target === process.versions.node) return process.versions.modules
|
||||
if (!target) return process.versions.modules;
|
||||
if (target === process.versions.node) return process.versions.modules;
|
||||
}
|
||||
|
||||
var abi
|
||||
var lastTarget
|
||||
let abi;
|
||||
let lastTarget;
|
||||
|
||||
for (var i = 0; i < allTargets.length; i++) {
|
||||
var t = allTargets[i]
|
||||
if (t.runtime !== runtime) continue
|
||||
for (let i = 0; i < allTargets.length; i++) {
|
||||
const t = allTargets[i];
|
||||
if (t.runtime !== runtime) continue;
|
||||
if (semver.lte(t.target, target) && (!lastTarget || semver.gte(t.target, lastTarget))) {
|
||||
abi = t.abi
|
||||
lastTarget = t.target
|
||||
abi = t.abi;
|
||||
lastTarget = t.target;
|
||||
}
|
||||
}
|
||||
|
||||
if (abi && semver.lt(target, getNextTarget(runtime))) return abi
|
||||
throw new Error('Could not detect abi for version ' + target + ' and runtime ' + runtime + '. Updating "node-abi" might help solve this issue if it is a new release of ' + runtime)
|
||||
if (abi && semver.lt(target, getNextTarget(runtime, allTargets))) return abi;
|
||||
throw new Error(
|
||||
'Could not detect abi for version ' +
|
||||
target +
|
||||
' and runtime ' +
|
||||
runtime +
|
||||
'. Updating "node-abi" might help solve this issue if it is a new release of ' +
|
||||
runtime,
|
||||
);
|
||||
}
|
||||
|
||||
function getTarget (abi, runtime) {
|
||||
if (abi && abi !== String(Number(abi))) return abi
|
||||
if (!runtime) runtime = 'node'
|
||||
export function getTarget(abi, runtime) {
|
||||
if (abi && abi !== String(Number(abi))) return abi;
|
||||
if (!runtime) runtime = 'node';
|
||||
|
||||
if (runtime === 'node' && !abi) return process.versions.node
|
||||
if (runtime === 'node' && !abi) return process.versions.node;
|
||||
|
||||
var match = allTargets
|
||||
const match = allTargets
|
||||
.filter(function (t) {
|
||||
return t.abi === abi && t.runtime === runtime
|
||||
return t.abi === abi && t.runtime === runtime;
|
||||
})
|
||||
.map(function (t) {
|
||||
return t.target
|
||||
})
|
||||
return t.target;
|
||||
});
|
||||
if (match.length) {
|
||||
var betaSeparatorIndex = match[0].indexOf("-")
|
||||
return betaSeparatorIndex > -1
|
||||
? match[0].substring(0, betaSeparatorIndex)
|
||||
: match[0]
|
||||
const betaSeparatorIndex = match[0].indexOf('-');
|
||||
return betaSeparatorIndex > -1 ? match[0].substring(0, betaSeparatorIndex) : match[0];
|
||||
}
|
||||
|
||||
throw new Error('Could not detect target for abi ' + abi + ' and runtime ' + runtime)
|
||||
throw new Error('Could not detect target for abi ' + abi + ' and runtime ' + runtime);
|
||||
}
|
||||
|
||||
function sortByTargetFn (a, b) {
|
||||
var abiComp = Number(a.abi) - Number(b.abi)
|
||||
if (abiComp !== 0) return abiComp
|
||||
if (a.target < b.target) return -1
|
||||
if (a.target > b.target) return 1
|
||||
return 0
|
||||
function sortByTargetFn(a, b) {
|
||||
const abiComp = Number(a.abi) - Number(b.abi);
|
||||
if (abiComp !== 0) return abiComp;
|
||||
if (a.target < b.target) return -1;
|
||||
if (a.target > b.target) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
function loadGeneratedTargets () {
|
||||
var registry = require('./abi_registry.json')
|
||||
var targets = {
|
||||
function loadGeneratedTargets() {
|
||||
const registry = JSON.parse(
|
||||
fs.readFileSync(
|
||||
path.join(path.dirname(fileURLToPath(import.meta.url)), 'abi_registry.json'),
|
||||
'utf8',
|
||||
),
|
||||
);
|
||||
const targets = {
|
||||
supported: [],
|
||||
additional: [],
|
||||
future: []
|
||||
}
|
||||
future: [],
|
||||
};
|
||||
|
||||
registry.forEach(function (item) {
|
||||
var target = {
|
||||
const target = {
|
||||
runtime: item.runtime,
|
||||
target: item.target,
|
||||
abi: item.abi
|
||||
}
|
||||
abi: item.abi,
|
||||
};
|
||||
if (item.lts) {
|
||||
var startDate = new Date(Date.parse(item.lts[0]))
|
||||
var endDate = new Date(Date.parse(item.lts[1]))
|
||||
var currentDate = new Date()
|
||||
target.lts = startDate < currentDate && currentDate < endDate
|
||||
const startDate = new Date(Date.parse(item.lts[0]));
|
||||
const endDate = new Date(Date.parse(item.lts[1]));
|
||||
const currentDate = new Date();
|
||||
target.lts = startDate < currentDate && currentDate < endDate;
|
||||
} else {
|
||||
target.lts = false
|
||||
target.lts = false;
|
||||
}
|
||||
|
||||
if (target.runtime === 'node-webkit') {
|
||||
targets.additional.push(target)
|
||||
targets.additional.push(target);
|
||||
} else if (item.future) {
|
||||
targets.future.push(target)
|
||||
targets.future.push(target);
|
||||
} else {
|
||||
targets.supported.push(target)
|
||||
targets.supported.push(target);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
targets.supported.sort(sortByTargetFn)
|
||||
targets.additional.sort(sortByTargetFn)
|
||||
targets.future.sort(sortByTargetFn)
|
||||
targets.supported.sort(sortByTargetFn);
|
||||
targets.additional.sort(sortByTargetFn);
|
||||
targets.future.sort(sortByTargetFn);
|
||||
|
||||
return targets
|
||||
return targets;
|
||||
}
|
||||
|
||||
var generatedTargets = loadGeneratedTargets()
|
||||
const generatedTargets = loadGeneratedTargets();
|
||||
|
||||
var supportedTargets = [
|
||||
{runtime: 'node', target: '5.0.0', abi: '47', lts: false},
|
||||
{runtime: 'node', target: '6.0.0', abi: '48', lts: false},
|
||||
{runtime: 'node', target: '7.0.0', abi: '51', lts: false},
|
||||
{runtime: 'node', target: '8.0.0', abi: '57', lts: false},
|
||||
{runtime: 'node', target: '9.0.0', abi: '59', lts: false},
|
||||
{runtime: 'node', target: '10.0.0', abi: '64', lts: new Date(2018, 10, 1) < new Date() && new Date() < new Date(2020, 4, 31)},
|
||||
{runtime: 'electron', target: '0.36.0', abi: '47', lts: false},
|
||||
{runtime: 'electron', target: '1.1.0', abi: '48', lts: false},
|
||||
{runtime: 'electron', target: '1.3.0', abi: '49', lts: false},
|
||||
{runtime: 'electron', target: '1.4.0', abi: '50', lts: false},
|
||||
{runtime: 'electron', target: '1.5.0', abi: '51', lts: false},
|
||||
{runtime: 'electron', target: '1.6.0', abi: '53', lts: false},
|
||||
{runtime: 'electron', target: '1.7.0', abi: '54', lts: false},
|
||||
{runtime: 'electron', target: '1.8.0', abi: '57', lts: false},
|
||||
{runtime: 'electron', target: '2.0.0', abi: '57', lts: false},
|
||||
{runtime: 'electron', target: '3.0.0', abi: '64', lts: false},
|
||||
{runtime: 'electron', target: '4.0.0', abi: '64', lts: false},
|
||||
{runtime: 'electron', target: '4.0.4', abi: '69', lts: false}
|
||||
]
|
||||
export const supportedTargets = [
|
||||
{ runtime: 'node', target: '5.0.0', abi: '47', lts: false },
|
||||
{ runtime: 'node', target: '6.0.0', abi: '48', lts: false },
|
||||
{ runtime: 'node', target: '7.0.0', abi: '51', lts: false },
|
||||
{ runtime: 'node', target: '8.0.0', abi: '57', lts: false },
|
||||
{ runtime: 'node', target: '9.0.0', abi: '59', lts: false },
|
||||
{
|
||||
runtime: 'node',
|
||||
target: '10.0.0',
|
||||
abi: '64',
|
||||
lts: new Date(2018, 10, 1) < new Date() && new Date() < new Date(2020, 4, 31),
|
||||
},
|
||||
{ runtime: 'electron', target: '0.36.0', abi: '47', lts: false },
|
||||
{ runtime: 'electron', target: '1.1.0', abi: '48', lts: false },
|
||||
{ runtime: 'electron', target: '1.3.0', abi: '49', lts: false },
|
||||
{ runtime: 'electron', target: '1.4.0', abi: '50', lts: false },
|
||||
{ runtime: 'electron', target: '1.5.0', abi: '51', lts: false },
|
||||
{ runtime: 'electron', target: '1.6.0', abi: '53', lts: false },
|
||||
{ runtime: 'electron', target: '1.7.0', abi: '54', lts: false },
|
||||
{ runtime: 'electron', target: '1.8.0', abi: '57', lts: false },
|
||||
{ runtime: 'electron', target: '2.0.0', abi: '57', lts: false },
|
||||
{ runtime: 'electron', target: '3.0.0', abi: '64', lts: false },
|
||||
{ runtime: 'electron', target: '4.0.0', abi: '64', lts: false },
|
||||
{ runtime: 'electron', target: '4.0.4', abi: '69', lts: false },
|
||||
...generatedTargets.supported,
|
||||
];
|
||||
|
||||
supportedTargets.push.apply(supportedTargets, generatedTargets.supported)
|
||||
export const additionalTargets = [
|
||||
{ runtime: 'node-webkit', target: '0.13.0', abi: '47', lts: false },
|
||||
{ runtime: 'node-webkit', target: '0.15.0', abi: '48', lts: false },
|
||||
{ runtime: 'node-webkit', target: '0.18.3', abi: '51', lts: false },
|
||||
{ runtime: 'node-webkit', target: '0.23.0', abi: '57', lts: false },
|
||||
{ runtime: 'node-webkit', target: '0.26.5', abi: '59', lts: false },
|
||||
...generatedTargets.additional,
|
||||
];
|
||||
|
||||
var additionalTargets = [
|
||||
{runtime: 'node-webkit', target: '0.13.0', abi: '47', lts: false},
|
||||
{runtime: 'node-webkit', target: '0.15.0', abi: '48', lts: false},
|
||||
{runtime: 'node-webkit', target: '0.18.3', abi: '51', lts: false},
|
||||
{runtime: 'node-webkit', target: '0.23.0', abi: '57', lts: false},
|
||||
{runtime: 'node-webkit', target: '0.26.5', abi: '59', lts: false}
|
||||
]
|
||||
export const deprecatedTargets = [
|
||||
{ runtime: 'node', target: '0.2.0', abi: '1', lts: false },
|
||||
{ runtime: 'node', target: '0.9.1', abi: '0x000A', lts: false },
|
||||
{ runtime: 'node', target: '0.9.9', abi: '0x000B', lts: false },
|
||||
{ runtime: 'node', target: '0.10.4', abi: '11', lts: false },
|
||||
{ runtime: 'node', target: '0.11.0', abi: '0x000C', lts: false },
|
||||
{ runtime: 'node', target: '0.11.8', abi: '13', lts: false },
|
||||
{ runtime: 'node', target: '0.11.11', abi: '14', lts: false },
|
||||
{ runtime: 'node', target: '1.0.0', abi: '42', lts: false },
|
||||
{ runtime: 'node', target: '1.1.0', abi: '43', lts: false },
|
||||
{ runtime: 'node', target: '2.0.0', abi: '44', lts: false },
|
||||
{ runtime: 'node', target: '3.0.0', abi: '45', lts: false },
|
||||
{ runtime: 'node', target: '4.0.0', abi: '46', lts: false },
|
||||
{ runtime: 'electron', target: '0.30.0', abi: '44', lts: false },
|
||||
{ runtime: 'electron', target: '0.31.0', abi: '45', lts: false },
|
||||
{ runtime: 'electron', target: '0.33.0', abi: '46', lts: false },
|
||||
];
|
||||
|
||||
additionalTargets.push.apply(additionalTargets, generatedTargets.additional)
|
||||
export const futureTargets = generatedTargets.future;
|
||||
|
||||
var deprecatedTargets = [
|
||||
{runtime: 'node', target: '0.2.0', abi: '1', lts: false},
|
||||
{runtime: 'node', target: '0.9.1', abi: '0x000A', lts: false},
|
||||
{runtime: 'node', target: '0.9.9', abi: '0x000B', lts: false},
|
||||
{runtime: 'node', target: '0.10.4', abi: '11', lts: false},
|
||||
{runtime: 'node', target: '0.11.0', abi: '0x000C', lts: false},
|
||||
{runtime: 'node', target: '0.11.8', abi: '13', lts: false},
|
||||
{runtime: 'node', target: '0.11.11', abi: '14', lts: false},
|
||||
{runtime: 'node', target: '1.0.0', abi: '42', lts: false},
|
||||
{runtime: 'node', target: '1.1.0', abi: '43', lts: false},
|
||||
{runtime: 'node', target: '2.0.0', abi: '44', lts: false},
|
||||
{runtime: 'node', target: '3.0.0', abi: '45', lts: false},
|
||||
{runtime: 'node', target: '4.0.0', abi: '46', lts: false},
|
||||
{runtime: 'electron', target: '0.30.0', abi: '44', lts: false},
|
||||
{runtime: 'electron', target: '0.31.0', abi: '45', lts: false},
|
||||
{runtime: 'electron', target: '0.33.0', abi: '46', lts: false}
|
||||
]
|
||||
|
||||
var futureTargets = generatedTargets.future
|
||||
|
||||
var allTargets = deprecatedTargets
|
||||
export const allTargets = deprecatedTargets
|
||||
.concat(supportedTargets)
|
||||
.concat(additionalTargets)
|
||||
.concat(futureTargets)
|
||||
|
||||
exports.getAbi = getAbi
|
||||
exports.getTarget = getTarget
|
||||
exports.deprecatedTargets = deprecatedTargets
|
||||
exports.supportedTargets = supportedTargets
|
||||
exports.additionalTargets = additionalTargets
|
||||
exports.futureTargets = futureTargets
|
||||
exports.allTargets = allTargets
|
||||
exports._getNextTarget = getNextTarget
|
||||
.concat(futureTargets);
|
||||
|
|
|
|||
78
electron/node_modules/node-abi/package.json
generated
vendored
78
electron/node_modules/node-abi/package.json
generated
vendored
|
|
@ -1,45 +1,61 @@
|
|||
{
|
||||
"name": "node-abi",
|
||||
"version": "3.90.0",
|
||||
"version": "4.33.0",
|
||||
"description": "Get the Node ABI for a given target and runtime, and vice versa.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "tape test/index.js",
|
||||
"update-abi-registry": "node --unhandled-rejections=strict scripts/update-abi-registry.js"
|
||||
},
|
||||
"files": [
|
||||
"abi_registry.json"
|
||||
"keywords": [
|
||||
"abi",
|
||||
"electron",
|
||||
"node",
|
||||
"node_module_version",
|
||||
"v8"
|
||||
],
|
||||
"homepage": "https://github.com/electron/node-abi#readme",
|
||||
"bugs": {
|
||||
"url": "https://github.com/electron/node-abi/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Lukas Geiger",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/electron/node-abi.git"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"electron",
|
||||
"node_module_version",
|
||||
"abi",
|
||||
"v8"
|
||||
"files": [
|
||||
"abi_registry.json",
|
||||
"index.js",
|
||||
"getNextTarget.js"
|
||||
],
|
||||
"author": "Lukas Geiger",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/electron/node-abi/issues"
|
||||
},
|
||||
"homepage": "https://github.com/electron/node-abi#readme",
|
||||
"devDependencies": {
|
||||
"@semantic-release/npm": "13.0.0-alpha.15",
|
||||
"semantic-release": "^24.2.7",
|
||||
"tape": "^5.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": "^7.3.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"publishConfig": {
|
||||
"provenance": true
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node --test test/index.js",
|
||||
"lint": "oxfmt --check . && oxlint",
|
||||
"lint:fix": "oxfmt --write . && oxlint --fix",
|
||||
"update-abi-registry": "node --unhandled-rejections=strict scripts/update-abi-registry.js",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": "^7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^16.4.0",
|
||||
"oxfmt": "^0.44.0",
|
||||
"oxlint": "^1.59.0"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,mjs,cjs}": [
|
||||
"oxfmt --write",
|
||||
"oxlint"
|
||||
],
|
||||
"*.{json,css,html}": [
|
||||
"oxfmt --write"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
},
|
||||
"packageManager": "yarn@4.10.3+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue