Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

Commit d4327a3

Browse files
authoredJan 10, 2023
fix: cleanup resolved feature flags (#1307)
1 parent 40e5a58 commit d4327a3

File tree

4 files changed

+3
-18
lines changed

4 files changed

+3
-18
lines changed
 

‎src/feature_flags.ts

-9
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ export const defaultFlags: Record<string, boolean> = {
2020

2121
// Load configuration from per-function JSON files.
2222
project_deploy_configuration_api_use_per_function_configuration_files: false,
23-
24-
// Enable runtime cache for NFT
25-
zisi_nft_use_cache: false,
26-
27-
// Raise file IO limit for NFT
28-
zisi_nft_higher_fileio_limit: false,
29-
30-
// Provide banner to esbuild which allows requires in ESM output
31-
zisi_esbuild_require_banner: false,
3223
}
3324

3425
export type FeatureFlag = keyof typeof defaultFlags

‎src/runtimes/node/bundlers/esbuild/bundler.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ export const bundleJsFile = async function ({
121121

122122
try {
123123
const { metafile = { inputs: {}, outputs: {} }, warnings } = await build({
124-
banner:
125-
moduleFormat === ModuleFormat.ESM && featureFlags.zisi_esbuild_require_banner ? { js: esmJSBanner } : undefined,
124+
banner: moduleFormat === ModuleFormat.ESM ? { js: esmJSBanner } : undefined,
126125
bundle: true,
127126
entryPoints: [srcFile],
128127
external,

‎src/runtimes/node/bundlers/nft/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ const traceFilesAndTranspile = async function ({
9494
reasons,
9595
} = await nodeFileTrace([mainFile], {
9696
// Default is 1024. Allowing double the fileIO in parallel makes nft faster, but uses a little more memory.
97-
fileIOConcurrency: featureFlags.zisi_nft_higher_fileio_limit ? 2048 : 1024,
97+
fileIOConcurrency: 2048,
9898
base: basePath,
99-
cache: featureFlags.zisi_nft_use_cache ? cache.nftCache : undefined,
99+
cache: cache.nftCache,
100100
ignore: ignoreFunction,
101101
readFile: async (path: string) => {
102102
try {

‎tests/main.test.ts

-5
Original file line numberDiff line numberDiff line change
@@ -2253,7 +2253,6 @@ describe('zip-it-and-ship-it', () => {
22532253
const opts = merge(options, {
22542254
basePath: fixtureDir,
22552255
configFileDirectories: [fixtureDir],
2256-
featureFlags: { zisi_detect_esm: true },
22572256
})
22582257
const { files, tmpDir } = await zipFixture(fixtureName, {
22592258
length: 2,
@@ -2283,7 +2282,6 @@ describe('zip-it-and-ship-it', () => {
22832282
const opts = merge(options, {
22842283
basePath: fixtureDir,
22852284
configFileDirectories: [fixtureDir],
2286-
featureFlags: { zisi_detect_esm: true },
22872285
})
22882286
const { files, tmpDir } = await zipFixture(fixtureName, {
22892287
length: 2,
@@ -2431,9 +2429,6 @@ describe('zip-it-and-ship-it', () => {
24312429
nodeModuleFormat: ModuleFormat.ESM,
24322430
},
24332431
},
2434-
featureFlags: {
2435-
zisi_esbuild_require_banner: true,
2436-
},
24372432
}
24382433
const { files, tmpDir } = await zipFixture([join(fixtureName, 'functions')], {
24392434
opts,

1 commit comments

Comments
 (1)

github-actions[bot] commented on Jan 10, 2023

@github-actions[bot]
Contributor

⏱ Benchmark results

  • largeDepsEsbuild: 2.1s
  • largeDepsNft: 8s
  • largeDepsZisi: 15.8s
This repository has been archived.