Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: CLANG_FORMAT_START=refs/remotes/origin/master npm run lint
- run: CLANG_FORMAT_START=refs/remotes/origin/main npm run lint
8 changes: 4 additions & 4 deletions doc/creating_a_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ These are the steps to follow to create a new release:
* Open an issue in the **node-addon-api** repo documenting the intent to create a
new release. Give people some time to comment or suggest PRs that should land first.

* Validate all tests pass by running npm test on master.
* Validate all tests pass by running `npm test` on the `main` branch.

* Update the version in **package.json** appropriately.

* Update the [README.md](https://github.com/nodejs/node-addon-api/blob/master/README.md)
* Update the [README.md](https://github.com/nodejs/node-addon-api/blob/main/README.md)
to show the new version as the latest.

* Generate the changelog for the new version using **changelog maker** tool. From
Expand All @@ -36,12 +36,12 @@ the route folder of the repo launch the following command:
```bash
> changelog-maker
```
* Use the output generated by **changelog maker** to update the [CHANGELOG.md](https://github.com/nodejs/node-addon-api/blob/master/CHANGELOG.md)
* Use the output generated by **changelog maker** to update the [CHANGELOG.md](https://github.com/nodejs/node-addon-api/blob/main/CHANGELOG.md)
following the style used in publishing the previous release.

* Add any new contributors to the "contributors" section in the package.json

* Validate all tests pass by running npm test on master.
* Validate all tests pass by running `npm test` on the `main` branch.

* Use **[CI](https://ci.nodejs.org/view/x%20-%20Abi%20stable%20module%20API/job/node-test-node-addon-api-new/)**
to validate tests pass (note there are still some issues on SmartOS and
Expand Down
6 changes: 3 additions & 3 deletions tools/clang-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const spawn = require('child_process').spawnSync;
const path = require('path');

const filesToCheck = ['*.h', '*.cc'];
const CLANG_FORMAT_START = process.env.CLANG_FORMAT_START || 'master';
const CLANG_FORMAT_START = process.env.CLANG_FORMAT_START || 'main';

function main(args) {
let clangFormatPath = path.dirname(require.resolve('clang-format'));
Expand Down Expand Up @@ -35,9 +35,9 @@ function main(args) {
console.error(`
ERROR: please run ${fixCmd} to format changes in your commit
Note that when running the command locally, please keep your local
master branch and working branch up to date with nodejs/node-addon-api
main branch and working branch up to date with nodejs/node-addon-api
to exclude un-related complains.
Or you can run "env CLANG_FORMAT_START=upstream/master ${fixCmd}".`);
Or you can run "env CLANG_FORMAT_START=upstream/main ${fixCmd}".`);
return 1;
}
}
Expand Down