Skip to content

Commit

Permalink
feat: upgrade to esbuild@^0.17.0 (#358)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0fa4679)

# Conflicts:
#	API.md
  • Loading branch information
mrgrain authored and mergify[bot] committed Jan 14, 2023
1 parent c749921 commit e940fba
Show file tree
Hide file tree
Showing 8 changed files with 1,466 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
Loading

0 comments on commit e940fba

Please sign in to comment.