Skip to content

Commit d6a58bc

Browse files
authored
refactor: change boundary requirement and optimise groups (#11)
1 parent 51a2372 commit d6a58bc

28 files changed

+1397
-877
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ end_of_line = lf
66
insert_final_newline = true
77
trim_trailing_whitespace = true
88

9-
[*.{js,ts}]
9+
[*.{js,cjs,mjs,ts,cts,mts}]
1010
indent_size = 4
1111
indent_style = tab
1212
block_comment_start = /*

.gitattributes

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1 @@
1-
# Auto detect text files and perform LF normalization
2-
* text=auto
3-
4-
5-
*.ts text eol=lf merge=union
6-
*.tsx text eol=lf merge=union
7-
*.rs text eol=lf merge=union
8-
*.js text eol=lf merge=union
9-
*.json text eol=lf merge=union
10-
*.debug text eol=lf merge=union
11-
12-
# Generated codes
13-
index.js linguist-detectable=false
14-
index.d.ts linguist-detectable=false
1+
* text eol=lf

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @kyranet

.github/CONTRIBUTING

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contributing
2+
3+
**The issue tracker is only for issue reporting or proposals/suggestions. If you have a question, you can find us in our [Discord Server]**.
4+
5+
To contribute to this repository, feel free to create a new fork of the repository and
6+
submit a pull request.
7+
8+
1. Fork, clone, and select the **main** branch.
9+
1. Create a new branch in your fork.
10+
1. Make your changes.
11+
1. Commit your changes, and push them.
12+
1. Submit a Pull Request [here]!
13+
14+
<!-- Link Dump -->
15+
16+
[discord server]: https://join.skyra.pw
17+
[here]: https://github.com/skyra-project/word-match/pulls

.github/SECURITY.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 1.x | :white_check_mark: |
8+
9+
## Reporting a Vulnerability
10+
11+
If you find a vulnerability in @skyra/word-match's codebase please report it immediately.
12+
If you deem the vulnerability exploitable by Skyra's users in any shape or form please join the Discord server at https://join.skyra.pw and then DM either @kyranet or @favna.
13+
In case the vulnerability is not exploitable by Skyra's users you are free to either:
14+
15+
- Use the GitHub issue tracker to report the issue
16+
- or join the Discord server through https://join.skyra.pw and use the "#feedback" channel.

.github/hooks/commit-msg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
yarn commitlint --edit $1

.github/hooks/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
yarn lint-staged

.github/renovate.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["config:base", "group:allNonMajor", ":preserveSemverRanges", ":disablePeerDependencies"],
4-
"labels": ["dependencies"],
3+
"extends": ["github>sapphiredev/readme:sapphire-renovate"],
54
"packageRules": [
65
{
76
"matchPackageNames": ["@napi/cli", "napi", "napi-build", "napi-derive"],
@@ -12,9 +11,5 @@
1211
"matchPackagePatterns": ["^eslint", "^@typescript-eslint"],
1312
"groupName": "linter"
1413
}
15-
],
16-
"commitMessagePrefix": "chore: ",
17-
"commitMessageAction": "bump up",
18-
"commitMessageTopic": "{{depName}} version",
19-
"ignoreDeps": []
14+
]
2015
}

.github/workflows/CI.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,14 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
settings:
31-
- host: macos-latest
31+
- host: macos-13
3232
target: x86_64-apple-darwin
3333
build: |
34-
yarn build
34+
yarn build --target x86_64-apple-darwin
3535
strip -x *.node
3636
- host: windows-latest
3737
build: yarn build
3838
target: x86_64-pc-windows-msvc
39-
- host: windows-latest
40-
build: |
41-
yarn build --target i686-pc-windows-msvc
42-
yarn test
43-
target: i686-pc-windows-msvc
4439
- host: ubuntu-latest
4540
target: x86_64-unknown-linux-gnu
4641
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
@@ -67,6 +62,7 @@ jobs:
6762
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
6863
build: |-
6964
set -e &&
65+
rustup target add aarch64-unknown-linux-gnu &&
7066
yarn build --target aarch64-unknown-linux-gnu &&
7167
aarch64-unknown-linux-gnu-strip *.node
7268
- host: ubuntu-latest
@@ -98,7 +94,7 @@ jobs:
9894
- host: windows-latest
9995
target: aarch64-pc-windows-msvc
10096
build: yarn build --target aarch64-pc-windows-msvc
101-
name: stable - ${{ matrix.settings.target }} - node@18
97+
name: ${{ matrix.settings.target }} - node@18
10298
runs-on: ${{ matrix.settings.host }}
10399
steps:
104100
- uses: actions/checkout@v4
@@ -109,10 +105,10 @@ jobs:
109105
node-version: 18
110106
cache: yarn
111107
- name: Install
112-
uses: dtolnay/rust-toolchain@stable
108+
uses: dtolnay/rust-toolchain@nightly
113109
if: ${{ !matrix.settings.docker }}
114110
with:
115-
toolchain: stable
111+
toolchain: nightly
116112
targets: ${{ matrix.settings.target }}
117113
- name: Cache cargo
118114
uses: actions/cache@v4
@@ -132,19 +128,8 @@ jobs:
132128
run: ${{ matrix.settings.setup }}
133129
if: ${{ matrix.settings.setup }}
134130
shell: bash
135-
- name: Setup node x86
136-
if: matrix.settings.target == 'i686-pc-windows-msvc'
137-
run: yarn config set supportedArchitectures.cpu "ia32"
138-
shell: bash
139131
- name: Install dependencies
140132
run: yarn install
141-
- name: Setup node x86
142-
uses: actions/setup-node@v4
143-
if: matrix.settings.target == 'i686-pc-windows-msvc'
144-
with:
145-
node-version: 18
146-
cache: yarn
147-
architecture: x86
148133
- name: Build in docker
149134
uses: addnab/docker-run-action@v3
150135
if: ${{ matrix.settings.docker }}
@@ -172,8 +157,10 @@ jobs:
172157
settings:
173158
- host: windows-latest
174159
target: x86_64-pc-windows-msvc
175-
- host: macos-latest
160+
- host: macos-13
176161
target: x86_64-apple-darwin
162+
- host: macos-latest
163+
target: aarch64-apple-darwin
177164
node:
178165
- '18'
179166
- '20'
@@ -404,15 +391,15 @@ jobs:
404391
npm config set provenance true
405392
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
406393
then
407-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
394+
echo "//registry.npmjs.org/:_authToken=$NPM_PUBLISH_TOKEN" >> ~/.npmrc
408395
npm publish --access public
409396
elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+";
410397
then
411-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
398+
echo "//registry.npmjs.org/:_authToken=$NPM_PUBLISH_TOKEN" >> ~/.npmrc
412399
npm publish --tag next --access public
413400
else
414401
echo "Not a release, skipping publish"
415402
fi
416403
env:
417404
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
418-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
405+
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
cache: 'yarn'
2525

2626
- name: Install
27-
uses: dtolnay/rust-toolchain@stable
27+
uses: dtolnay/rust-toolchain@nightly
2828
with:
2929
components: clippy, rustfmt
3030

@@ -35,7 +35,7 @@ jobs:
3535
run: yarn lint
3636

3737
- name: Cargo fmt
38-
run: cargo fmt -- --check
38+
run: cargo +nightly fmt -- --check
3939

4040
- name: Clippy
4141
run: cargo clippy

0 commit comments

Comments
 (0)