Skip to content

Commit

Permalink
ci: disallow dynamic imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxuanzhangsfdx committed Oct 31, 2024
1 parent 3d25664 commit 93621ca
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 12 deletions.
10 changes: 8 additions & 2 deletions packages/salesforcedx-vscode-apex-debugger/esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ const sharedConfig = {
],
plugins: [
esbuildPluginPino({ transports: ['pino-pretty'] })
]
],
supported: {
'dynamic-import': false
},
logOverride: {
'unsupported-dynamic-import': 'error'
}
};

// copy core-bundle/lib/transformStream.js to dist if core-bundle is included
Expand All @@ -46,4 +52,4 @@ const destPath = './dist/transformStream.js';
});
})().then(async () => {
await copyFiles(srcPath, destPath);
}).catch(() => process.exit(1));
}).catch(() => process.exit(1));
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ const sharedConfig = {
keepNames: true,
plugins: [
esbuildPluginPino({ transports: ['pino-pretty'] })
]
],
supported: {
'dynamic-import': false
},
logOverride: {
'unsupported-dynamic-import': 'error'
}
};

// copy core-bundle/lib/transformStream.js to dist if core-bundle is included
Expand All @@ -47,4 +53,4 @@ const destPath = './dist/transformStream.js';
});
})().then(async () => {
await copyFiles(srcPath, destPath);
}).catch(() => process.exit(1));
}).catch(() => process.exit(1));
10 changes: 8 additions & 2 deletions packages/salesforcedx-vscode-apex/esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ const sharedConfig = {
plugins: [
esbuildPluginPino({ transports: ['pino-pretty'] })
],
minify: true
minify: true,
supported: {
'dynamic-import': false
},
logOverride: {
'unsupported-dynamic-import': 'error'
}
};

// copy core-bundle/lib/transformStream.js to dist if core-bundle is included
Expand All @@ -48,4 +54,4 @@ const destPath = './dist/transformStream.js';
});
})().then(async () => {
await copyFiles(srcPath, destPath);
}).catch(() => process.exit(1));
}).catch(() => process.exit(1));
8 changes: 7 additions & 1 deletion packages/salesforcedx-vscode-core/esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ const sharedConfig = {
keepNames: true,
plugins: [
esbuildPluginPino({ transports: ['pino-pretty'] })
]
],
supported: {
'dynamic-import': false
},
logOverride: {
'unsupported-dynamic-import': 'error'
}
};

const copyFiles = (src, dest) => {
Expand Down
10 changes: 8 additions & 2 deletions packages/salesforcedx-vscode-lightning/esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ const sharedConfig = {
keepNames: true,
plugins: [
esbuildPluginPino({ transports: ['pino-pretty'] })
]
],
supported: {
'dynamic-import': false
},
logOverride: {
'unsupported-dynamic-import': 'error'
}
};

// copy core-bundle/lib/transformStream.js to dist if core-bundle is included
Expand All @@ -48,4 +54,4 @@ const destPath = './dist/transformStream.js';
});
})().then(async () => {
await copyFiles(srcPath, destPath);
}).catch(() => process.exit(1));
}).catch(() => process.exit(1));
8 changes: 7 additions & 1 deletion packages/salesforcedx-vscode-lwc/esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ const sharedConfig = {
keepNames: true,
plugins: [
esbuildPluginPino({ transports: ['pino-pretty'] })
]
],
supported: {
'dynamic-import': false
},
logOverride: {
'unsupported-dynamic-import': 'error'
}
};

// copy core-bundle/lib/transformStream.js to dist if core-bundle is included
Expand Down
10 changes: 8 additions & 2 deletions packages/salesforcedx-vscode-soql/esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ const sharedConfig = {
keepNames: true,
plugins: [
esbuildPluginPino({ transports: ['pino-pretty'] })
]
],
supported: {
'dynamic-import': false
},
logOverride: {
'unsupported-dynamic-import': 'error'
}
};

// copy core-bundle/lib/transformStream.js to dist if core-bundle is included
Expand All @@ -51,4 +57,4 @@ const destPath = './dist/transformStream.js';
});
})().then(async () => {
await copyFiles(srcPath, destPath);
}).catch(() => process.exit(1));
}).catch(() => process.exit(1));

0 comments on commit 93621ca

Please sign in to comment.