oasis-wallet-web
oasis-wallet-web copied to clipboard
chore(deps): update dependency plop to v3
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
plop (source) | 2.7.6 -> 3.1.1 |
Release Notes
plopjs/plop
v3.1.1
Patch Changes
- Export PlopGeneratorConfig TypeScript type
v3.1.0
Minor Changes
-
#333
d6176cc
Thanks @RobinKnipe! - Added shorthand to load all Plop assets at once #333
Patch Changes
- Updated dependencies [
d6176cc
]:
v3.0.6
Patch Changes
-
Moved to monorepo
-
Updated dependencies []:
v3.0.5
What's Changed
- chore: update testing dep by @crutchcorn in https://github.com/plopjs/plop/pull/303
Full Changelog: https://github.com/plopjs/plop/compare/v3.0.4...v3.0.5
v3.0.4
What's Changed
- Empty prompts should now bypass properly by @Pike in https://github.com/plopjs/plop/commit/1969d45e04575da87224f9a1f3dc980e967188b9
Full Changelog: https://github.com/plopjs/plop/compare/v3.0.3...v3.0.4
v3.0.3
What's Changed
- Resolve extension of main field by @ThibodeauJF in https://github.com/plopjs/plop/pull/301
New Contributors
- @ThibodeauJF made their first contribution in https://github.com/plopjs/plop/pull/301
Full Changelog: https://github.com/plopjs/plop/compare/v3.0.2...v3.0.3
v3.0.2
What's Changed
Fixed
- Return error code on failures on actions by @Pike in https://github.com/plopjs/plop/pull/300
Full Changelog: https://github.com/plopjs/plop/compare/v3.0.1...v3.0.2
v3.0.1
- Fixes
run
typing to be a promise, as was updated in Plop 3
v3.0.0
The first major release of plop
since 2018 is here!
We've got a massive feature in this release: ESM Support. Read further to find out more!
Breaking Changes
- Node 8 and 10 support has been dropped
- Node 12 and 14 must be match
^12.20.0
and^14.13.1
respectively
- Node 12 and 14 must be match
Wrapper CLI Breaking Changes
This section doesn't apply to users of the
plop
CLI command, only those that are usingplop
as a library in their own generator tool.
- Plop wrapper CLIs must be ESM to import
plop
(see below to learn more) - Liftoff has been upgraded from 1 to 4 and as a result, the
Plop
object API has changed. Instead of:
Plop.launch({
cwd: argv.cwd,
configPath: path.join(__dirname, 'plopfile.js'),
require: argv.require,
completion: argv.completion
}, env => run(env, undefined, true));
You need to do:
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = dirname(fileURLToPath(import.meta.url));
Plop.prepare({
cwd: argv.cwd,
configPath: path.join(__dirname, 'plopfile.js'),
preload: argv.preload || [],
completion: argv.completion
}, env => Plop.execute(env, run));
Features
ESM Support
The major feature of this release is support for ESM modules (https://github.com/plopjs/plop/issues/260)
This means that instead of:
module.exports = (plop) => {
// ...
}
You can now have the following code in your plopfile:
export default (plop) => {
// ...
}
Going forward, plopfiles must either be:
- An ESM
.mjs
file withtype: "module"
inpackage.json
- An ESM
.js
file withtype: "module"
inpackage.json
- A CommonJS
.cjs
file withtype: "module"
inpackage.json
- A CommonJS
.js
file withtype: "commonjs"
inpackage.json
Any of these file extensions will be recognized and accepted with the default plopfile
name, just like before.
If you want to learn more about ESM usage in a library, here's some further reading provided by Sindre Sorhus.
These limitations will also be present for plop wrapper CLIs, so it's encouraged to read the above if you're doing so.
Async Plopfunctions
While previously a plopfile.js
had to be a synchronous export - we now allow you to make an async function. We handle the rest!
export default async (plop) => {
// ...
}
Bug Fixes
- TypeScript usage should be more consistent and less buggy: https://github.com/plopjs/node-plop/issues/194
- Prompt validators can now be async: https://github.com/plopjs/node-plop/issues/182
- Vulnerabilities present in the 2.x release have now been fixed. Unfortunately, we cannot backport this behavior.
Internal Changes
The plop CLI itself now has a solid end-to-end tests. While this isn't done, it is very functional today. These tests have enabled us to be confident that this release should work for 99% of users without having to change much if anything at all on their end.
We even wrote our own testing library to support this
Admittedly, we have a low coverage rate, but are testing against most of the big stuff today. We welcome and encourage pull requests adding more tests to increase that rate.
We've also added CI to run those end-to-end tests against every PR against the main branch.
Looking Ahead
While this release is fun, there's more that we want to do internally sometime in the near future.
Namely:
- Simplify
node-plop
tests - Migrate
node-plop
to usejest
instead ofava
- Move
node-plop
to monorepo in theplop
repo - Add commit hooks and autogenerated changelog to
node-plop
andplop
- Rename branches from
master
tomain
-
Add TS example tests to
plop
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.
MegaLinter status: ✅ SUCCESS
Descriptor | Linter | Files | Fixed | Errors | Elapsed time |
---|---|---|---|---|---|
✅ EDITORCONFIG | editorconfig-checker | 2 | 0 | 0.54s | |
✅ GIT | git_diff | yes | no | 0.05s | |
✅ JSON | eslint-plugin-jsonc | 1 | 0 | 0 | 1.03s |
✅ JSON | jsonlint | 1 | 0 | 0.3s | |
✅ JSON | prettier | 1 | 0 | 0 | 0.67s |
✅ JSON | v8r | 1 | 0 | 1.63s |
See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true
in mega-linter.yml to validate all sources, not only the diff
MegaLinter status: ✅ SUCCESS
Descriptor | Linter | Files | Fixed | Errors | Elapsed time |
---|---|---|---|---|---|
✅ EDITORCONFIG | editorconfig-checker | 2 | 0 | 0.01s | |
✅ GIT | git_diff | yes | no | 0.01s | |
✅ JSON | eslint-plugin-jsonc | 1 | 0 | 0 | 0.86s |
✅ JSON | jsonlint | 1 | 0 | 0.23s | |
✅ JSON | prettier | 1 | 0 | 0 | 0.5s |
✅ JSON | v8r | 1 | 0 | 4.73s |
See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true
in mega-linter.yml to validate all sources, not only the diff