yarn2nix-moretea: update dependencies for yarn2nix (#465389)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
@@ -56,9 +56,9 @@ if (json.type !== "success") {
|
||||
let pkgs = R.pipe(
|
||||
mapObjIndexedReturnArray((value, key) => ({
|
||||
...value,
|
||||
nameWithVersion: key
|
||||
nameWithVersion: key,
|
||||
})),
|
||||
R.uniqBy(R.prop("resolved"))
|
||||
R.uniqBy(R.prop("resolved")),
|
||||
)(json.object);
|
||||
|
||||
(async () => {
|
||||
@@ -83,7 +83,7 @@ let pkgs = R.pipe(
|
||||
// print to stdout
|
||||
console.log(generateNix(pkgs, options["--builtin-fetchgit"]));
|
||||
}
|
||||
})().catch(error => {
|
||||
})().catch((error) => {
|
||||
console.error(error);
|
||||
|
||||
process.exit(1);
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import { defineConfig } from "eslint/config";
|
||||
|
||||
|
||||
export default defineConfig([
|
||||
{ files: ["**/*.{js,mjs,cjs}"],
|
||||
plugins: { js },
|
||||
extends: ["js/recommended"],
|
||||
rules: {
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"argsIgnorePattern": "^_",
|
||||
"varsIgnorePattern": "^_",
|
||||
"caughtErrorsIgnorePattern": "^_",
|
||||
"destructuredArrayIgnorePattern": "^_"
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
|
||||
{ files: ["**/*.{js,mjs,cjs}"], languageOptions: { globals: globals.node } },
|
||||
]);
|
||||
@@ -7,7 +7,7 @@ const crypto = require("crypto");
|
||||
|
||||
function getSha1(url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
https.get(url, res => {
|
||||
https.get(url, (res) => {
|
||||
const { statusCode } = res;
|
||||
const hash = crypto.createHash("sha1");
|
||||
|
||||
@@ -20,7 +20,7 @@ function getSha1(url) {
|
||||
reject(err);
|
||||
}
|
||||
|
||||
res.on("data", chunk => {
|
||||
res.on("data", (chunk) => {
|
||||
hash.update(chunk);
|
||||
});
|
||||
|
||||
@@ -39,7 +39,7 @@ async function fixPkgAddMissingSha1(pkg) {
|
||||
|
||||
if (!pkg.resolved) {
|
||||
console.error(
|
||||
`yarn2nix: can't find "resolved" field for package ${pkg.nameWithVersion}, you probably required it using "file:...", this feature is not supported, ignoring`
|
||||
`yarn2nix: can't find "resolved" field for package ${pkg.nameWithVersion}, you probably required it using "file:...", this feature is not supported, ignoring`,
|
||||
);
|
||||
return pkg;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ async function fixPkgAddMissingSha1(pkg) {
|
||||
|
||||
return {
|
||||
...pkg,
|
||||
resolved: `${url}#${newSha1}`
|
||||
resolved: `${url}#${newSha1}`,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@ function prefetchgit(url, rev) {
|
||||
["--rev", rev, url, "--fetch-submodules"],
|
||||
{
|
||||
stdio: ["ignore", "pipe", "ignore"],
|
||||
timeout: 60000
|
||||
}
|
||||
)
|
||||
timeout: 60000,
|
||||
},
|
||||
),
|
||||
).sha256;
|
||||
}
|
||||
|
||||
@@ -90,18 +90,18 @@ function parseIntegrity(maybeIntegrity, fallbackHash) {
|
||||
}
|
||||
}
|
||||
|
||||
algo = integrities.pickAlgorithm();
|
||||
hash = integrities[algo][0].digest;
|
||||
const algo = integrities.pickAlgorithm();
|
||||
const hash = integrities[algo][0].digest;
|
||||
return { algo, hash };
|
||||
}
|
||||
|
||||
function fetchLockedDep(builtinFetchGit) {
|
||||
return function(pkg) {
|
||||
return function (pkg) {
|
||||
const { integrity, nameWithVersion, resolved } = pkg;
|
||||
|
||||
if (!resolved) {
|
||||
console.error(
|
||||
`yarn2nix: can't find "resolved" field for package ${nameWithVersion}, you probably required it using "file:...", this feature is not supported, ignoring`
|
||||
`yarn2nix: can't find "resolved" field for package ${nameWithVersion}, you probably required it using "file:...", this feature is not supported, ignoring`,
|
||||
);
|
||||
return "";
|
||||
}
|
||||
@@ -122,7 +122,7 @@ function fetchLockedDep(builtinFetchGit) {
|
||||
githubUrl,
|
||||
githubRev,
|
||||
branch || "master",
|
||||
builtinFetchGit
|
||||
builtinFetchGit,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ function fetchLockedDep(builtinFetchGit) {
|
||||
urlForGit,
|
||||
rev,
|
||||
branch || "master",
|
||||
builtinFetchGit
|
||||
builtinFetchGit,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -165,12 +165,12 @@ const HEAD = `
|
||||
function generateNix(pkgs, builtinFetchGit) {
|
||||
const nameWithVersionAndPackageNix = R.map(
|
||||
fetchLockedDep(builtinFetchGit),
|
||||
pkgs
|
||||
pkgs,
|
||||
);
|
||||
|
||||
const packagesDefinition = R.join(
|
||||
"\n",
|
||||
R.values(nameWithVersionAndPackageNix)
|
||||
R.values(nameWithVersionAndPackageNix),
|
||||
);
|
||||
|
||||
return R.join("\n", [HEAD, packagesDefinition, " ];", "}"]);
|
||||
|
||||
@@ -15,7 +15,7 @@ const keys = require("ramda/src/keys");
|
||||
*/
|
||||
|
||||
const mapObjIndexedReturnArray = _curry2((fn, obj) =>
|
||||
_map(key => fn(obj[key], key, obj), keys(obj))
|
||||
_map((key) => fn(obj[key], key, obj), keys(obj)),
|
||||
);
|
||||
|
||||
module.exports = mapObjIndexedReturnArray;
|
||||
|
||||
@@ -15,30 +15,31 @@
|
||||
"yarn2nix": "bin/yarn2nix.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
"node": ">=22.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@yarnpkg/lockfile": "^1.1.0",
|
||||
"deep-equal": "^1.0.1",
|
||||
"deep-equal": "^2.2.3",
|
||||
"docopt": "^0.6.2",
|
||||
"ramda": "^0.26.1",
|
||||
"ssri": "^10.0.0"
|
||||
"ramda": "^0.32",
|
||||
"ssri": "^13.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.39.1",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"eslint": "^5.11.1",
|
||||
"eslint-config-airbnb": "^17.1.0",
|
||||
"eslint-config-prettier": "^3.3.0",
|
||||
"eslint-config-standard": "^12.0.0",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-plugin-import": "^2.14.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.1.2",
|
||||
"eslint-plugin-node": "^8.0.0",
|
||||
"eslint-plugin-promise": "^4.0.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^7.2.1",
|
||||
"eslint-plugin-react": "^7.12.2",
|
||||
"eslint-plugin-standard": "^4.0.0",
|
||||
"husky": "^1.3.1",
|
||||
"lint-staged": "^8.1.0",
|
||||
"prettier-eslint-cli": "^4.7.1"
|
||||
"globals": "^16.5.0",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^16.2.7",
|
||||
"prettier-eslint-cli": "^8.0.1"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user