Skip to content

Commit eb9f3f8

Browse files
SimenBcpojer
authored andcommitted
Add changelog entry for #4740 (#4742)
1 parent 693e653 commit eb9f3f8

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* `[jest-runtime]` Move `babel-core` to peer dependencies so it works with Babel 7 ([#4557](https://github.com/facebook/jest/pull/4557))
1414
* `[jest-util]` Fix `runOnlyPendingTimers` for `setTimeout` inside `setImmediate` ([#4608](https://github.com/facebook/jest/pull/4608))
1515
* `[jest-message-util]` Always remove node internals from stacktraces ([#4695](https://github.com/facebook/jest/pull/4695))
16+
* `[jest-resolve]` changes method of determining builtin modules to include missing builtins ([#4740](https://github.com/facebook/jest/pull/4740))
1617

1718
### Features
1819
* `[jest-environment-*]` [**BREAKING**] Add Async Test Environment APIs, dispose is now teardown ([#4506](https://github.com/facebook/jest/pull/4506))

packages/jest-resolve/src/__tests__/is_builtin_module.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
const isBuiltinModule = require('../is_builtin_module');
1+
// @flow
2+
3+
import isBuiltinModule from '../is_builtin_module';
24

35
describe('isBuiltinModule', () => {
46
it('should return true for the `path` module', () => {
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/**
2+
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @flow
8+
*/
9+
10+
// https://github.com/facebook/flow/pull/5160
111
declare var process: {
212
binding(type: string): {},
313
};
@@ -6,6 +16,6 @@ const BUILTIN_MODULES = Object.keys(process.binding('natives')).filter(
616
(module: string) => !/^internal\//.test(module),
717
);
818

9-
module.exports = function isBuiltinModule(module: string): boolean {
19+
export default function isBuiltinModule(module: string): boolean {
1020
return BUILTIN_MODULES.indexOf(module) !== -1;
11-
};
21+
}

0 commit comments

Comments
 (0)