Package specific configuration (for apps and libraries)
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- nodejs, react-native, typescript
- Domaine
- build-system, tooling
Piste de recherche
Aucun fichier d’implémentation ni test n’est nommé. Commencez par clarifier le schéma de configuration, le comportement de recherche, les règles d’analyse des dépendances et la gestion des chemins spécifique à chaque plateforme proposés ici ; le travail est terminé lorsque le projet dispose d’une conception de configuration approuvée et documentée, ainsi que d’un comportement clair pour chaque option.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
We've actively worked towards putting as few restrictions on the packages bringing Node-API modules as possible, to make it more likely to migrate / re-use existing packages intended for Node.js and we would like to continue to support packages providing Node-API modules without requiring package-specific configuration.
How to configure
We could rely on cosmiconfig (which is also used by the React Native Community CLI):
By default, Cosmiconfig will check the current directory for the following:
- a
package.jsonproperty- a JSON or YAML, extensionless "rc file"
- an "rc file" with the extensions
.json,.yaml,.yml,.js,.ts,.mjs, or.cjs- any of the above two inside a
.configsubdirectory- a
.config.js,.config.ts,.config.mjs, or.config.cjsfile
We could load this config starting from the "app" and then look for it in all direct dependencies of the app package and all transitive dependencies explicitly enumerated - see below.
What to configure
Possible configuration options which could optimise the experience:
Library name mapping to paths
We could allow library authors to provide explicit paths for the Node-API prebuilds bundled with their package:
{
// Alternative names for this property could be "addons" or "modules"? 🤔
"prebuilds": [
// Provide a path for a prebuild
"./build/Release/somthing.node",
// Which would be an alias for an object with the same path
{ "path": "./build/Release/somthing.node" },
// Allow overriding the name (default would be "my-lib--addon") used for the library files when linked into the app
{ "name": "addon", "path": "./build/Release/addon.node" },
// Allow specifying platform-specific paths
{
"name": "addon",
"path": {
"android": "./build/Release/addon.android.node",
"ios": "./build/Debug/addon.apple.node"
},
},
]
}
Control scanning
We could group options related to scanning for Node-API modules, either under a "scanning" (or simply "scan") key.
We could enable scanning of specific transitive dependencies (see #367 for use-case)
{
"scanning": {
"dependencies": ["name-of-lib-with-node-api-module"]
}
}
We could provide lists of glob patterns to include and exclude when scanning for modules
{
"scanning": {
"include": ["./build"],
"exclude": ["./node_modules"],
}
}
Or disable scanning all together:
{
"scanning": {
"disabled": true
}
}
- Langage dominant
- TypeScript
- Étoiles
- 188
- Forks
- 10
- Merge moyen
- 2 j 17 h
- PR mergées (30 j)
- 3
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de callstackincubator/react-native-node-api
-
Android 🤖
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects OuverteAndroid 🤖 good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
callstackincubator/react-native-node-api#163 · 1 commentaire ·
-
enhancement good first issue gyp-to-cmake
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
callstackincubator/react-native-node-api#161 · 3 commentaires · 1 réaction ·
-
enhancement Host 🏡
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
-
Automatable good first issue
Difficulté 3/5 1-2 jours Accessibilité débutants 15/100
callstackincubator/react-native-node-api#424 · 1 commentaire ·
Toutes les issues de callstackincubator/react-native-node-api
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
ontola/atomic-server#1625 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
-
bug via-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
midnightntwrk/midnight-sdk#403 ·