Changes:
- Config `ignorePatterns` not as `Path`, because the create `ignore`
does only handle `/` and not Win-style `\`
- Passed full path to the config and do not use `canonicalize` because
it prefix the paths with `\\?\`,
read more here: https://stackoverflow.com/a/41233992/7387397
- Updated and enabled tests for windows, some are still failing
closes#8188
---------
Co-authored-by: Alexander Schlegel <alexander.schlegel@clicksports.de>
`just submodules` run `just update-transformer-fixtures`. Otherwise
after updating submodules, transformer tests will break. Most people
won't know that they need to run `just update-transformer-fixtures` too.
Also make `just update-transformer-fixtures` work on Windows.
[update_fixtures.js](defaf4bf2b/tasks/transform_conformance/update_fixtures.js)
script updates Babel test fixtures in place for class properties
transform.
When we update submodules, we want to re-run amending the fixtures,
starting afresh from the updated Babel submodule.
`git reset --hard` already gets rid of any changes that
`update_fixtures.js` had made to existing files, but it doesn't remove
new files the script had created. This PR adds `git clean` to the `just`
script to completely reset the submodule to fresh cloned state before
`update_fixtures.js` runs again.
Add a NodeJS script which amends Babel's fixtures in place to remove transform plugins which we don't support from `options.json` files. Where options are changed from the original, the script runs Babel transform with the new options to regenerate the fixture `output.js` files.
Currently limited to transforming the fixtures for `babel-plugin-transform-class-properties` transform, but we can also enable it for other plugins if we wish in future, to get additional test coverage.
Currently the website links to main which is subject to change without
an update to the website. This updates the website to link to the
specific commit that was used when the website was published.
Feel free to cleanup anything in this PR.
Recently, due to some issues, I had to re-clone the oxc project multiple
times. After running `just init`, I always had to run `pnpm install`
separately. We could include `pnpm install` to init command to
streamline the process. In addition, I propose to include
`cargo-binstall` in the init command.
I'm not sure if we should include the `submodules` command in the init
command, as it is generally unnecessary for most users unless they are
working on specific projects like the minifier.
Related to #7290, closes#7296
By default, `Windows` encounters the following issue unless the user
installs `PowerShell 7` (pwsh).
```bash
error: Recipe `submodules` could not be run because just could not find the shell: program not found
error: Recipe `init` could not be run because just could not find the shell: program not found
```
Furthermore, I have found a better way to solve this problem.
Fix#7282
- Change default shell to powershell 7(pwsh) to supports "&&"
- change url from git protocol to https protocol. This does not need a
public token(I do not know what it is...).
- specify different submodule init command for windows
Co-authored-by: Song Gao <songgao@microsoft.com>
Hello,
I was following the guide
https://oxc.rs/docs/contribute/development.html and executed `just
ready` as said.
I got an error on Windows on the `doc` command because it sets the env
variable in a way that is not compatible with `powershell`.
I've used
[attributes](https://just.systems/man/en/attributes.html#attributes) to
fix the issue.
I never used `just` so I don't know if there's a better way to fix the
issue.
## What This PR does
Adds a new `oxc-security/api-key` rule that scans for hard-coded API keys.
It is broken up into "secret rules", where each one is responsible for finding a different kind of key. It is architecturally identical to how lint rules themselves. This PR also includes the first of these rules, for AWS access key IDs.
Logic and rules are based on [keyhunter](https://github.com/Donisaac/keyhunter). I've licensed that repo under GNU GPLv3, but it's my code and I can do what I want with it 😈 (read: I'm fine with it being MIT for oxc).
This PR is a complete feature in its own right, but does not represent the end of this work. See https://github.com/oxc-project/backlog/issues/116 to track overall progress.
1. wasm-pack with release flag will increase wasm bundling time, which
hurts dx when developing playground.
2. only enable `release` flag when `build-wasm`.
closes https://github.com/oxc-project/oxc/issues/4790
@overlookmotel enjoy ... take a look at the snapshots and probably nothing else.
The snapshots are minimal right now, but it's already showing symbols from import specifiers are not being removed. We can iterate on the snapshot representation to aid debugging later.
I'll extend this to `transformer_conformance` and `oxc-monitor` in an up coming PR.
This PR renames the `oxc_ast_codegen` crate to `oxc_ast_tools`, It improves the readability and organization of the codebase by giving the crate a name that better reflects its purpose and contents.
It also improves the error message in CI.