Skip to content

Commit 213ff3b

Browse files
fix: Migrate Che extensions to esbuild packaging
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com> Generated-by: Cursor AI
1 parent e2aa458 commit 213ff3b

29 files changed

Lines changed: 297 additions & 339 deletions
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
build/**
2+
src/**
23
tests/**
34
coverage/**
45
out/**
56
tsconfig.json
6-
extension.webpack.config.js
7+
esbuild*
8+
package-lock.json
79
yarn.lock
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**********************************************************************
2+
* Copyright (c) 2026 Red Hat, Inc.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
***********************************************************************/
10+
/*
11+
* This file was generated using AI assistance (Cursor AI)
12+
* and reviewed by the maintainers.
13+
*/
14+
import * as path from 'node:path';
15+
import { run } from '../esbuild-extension-common.mts';
16+
17+
const srcDir = path.join(import.meta.dirname, 'src');
18+
const outDir = path.join(import.meta.dirname, 'dist');
19+
20+
run({
21+
platform: 'node',
22+
entryPoints: {
23+
'extension': path.join(srcDir, 'extension.ts'),
24+
},
25+
srcDir,
26+
outdir: outDir,
27+
additionalOptions: {
28+
external: ['vscode', 'bufferutil', 'utf-8-validate'],
29+
},
30+
}, process.argv);

code/extensions/che-activity-tracker/extension.webpack.config.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

code/extensions/che-api/.vscodeignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ tests/**
44
coverage/**
55
out/**
66
tsconfig.json
7-
extension.webpack.config.js
7+
esbuild*
8+
package-lock.json
89
yarn.lock
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**********************************************************************
2+
* Copyright (c) 2026 Red Hat, Inc.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
***********************************************************************/
10+
/*
11+
* This file was generated using AI assistance (Cursor AI)
12+
* and reviewed by the maintainers.
13+
*/
14+
import * as path from 'node:path';
15+
import esbuild from 'esbuild';
16+
import { run } from '../esbuild-extension-common.mts';
17+
18+
const srcDir = path.join(import.meta.dirname, 'src');
19+
const outDir = path.join(import.meta.dirname, 'dist');
20+
21+
const oidcAuthPlugin: esbuild.Plugin = {
22+
name: 'replace-oidc-auth',
23+
setup(build) {
24+
build.onResolve({ filter: /\/oidc_auth(\.js)?$/ }, () => ({
25+
path: path.resolve(import.meta.dirname, 'src', 'shims', 'oidc-auth.ts'),
26+
}));
27+
},
28+
};
29+
30+
run({
31+
platform: 'node',
32+
entryPoints: {
33+
'extension': path.join(srcDir, 'extension.ts'),
34+
},
35+
srcDir,
36+
outdir: outDir,
37+
additionalOptions: {
38+
external: ['vscode', 'bufferutil', 'utf-8-validate'],
39+
plugins: [oidcAuthPlugin],
40+
},
41+
}, process.argv);

code/extensions/che-api/extension.webpack.config.js

Lines changed: 0 additions & 54 deletions
This file was deleted.

code/extensions/che-api/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@
4646
"@types/node": "22.x",
4747
"jest": "29.7.0",
4848
"ts-jest": "29.4.5",
49-
"typescript": "^5.9.2",
50-
"webpack-node-externals": "^3.0.0"
49+
"typescript": "^5.9.2"
5150
},
5251
"overrides": {
5352
"minimatch": "^3.1.5",

code/extensions/che-commands/.vscodeignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ tests/**
44
coverage/**
55
out/**
66
tsconfig.json
7-
extension.webpack.config.js
7+
esbuild*
8+
package-lock.json
89
yarn.lock
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/**********************************************************************
2+
* Copyright (c) 2026 Red Hat, Inc.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
***********************************************************************/
10+
/*
11+
* This file was generated using AI assistance (Cursor AI)
12+
* and reviewed by the maintainers.
13+
*/
14+
import * as path from 'node:path';
15+
import { run } from '../esbuild-extension-common.mts';
16+
17+
const srcDir = path.join(import.meta.dirname, 'src');
18+
const outDir = path.join(import.meta.dirname, 'dist');
19+
20+
run({
21+
platform: 'node',
22+
entryPoints: {
23+
'extension': path.join(srcDir, 'extension.ts'),
24+
},
25+
srcDir,
26+
outdir: outDir,
27+
additionalOptions: {
28+
external: ['vscode', 'bufferutil', 'utf-8-validate'],
29+
},
30+
}, process.argv);

code/extensions/che-commands/extension.webpack.config.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)