We PR off of feature branches that get submitted to main
. This is the branch that all pull
requests should be made against. Version releases are bumped using npm version patch
. Make sure to include the Developer-Experience
team on any PR you submit.
To develop locally:
-
clone this repo to your local device.
git clone https://github.com/ProjectOpenSea/stream-js
-
Create a new branch:
git checkout -b MY_BRANCH_NAME
-
If you have Node Version Manager, run
nvm use
to ensure a compatible version is being used. -
Install the dependencies with:
npm install
-
Start developing and watch for code changes:
npm run dev
-
Look into
package.json
to see what other run configurations (such astest
,check-types
, andlint:check
) you can use.
You can build the project, including all type definitions, with:
npm run build
yarn test
To check the formatting of your code:
npm run prettier
If you get errors, you can fix them with:
npm run prettier:fix
While developing and debugging changes to this SDK, you can 'test-run' them locally inside another package using npm link
.
-
Inside this repo, run
npm link
-
In your other package's root directory, make sure to remove
@opensea/stream-js
fromnode_modules
with:rm -rf ./node_modules/@opensea/stream-js
-
In your other package's root directory, run:
npm link @opensea/stream-js
to re-install all of the dependencies.
Note that this SDK will be copied from the locally compiled version as opposed to from being downloaded from the NPM registry.
-
Run your application as you normally would.
Repository admins can use npm version patch
to create a new patch version.
- For minor version updates, use
npm version minor
. - For major version updates, use
npm version major
.
When creating a new version, submit a PR listing all the chanages that you'd like to roll out with this change (since the last major version).