Upgrade Babel to 8

Ouverte
#6,375 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
8/100
Type d'issue
Refactorisation
Clarté
Plutôt claire
Activité
Active
Stack technique
javascript, webpack
Domaine
build-system

Piste de recherche

Start with babel.config.js, which re-exports kolibri-build/babel.config and sets useBuiltIns, then check the peer ranges in pnpm-lock.yaml and jest_config/jest.conf.js. Done means pnpm install resolves one @babel/core major, pnpm build and pnpm test pass, and the CI frontend jobs are green. The issue states it is not open for contribution, so confirm with maintainers before starting.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

dependencies DEV: frontend

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Dependabot PR #6013 bumped @babel/core 7.29.6 → 8.0.9, @babel/preset-env 7.29.5 → 8.0.7, @babel/plugin-transform-runtime 7.29.0 → 8.0.6 and @babel/plugin-syntax-import-assertions 7.28.6 → 7.29.7. It was closed unmerged because every webpack build and Jest run failed. Babel 8 removes preset-env's useBuiltIns, which our shared config still sets, and several build and test packages only accept Babel 7.

Complexity: Medium
Target branch: unstable

Context
  • babel.config.js re-exports kolibri-build/babel.config, which sets useBuiltIns. On #6013 both "Build frontend assets" and "Frontend tests" fail with:
    The 'useBuiltIns' option has been removed
    
  • kolibri-build 1.0.0 depends on its own @babel/core 7.29.7, preset-env 7.29.7, plugin-transform-runtime 7.29.7 and babel-loader 10.1.1. With #6013 applied, two Babel cores load: webpack's babel-loader runs on 7.29.7 while the root preset-env 8.0.7 expects 8.x.
  • Packages whose peer range rejects @babel/core 8, per pnpm-lock.yaml:
    • babel-jest 29.7.0 (^7.8.0); 30.x accepts ^8.0.0-0
    • @vue/vue2-jest 29.2.6 (@babel/core: 7.x, babel-jest: 29.x), used for .vue files in jest_config/jest.conf.js
    • babel-core 7.0.0-bridge.0 (^7.0.0-0)
  • Other Babel 8 breaking changes to check: modules: "auto" now assumes ESM support, and @babel/runtime-corejs3 no longer has corejs exports.
The Change
  • Polyfill injection should move from useBuiltIns to babel-plugin-polyfill-corejs3, the replacement Babel 8 names, either in kolibri-build or overridden in Studio's babel.config.js.
  • These must move to Babel 8 together, since each one's Babel 7 copy or peer range breaks the others: @babel/core, @babel/preset-env, @babel/plugin-transform-runtime, kolibri-build's Babel dependencies, babel-jest, @vue/vue2-jest, and babel-core (bridge), the last removed if nothing still needs it.
  • @babel/plugin-syntax-import-assertions 7.29.7 is a minor bump and can land on its own.
Acceptance Criteria
  • pnpm install resolves a single @babel/core major, with no unmet Babel peer warnings
  • pnpm build succeeds, and the production bundle still includes the core-js polyfills it ships today for the browserslist targets
  • pnpm test passes, including .vue component specs
  • CI "Build frontend assets" and "Frontend tests" pass

AI usage

rtibblesbot (Claude Code) reviewed #6013, read its CI logs and the lockfile peer ranges, and drafted this issue.

Filed from #6013's review.

Langage dominant
Python
Étoiles
211
Forks
317
Merge moyen
1 j 21 h
PR mergées (30 j)
15

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de learningequality/studio

Toutes les issues de learningequality/studio

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.