Merge pull request #48 from stephank/fix/paths

Fix incorrect paths in generated expression
This commit is contained in:
Stéphan Kochen
2022-11-09 13:24:54 +01:00
committed by GitHub
6 changed files with 1434 additions and 1372 deletions
-783
View File
File diff suppressed because one or more lines are too long
+801
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
yarnPath: .yarn/releases/yarn-3.2.3.cjs yarnPath: .yarn/releases/yarn-3.2.4.cjs
+1 -1
View File
@@ -8,7 +8,7 @@
"build-dev": "./build.js", "build-dev": "./build.js",
"fmt": "prettier --write src" "fmt": "prettier --write src"
}, },
"packageManager": "yarn@3.2.3", "packageManager": "yarn@3.2.4",
"devDependencies": { "devDependencies": {
"@babel/core": "^7.11.4", "@babel/core": "^7.11.4",
"@babel/plugin-proposal-class-properties": "^7.10.4", "@babel/plugin-proposal-class-properties": "^7.10.4",
+2 -7
View File
@@ -81,11 +81,6 @@ export default async (
// Determine relative paths for Nix path literals. // Determine relative paths for Nix path literals.
const nixExprPath = configuration.get(`nixExprPath`); const nixExprPath = configuration.get(`nixExprPath`);
const lockfileFilename = configuration.get(`lockfileFilename`); const lockfileFilename = configuration.get(`lockfileFilename`);
const lockfileRel = ppath.relative(
ppath.dirname(nixExprPath),
lockfileFilename
);
const yarnPathRel = ppath.relative(ppath.dirname(nixExprPath), yarnPath);
// Build a list of cache entries so Nix can fetch them. // Build a list of cache entries so Nix can fetch them.
// TODO: See if we can use Nix fetchurl for npm: dependencies. // TODO: See if we can use Nix fetchurl for npm: dependencies.
@@ -281,8 +276,8 @@ export default async (
const projectName = ident ? structUtils.stringifyIdent(ident) : `workspace`; const projectName = ident ? structUtils.stringifyIdent(ident) : `workspace`;
const projectExpr = renderTmpl(projectExprTmpl, { const projectExpr = renderTmpl(projectExprTmpl, {
PROJECT_NAME: json(projectName), PROJECT_NAME: json(projectName),
YARN_PATH: yarnPathRel, YARN_PATH: yarnPath,
LOCKFILE: lockfileRel, LOCKFILE: lockfileFilename,
CACHE_FOLDER: json(cacheFolder), CACHE_FOLDER: json(cacheFolder),
CACHE_ENTRIES: cacheEntriesCode, CACHE_ENTRIES: cacheEntriesCode,
ISOLATED: isolatedCode.join("\n"), ISOLATED: isolatedCode.join("\n"),
+629 -580
View File
File diff suppressed because it is too large Load Diff