[ENHANCEMENT] Publish package as standard JS modules
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js
- Ambito
- tooling
Direzione di ricerca
Read the existing issue discussion and the related node-semver issue #498 before investigating the package's current CommonJS publication setup. Verify the chosen migration or dual-mode approach by testing the issue's browser import scenario; done means import semver from 'semver' works through a suitable import map without a build step.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
This package is currently published as CommonJS modules only. This makes it impossible to use in browsers and other environments that don't support Common JS, without a build step.
Expected Behavior
This should just work with a suitable import map:
import semver from 'semver';
This could be done as part of a migration to standard JS modules only, or a dual-mode package, possibly as part of https://github.com/npm/node-semver/issues/498
Steps To Reproduce
- In a browser
- With dev server that can rewrite bare module specifiers to URLs (such as
@web/dev-serverwith the--node-resolveflag) - Load a module script with
import semver from 'semver'; - See error...
Environment
- npm:
- Node:
- OS:
- platform: All browsers, Cloudflare Workers, more...
- Lingua principale
- JavaScript
- Stelle
- 5.5k
- Fork
- 598
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di npm/node-semver
-
Bug Needs Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
npm/node-semver#908 ·
-
semver:major
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
npm/node-semver#108 · 6 commenti ·
-
Bug Needs Triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
npm/node-semver#909 ·
-
Bug Needs Triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
npm/node-semver#906 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
npm/node-semver#904 ·
Tutte le issue di npm/node-semver
Issue simili
-
Add google analyticsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
NCAR/music-box-interactive#628 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
remotion-dev/remotion#11847 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
phoenixframework/phoenix_live_view#4456 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
AllTheMods/ATM-10#4436 ·
I maintainer di solito rispondono entro 5 giorni