Skip to content

Commit

Permalink
fix: ignore ExperimentalWarning on esm module (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Sep 16, 2023
1 parent ec9ebc4 commit 6a2521a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/middleware/global_options.ts
Expand Up @@ -112,6 +112,8 @@ export default class implements ApplicationLifecycle {
// https://nodejs.org/api/url.html#url_url_pathtofileurl_path
esmLoader = pathToFileURL(esmLoader).href;
}
// wait for https://github.com/nodejs/node/issues/40940
addNodeOptionsToEnv('--no-warnings', ctx.env);
addNodeOptionsToEnv(`--loader ${esmLoader}`, ctx.env);
}

Expand Down
1 change: 1 addition & 0 deletions test/cmd/test.test.ts
Expand Up @@ -176,6 +176,7 @@ describe('test/cmd/test.test.ts', () => {
.debug()
.expect('stdout', /should work/)
.expect('stdout', /2 passing/)
.notExpect('stderr', /ExperimentalWarning/)
.expect('code', 0)
.end();
});
Expand Down

1 comment on commit 6a2521a

@vercel
Copy link

@vercel vercel bot commented on 6a2521a Sep 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

egg-bin – ./

egg-bin-git-master-no-veronica.vercel.app
egg-bin.vercel.app
egg-bin-no-veronica.vercel.app

Please sign in to comment.