@embroider/try
Advanced tools
+13
-2
@@ -1,3 +0,3 @@ | ||
| import { resolve } from "node:path"; | ||
| import { readFileSync, writeFileSync } from "node:fs"; | ||
| import { resolve, dirname } from "node:path"; | ||
| import { readFileSync, writeFileSync, mkdirSync } from "node:fs"; | ||
@@ -71,2 +71,13 @@ async function main() { | ||
| } | ||
| if (scenario.files) { | ||
| for (let [filename, content] of Object.entries(scenario.files)) { | ||
| const fullName = resolve(process.cwd(), filename); | ||
| mkdirSync(dirname(fullName), { | ||
| recursive: true, | ||
| }); | ||
| writeFileSync(fullName, content); | ||
| } | ||
| } | ||
| writeFileSync(pkgJSONPath, JSON.stringify(pkg, null, 2)); | ||
@@ -73,0 +84,0 @@ process.stdout.write(`Applied scenario ${scenario.name}\n`); |
+6
-5
| { | ||
| "name": "@embroider/try", | ||
| "version": "0.0.3", | ||
| "version": "0.0.4", | ||
| "description": "Helper for trying multiple compatibility scenarios in CI", | ||
| "bin": "cli.js", | ||
| "type": "module", | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| }, | ||
| "keywords": [], | ||
| "author": "Edward Faulkner <edward@eaf4.com>", | ||
| "license": "MIT", | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| } | ||
| } | ||
| "packageManager": "pnpm@10.4.1" | ||
| } |
2588
14.67%78
13.04%