Skip to content

add internal-apis to package.json's files#2036

Open
funkjk wants to merge 3 commits intoisomorphic-git:mainfrom
funkjk:feat/add-internal-api--packagejson
Open

add internal-apis to package.json's files#2036
funkjk wants to merge 3 commits intoisomorphic-git:mainfrom
funkjk:feat/add-internal-api--packagejson

Conversation

@funkjk
Copy link
Copy Markdown

@funkjk funkjk commented Feb 8, 2025

To call internal-api outside library, add internal-api.xx to package.json.

#2032

I'm fixing a bug or typo

  • if this is your first time contributing, run npm run add-contributor and follow the prompts to add yourself to the README
  • squash merge the PR with commit message "fix: [Description of fix]"

I'm adding a parameter to an existing command X:

  • add parameter to the function in src/api/X.js (and src/commands/X.js if necessary)
  • document the parameter in the JSDoc comment above the function
  • add a test case in __tests__/test-X.js if possible
  • if this is your first time contributing, run npm run add-contributor and follow the prompts to add yourself to the README

I'm adding a new command:

  • add as a new file in src/api (and src/commands if necessary)
  • add command to src/index.js
  • update __tests__/test-exports.js
  • create a test in src/__tests__
  • document the command with a JSDoc comment
  • add page to the Docs Sidebar website/sidebars.json
  • add page to the v1 Docs Sidebar website/versioned_sidebars/version-1.x-sidebars.json
  • if this is your first time contributing, run npm run add-contributor and follow the prompts to add yourself to the README
  • squash merge the PR with commit message "feat: Added 'X' command"

@jcubic
Copy link
Copy Markdown
Member

jcubic commented Feb 8, 2025

Hm. Now I'm wondering maybe better would be creating a different library with the internals.

Maybe @isomorphic-git/internals

This will require some work (creating a project, moving unit tests over, adding GitHub actions), but if you want to use the internals, you will not need to install isomorphic-git itself.

What do you think? You want to use this API, maybe you can contribute a bit more to the project.

@funkjk
Copy link
Copy Markdown
Author

funkjk commented Feb 9, 2025

Your idea is better if there are many libraries that refer internal-apis.
But I think those libraries are not that many.

And moving internal-apis to other project is expensive, but deviding get little benefit .
(If I have time to contribute this project, I want to contribute other problems of this project.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants