-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prevent a couple warnings from being displayed in stdout (#15828)
- Loading branch information
1 parent
065446f
commit c0cd9f7
Showing
10 changed files
with
77 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/node_modules/tsconfig-paths/lib/register.js b/node_modules/tsconfig-paths/lib/register.js | ||
index c12b996..8beea8c 100644 | ||
--- a/node_modules/tsconfig-paths/lib/register.js | ||
+++ b/node_modules/tsconfig-paths/lib/register.js | ||
@@ -51,7 +51,7 @@ function register(explicitParams) { | ||
explicitParams: explicitParams | ||
}); | ||
if (configLoaderResult.resultType === "failed") { | ||
- console.warn(configLoaderResult.message + ". tsconfig-paths will be skipped"); | ||
+ // console.warn(configLoaderResult.message + ". tsconfig-paths will be skipped"); | ||
return noOp; | ||
} | ||
var matchPath = match_path_sync_1.createMatchPath(configLoaderResult.absoluteBaseUrl, configLoaderResult.paths, configLoaderResult.mainFields, configLoaderResult.addMatchAll); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
require('../../../spec_helper') | ||
|
||
const tsnode = require('ts-node') | ||
|
||
const resolve = require(`${root}../../lib/util/resolve`) | ||
|
||
const tsNodeUtil = require(`${root}../../lib/plugins/child/ts_node`) | ||
|
||
describe('lib/plugins/child/ts_node', () => { | ||
beforeEach(() => { | ||
sinon.stub(tsnode, 'register') | ||
sinon.stub(resolve, 'typescript').returns('/path/to/typescript.js') | ||
}) | ||
|
||
describe('typescript registration', () => { | ||
it('registers ts-node if typescript is installed', () => { | ||
tsNodeUtil.register('proj-root', '/path/to/plugins/file.js') | ||
|
||
expect(tsnode.register).to.be.calledWith({ | ||
transpileOnly: true, | ||
compiler: '/path/to/typescript.js', | ||
dir: '/path/to/plugins', | ||
compilerOptions: { | ||
module: 'CommonJS', | ||
}, | ||
}) | ||
}) | ||
|
||
it('does not register ts-node if typescript is not installed', () => { | ||
resolve.typescript.returns(null) | ||
|
||
tsNodeUtil.register('proj-root', '/path/to/plugins/file.js') | ||
|
||
expect(tsnode.register).not.to.be.called | ||
}) | ||
|
||
it('prevents tsconfig-paths from logging warning when there is no tsconfig.json', () => { | ||
sinon.spy(console, 'warn') | ||
tsNodeUtil.register('proj-root', '/path/to/plugins/file.js') | ||
|
||
expect(console.warn).not.to.be.calledWith('Missing baseUrl in compilerOptions. tsconfig-paths will be skipped') | ||
}) | ||
}) | ||
}) |
c0cd9f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
c0cd9f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppVeyor has built the
win32 x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
c0cd9f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppVeyor has built the
win32 ia32
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally:
c0cd9f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
darwin x64
version of the Test Runner.Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.
Run this command to install the pre-release locally: