@@ -18,41 +18,25 @@ if (fs.existsSync(tempDir)) {
1818fs . mkdirSync ( tempDir ) ;
1919
2020try {
21- // Create minimal package.json for VSCode extension (runtime dependencies only)
22- const runtimeDeps = {
23- // Only include actual runtime dependencies needed by the extension
24- // Based on your main entry point in dist/extension.js, most of these are build-time only
25- } ;
21+ // 🦨 FIX: Copy all properties except scripts (and optionally devDependencies)
22+ const prodPkg = { ...pkg } ;
23+ prodPkg . scripts = { } ;
24+ // Optionally remove devDependencies from the package
25+ if ( prodPkg . devDependencies ) { delete prodPkg . devDependencies ; }
26+ // Optionally remove private field if present
27+ if ( prodPkg . private ) { delete prodPkg . private ; }
2628
27- // const prodPkg = {
28- // name: pkg.name,
29- // publisher: pkg.publisher,
30- // displayName: pkg.displayName,
31- // description: pkg.description,
32- // repository: pkg.repository,
33- // version: pkg.version,
34- // engines: pkg.engines,
35- // categories: pkg.categories,
36- // activationEvents: pkg.activationEvents,
37- // main: pkg.main,
38- // contributes: pkg.contributes,
39- // dependencies: runtimeDeps,
40- // // Remove all scripts to avoid any execution during packaging
41- // scripts: {}
42- // };
43-
44- // fs.writeFileSync(
45- // path.join(tempDir, 'package.json'),
46- // JSON.stringify(prodPkg, null, 2)
47- // );
29+ fs . writeFileSync (
30+ path . join ( tempDir , 'package.json' ) ,
31+ JSON . stringify ( prodPkg , null , 2 )
32+ ) ;
4833
4934 // Copy essential files for VSCode extension
5035 const filesToCopy = [
5136 'dist' ,
5237 'icons' ,
5338 'syntaxes' ,
5439 'robot.png' ,
55- 'package.json' ,
5640 'language-configuration.json' ,
5741 'justfile' ,
5842 'README.md' ,
0 commit comments