Skip to content

Commit

Permalink
prevent injection process polyfill to core-js via some bundlers o…
Browse files Browse the repository at this point in the history
…r `esm.sh`, close #1277
  • Loading branch information
zloirock committed Aug 1, 2023
1 parent bc87aae commit cd1d1d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Changelog
##### Unreleased
- Prevented injection `process` polyfill to `core-js` via some bundlers or `esm.sh`, [#1277](https://github.com/zloirock/core-js/issues/1277)
- Compat data improvements:
- [`Promise.withResolvers`](https://github.com/tc39/proposal-promise-with-resolvers) marked as supported [from Bun 0.7.1](https://bun.sh/blog/bun-v0.7.1#bun-ismainthread-and-promise-withresolvers)

Expand Down
3 changes: 2 additions & 1 deletion packages/core-js/internals/engine-is-node.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';
var global = require('../internals/global');
var classof = require('../internals/classof-raw');

module.exports = typeof process != 'undefined' && classof(process) === 'process';
module.exports = classof(global.process) === 'process';

0 comments on commit cd1d1d4

Please sign in to comment.