Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Control `pathSuffix` option via configuration file(s)

Aperta
#153 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
babel, node.js, react-native, typescript

Direzione di ricerca

Non vengono indicati file sorgente né test. Inizia tracciando il modo in cui pathSuffix viene passato al plugin Babel e alla CLI del pacchetto host, incluso NODE_API_PATH_SUFFIX durante pod install o la build di Gradle, esaminando al contempo il possibile impatto di pull request 104. Il lavoro è completato quando una configurazione a livello di app o per libreria controlla l’opzione in modo coerente, senza impostazioni di runtime separate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement Host 🏡 Linking 🔗 question

We're performing a transformation of the Node-API addon dynamic library paths on disk to their dynamic library names as they're linked into the host package.

Here's the documentation for the pathSuffix option of the NamingStrategy:

Controls how the path of the addon inside a package is transformed into a library name.
The transformation is needed to disambiguate and avoid conflicts between addons with the same name (but in different sub-paths or packages).

As an example, if the package name is my-pkg and the path of the addon within the package is build/Release/my-addon.node:

  • "omit": Only the package name is used and the library name will be my-pkg.
  • "strip": Path gets stripped to its basename and the library name will be my-pkg--my-addon.
  • "keep": The full path is kept and the library name will be my-pkg--build-Release-my-addon.

In the current state, this pathSuffix option is passed to the babel plugin as well as to the host package's CLI (either through a CLI runtime option or more likely the NODE_API_PATH_SUFFIX environment variable while running pod install or the Gradle build) and they need to match for the app to find the dynamic library files at runtime.

It would be more flexible and less brittle if ☝ was instead determined by

  • a single app-wide configuration setting, either in configuration file (or a key in the App's package.json) and / or
  • by individual per-library configuration files (or a key in their package.json files)

[!NOTE]
This will likely all change once https://github.com/callstackincubator/react-native-node-api/pull/104 merge.

Lingua principale
TypeScript
Stelle
188
Fork
10
Merge medio
2g 17h
PR unite (30g)
3

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/react-native-node-api

Tutte le issue di callstackincubator/react-native-node-api

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.