Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"presets": [
["@babel/preset-env", { "useBuiltIns": "entry", "corejs": { "version": 3, "proposals": true } }],
["@babel/preset-env", { "useBuiltIns": false }],
"@babel/preset-typescript"
],
"plugins": [
Expand Down
23 changes: 8 additions & 15 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@ These packages contain code that is **imported by the source code** and **bundle
- **Files**:
- `src/input/input_stream/input_stream.ts` - `getPixels()` for image loading

### Polyfills (Deprecated)

- **`@babel/polyfill`** (^7.12.1)
- **Status**: ⚠️ **DEPRECATED** by Babel team
- **Purpose**: Legacy polyfill for ES6+ features
- **Current Usage**: Not directly imported in source code
- **Recommendation**: Should be removed in favor of `core-js` + `regenerator-runtime` or Babel's automatic polyfill injection
- **Migration Path**: Use `@babel/preset-env` with `useBuiltIns: 'usage'` and explicit `core-js@3`

---

## Build & Development Tools
Expand Down Expand Up @@ -131,7 +122,6 @@ These packages are **only used during build/development** and are **not bundled

### Utilities

- **`core-js`** (^3.46.0) - Modern JavaScript polyfills (used by Babel)
- **`cross-env`** (^10.1.0) - Cross-platform environment variable setting

---
Expand Down Expand Up @@ -222,9 +212,8 @@ These are configured in `.ncurc.json` to prevent accidental upgrades via `npm-ch

### Known Issues

1. **`@babel/polyfill` is deprecated** - Should migrate to `core-js@3` + `regenerator-runtime`
2. **Old `mocha` version** - v5.2.0 is from 2018, may have unpatched vulnerabilities
3. **Webpack 4** - No longer receives updates, consider upgrading to Webpack 5
1. **Old `mocha` version** - v5.2.0 is from 2018, may have unpatched vulnerabilities
2. **Webpack 4** - No longer receives updates, consider upgrading to Webpack 5

### Monitoring

Expand Down Expand Up @@ -256,7 +245,11 @@ A: `optionalDependencies` are packages that enhance functionality if available b

**Q: Can I remove `@babel/polyfill`?**

A: Yes, but carefully. It's deprecated and not directly imported anymore. Remove it from `package.json` and verify that `@babel/preset-env` is configured to polyfill features automatically via `core-js@3`. Test thoroughly in older browsers (IE11, older Safari) after removal.
A: **It has been removed.** Investigation in November 2025 confirmed that `@babel/polyfill` was never actually imported or used in the codebase - it was a historical dependency that had no effect. The `@babel/preset-env` configuration with `useBuiltIns: "entry"` requires explicit imports of `core-js` at entry points, but no such imports existed. The `@babel/plugin-transform-runtime` handles async/await via `@babel/runtime`, which is bundled automatically. Removal has no impact on bundle size or functionality.

**Q: Why was `core-js` removed?**

A: `core-js` was removed along with `@babel/polyfill` because it was never actually used. The Babel configuration with `useBuiltIns: "entry"` only injects polyfills when you explicitly import `core-js/stable` at entry points - no such imports existed in the codebase. Modern browsers (targeted via "last 2 versions" in webpack config) support ES6+ APIs natively (Promise, Array.includes, Object.entries, etc.), so polyfills aren't needed. The `@babel/plugin-transform-runtime` handles async/await syntax via `@babel/runtime`.

**Q: Why can't I upgrade `chai` to version 5 or 6?**

Expand All @@ -283,4 +276,4 @@ This document was created in November 2025 following the TypeScript 5.9.3 upgrad
- Security vulnerabilities are discovered and patched
- Build tooling changes significantly

Last updated: 2025-11-22
Last updated: 2025-11-26
Loading