Skip to content

Commit

Permalink
feat: upgrade to esbuild@^0.17.0 (backport #358) (#359)
Browse files Browse the repository at this point in the history
This is an automatic backport of pull request #358 done by [Mergify](https://mergify.com).
Cherry-pick of 0fa4679 has failed:
```
On branch mergify/bp/v3/pr-358
Your branch is up to date with 'origin/v3'.

You are currently cherry-picking commit 0fa4679.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .eslintrc.json
	modified:   .projen/deps.json
	modified:   .projenrc.ts
	modified:   package-lock.json
	modified:   package.json
	modified:   src/esbuild-source.ts
	modified:   src/esbuild-types.ts

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   API.md

```


To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the [documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com/) you can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>
  • Loading branch information
mergify[bot] authored Jan 15, 2023
1 parent c749921 commit 1dabf3e
Show file tree
Hide file tree
Showing 8 changed files with 241 additions and 244 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ editor.launchConfiguration.addConfiguration(
project.tryFindObjectFile('package.json')?.addOverride('optionalDependencies', {
[Esbuild.name]: Esbuild.version,
});
project.eslint?.addOverride({
files: ['src/esbuild-types.ts'],
rules: { 'max-len': ['off'] },
});

new TypeScriptSourceFile(project, 'src/esbuild-types.ts', {
source: 'node_modules/esbuild/lib/main.d.ts',
Expand All @@ -285,12 +289,11 @@ new TypeScriptSourceFile(project, 'src/esbuild-types.ts', {

const removeFromInterface = (name: string, properties: string[]) => {
const interfaceDeclaration = esbuildTypes.getInterface(name);

properties.forEach(property => interfaceDeclaration?.getProperty(property)?.remove());
};

['CommonOptions', 'BuildOptions', 'TransformOptions', 'OutputFile'].forEach(readonlyInterface);
removeFromInterface('BuildOptions', ['entryPoints', 'stdin', 'plugins', 'watch']);
removeFromInterface('BuildOptions', ['entryPoints', 'stdin', 'plugins']);
esbuildTypes.getInterface('CommonOptions')?.getProperty('mangleProps')?.setType('any');
esbuildTypes.getInterface('CommonOptions')?.getProperty('reserveProps')?.setType('any');
esbuildTypes.getInterface('InitializeOptions')?.getProperty('wasmModule')?.setType('any');
Expand Down
12 changes: 0 additions & 12 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1dabf3e

Please sign in to comment.