diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d8ba8de5498..e424bedc2d70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/packages/core-js/internals/engine-is-node.js b/packages/core-js/internals/engine-is-node.js index dce72da57fca..a198ed82db77 100644 --- a/packages/core-js/internals/engine-is-node.js +++ b/packages/core-js/internals/engine-is-node.js @@ -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';