GoogleCloudPlatform / GoogleCloudPlatform/nodejs-docs-samples

ESM vs CJS presentation of samples ; preference is ESM

Offen
#3,577 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
samples type: feature request
Vorherrschende Sprache
JavaScript
Sterne
3k
Forks
2k
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
44

Beschreibung

https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blame/2c008f81febaacb568eebfcc0f158c9215f8139b/translate/translate.js#L20

require is outdated, you guys should change it to Import.

people working with new frameworks like react.js/vite can not use stuff like "require" on their code

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Open translate/translate.js at the linked line and inspect how the sample currently loads its dependencies. Update the sample's presentation from require to import, then verify that the resulting sample remains consistent with the repository's JavaScript setup and uses the requested ESM form.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.