-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP #1
base: main
Are you sure you want to change the base?
WIP #1
Conversation
import emberSourceChannelURL from "ember-source-channel-url"; | ||
// import { embroiderOptimized, embroiderSafe } from "@embroider/test-setup"; | ||
// import emberSourceChannelURL from "ember-source-channel-url"; | ||
import { fileHandlers } from "../dist/index.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { fileHandlers } from "../dist/index.js"; | |
import { fileOperations } from "../dist/index.js"; |
Maybe? Naming still feels a bit weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As much as fileOperations
sounds more accurate, fileHandlers
gives a bit more "familiar" feeling.
🤷
const restoreFiles = await backUpFiles(cwd, [ | ||
// "package.json", | ||
lockfile, | ||
...Object.keys(scenario.files), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure all files are backed up first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must also include package.json
when config.packageJson
is present
/** | ||
* Apply a scenario's files. | ||
*/ | ||
export function applyScenarioFiles( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main logic regarding files
.
@@ -0,0 +1,22 @@ | |||
import { flattenObject } from "flatten-anything"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An operation that allows you to modify the contents of a JSON file more easily would also be useful I think:
files: {
'package.json': fileOperations.modifyJson((pkg) => {
delete pkg.foo.bar;
return pkg;
}),
},
Or something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very good idea 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome job. How can I help here?
const restoreFiles = await backUpFiles(cwd, [ | ||
// "package.json", | ||
lockfile, | ||
...Object.keys(scenario.files), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must also include package.json
when config.packageJson
is present
@@ -0,0 +1,22 @@ | |||
import { flattenObject } from "flatten-anything"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very good idea 👍
import emberSourceChannelURL from "ember-source-channel-url"; | ||
// import { embroiderOptimized, embroiderSafe } from "@embroider/test-setup"; | ||
// import emberSourceChannelURL from "ember-source-channel-url"; | ||
import { fileHandlers } from "../dist/index.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As much as fileOperations
sounds more accurate, fileHandlers
gives a bit more "familiar" feeling.
🤷
I'm def planning on finishing this properly, but I probably need a bit more time. |
No description provided.