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
11 changes: 2 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@ jobs:
fetch-depth: 0
# fetch-depth 0 needed by GitHub Release
- name: publish to NPM
run: |
VERSION=$(node -e 'console.log(require("./package.json").version)')
if printf '%s' "$VERSION" | grep -q -- '-'; then
# prerelease versions get the "next" tag
npm publish --access public --tag next
else
npm publish --access public
fi
run: npm publish --access public

publish-gpr:
needs: build
Expand All @@ -58,4 +51,4 @@ jobs:
scope: '@nictool'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .release
Submodule .release updated 4 files
+0 −12 js/bots.txt
+20 −24 js/contributors.cjs
+15 −10 js/standards.cjs
+47 −11 start.sh
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Unreleased

### [3.0.0] - 2026-07-25

- release 3.0.0
- dep(rr): bump version

### [3.0.0-alpha.13] - 2026-07-24

- fix(sql): quote mysql 8 keyword rank
Expand Down Expand Up @@ -87,7 +92,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
- lib/group.get: convert booleans
- lib/user.get: convert booleans


[3.0.0-alpha.0]: https://github.com/NicTool/api/releases/tag/3.0.0-alpha.0
[3.0.0-alpha.1]: https://github.com/NicTool/api/releases/tag/3.0.0-alpha.1
[3.0.0-alpha.2]: https://github.com/NicTool/api/releases/tag/3.0.0-alpha.2
Expand All @@ -101,3 +105,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
[3.0.0-alpha.10]: https://github.com/NicTool/api/releases/tag/v3.0.0-alpha.10
[3.0.0-alpha.11]: https://github.com/NicTool/api/releases/tag/v3.0.0-alpha.11
[3.0.0-alpha.12]: https://github.com/NicTool/api/releases/tag/v3.0.0-alpha.12
[3.0.0-alpha.13]: https://github.com/NicTool/api/releases/tag/v3.0.0-alpha.13
[3.0.0]: https://github.com/NicTool/api/releases/tag/v3.0.0
4 changes: 2 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

This handcrafted artisanal software is brought to you by:

| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/NicTool/api/commits?author=msimerson">26</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/586805?v=4"><br><a href="https://github.com/aberoham">aberoham</a> (<a href="https://github.com/NicTool/api/commits?author=aberoham">1</a>)|
| :---: | :---: |
| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/NicTool/api/commits?author=msimerson">30</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/586805?v=4"><br><a href="https://github.com/aberoham">aberoham</a> (<a href="https://github.com/NicTool/api/commits?author=aberoham">1</a>) |
| :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |

<sub>this file is generated by [.release](https://github.com/msimerson/.release).
Contribute to this project to get your GitHub profile included here.</sub>
16 changes: 8 additions & 8 deletions lib/group/store/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ class Group extends GroupBase {

// `rank` is a reserved word in MySQL 8.0+, so it must be backticked; the
// generic Mysql.insert helper doesn't quote column names.
await Mysql.execute(
'INSERT INTO nt_group_subgroups (nt_group_id,nt_subgroup_id,`rank`) VALUES(?,?,?)',
[parent_gid, gid, rank],
)
await Mysql.execute('INSERT INTO nt_group_subgroups (nt_group_id,nt_subgroup_id,`rank`) VALUES(?,?,?)', [
parent_gid,
gid,
rank,
])

const parent = await this.get({ id: parent_gid })
if (parent.length === 1 && parent[0].parent_gid !== 0) {
Expand Down Expand Up @@ -130,10 +131,9 @@ class Group extends GroupBase {
// rootGid plus every descendant subgroup id, from the nt_group_subgroups
// closure table (the same source the include_subgroups get() uses).
async subgroupGids(rootGid) {
const rows = await Mysql.execute(
'SELECT nt_subgroup_id FROM nt_group_subgroups WHERE nt_group_id = ?',
[rootGid],
)
const rows = await Mysql.execute('SELECT nt_subgroup_id FROM nt_group_subgroups WHERE nt_group_id = ?', [
rootGid,
])
return [rootGid, ...rows.map((r) => r.nt_subgroup_id)]
}

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nictool/api",
"version": "3.0.0-alpha.13",
"version": "3.0.0",
"description": "NicTool API",
"main": "index.js",
"type": "module",
Expand Down Expand Up @@ -48,7 +48,7 @@
"homepage": "https://github.com/NicTool/api#readme",
"devDependencies": {
"@eslint/js": "^10.0.1",
"eslint": "^10.7.0",
"eslint": "^10.8.0",
"eslint-config-prettier": "^10.1.8",
"globals": "^17.7.0"
},
Expand All @@ -59,8 +59,8 @@
"@hapi/inert": "^7.1.2",
"@hapi/jwt": "^3.2.4",
"@hapi/vision": "^7.0.3",
"@msimerson/hapi-openapi": "^18.0.0",
"@nictool/dns-resource-record": "^1.8.0",
"@msimerson/hapi-openapi": "^18.0.3",
"@nictool/dns-resource-record": "^1.8.1",
"@nictool/validate": "^0.9.1",
"joi": "^18.2.3",
"mysql2": "^3.23.1",
Expand Down
Loading