Skip to content

Commit 8f12489

Browse files
committed
feat: initial commit
0 parents  commit 8f12489

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+43069
-0
lines changed

.config/beemo.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { ScaffoldConfig } from '@niieani/scaffold'
2+
3+
const config: ScaffoldConfig = {
4+
module: '@niieani/scaffold',
5+
drivers: ['babel', 'eslint', 'jest', 'prettier', 'typescript', 'webpack'],
6+
settings: {
7+
node: true,
8+
name: 'Sqids',
9+
engineTarget: 'web',
10+
codeTarget: 'es6',
11+
umd: {
12+
filename: 'sqids.js',
13+
export: 'default',
14+
},
15+
},
16+
}
17+
18+
export default config

.config/beemo/eslint.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
ignorePatterns: ['*.mjs', '*.cjs'],
3+
rules: {
4+
'import/no-default-export': 'off',
5+
'@typescript-eslint/no-parameter-properties': 'off',
6+
'@typescript-eslint/no-use-before-define': 'off',
7+
'no-underscore-dangle': 'off',
8+
'node/no-unsupported-features/es-builtins': 'off',
9+
'unicorn/prefer-spread': 'off',
10+
},
11+
}

.config/husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn rrun commitlint --config "node_modules/@niieani/scaffold/src/configs/shared/commitlint.config.js" --edit "$1"

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
**/blocklist.* binary
2+
.yarn/**/* binary
3+
cjs/**/* binary
4+
dist/**/* binary
5+
esm/**/* binary
6+
package-lock.json binary
7+
yarn.lock binary

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: 'github-actions'
5+
directory: '/'
6+
schedule:
7+
interval: 'weekly'

.github/renovate.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
":ignoreUnstable",
5+
":combinePatchMinorReleases",
6+
":renovatePrefix",
7+
":semanticCommits",
8+
":rebaseStalePrs",
9+
":prNotPending",
10+
":semanticPrefixFixDepsChoreOthers",
11+
":updateNotScheduled",
12+
":automergeDigest",
13+
":automergePatch",
14+
":automergeMinor",
15+
":automergeRequireAllStatusChecks",
16+
":maintainLockFilesWeekly",
17+
":respectLatest",
18+
":updateNotScheduled",
19+
"schedule:earlyMondays"
20+
],
21+
"prConcurrentLimit": 5,
22+
"pin": false,
23+
"rangeStrategy": "bump",
24+
"ignoreDeps": []
25+
}

.github/workflows/ci-cd.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
- next
9+
pull_request:
10+
branches:
11+
- '**'
12+
13+
jobs:
14+
test:
15+
name: Test on node ${{ matrix.node }}
16+
if: github.actor != 'github-actions[bot]'
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
node: [16]
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.node }}
26+
cache: 'yarn'
27+
- name: Install dependencies and test
28+
run: |
29+
yarn install --immutable
30+
yarn build
31+
yarn test
32+
33+
publish:
34+
name: Publish package to NPM
35+
needs: test
36+
runs-on: ubuntu-latest
37+
if: github.actor != 'github-actions[bot]' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next')
38+
steps:
39+
- uses: actions/checkout@v3
40+
- uses: actions/setup-node@v3
41+
with:
42+
node-version: 16
43+
cache: 'yarn'
44+
- name: Build and release
45+
run: |
46+
yarn install --immutable
47+
yarn build
48+
yarn release
49+
env:
50+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
51+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/codeql-analysis.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 'Code Scanning'
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 6 * * 0'
8+
9+
jobs:
10+
CodeQL-Build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
with:
17+
# We must fetch at least the immediate parents so that if this is
18+
# a pull request then we can checkout the head.
19+
fetch-depth: 2
20+
21+
# Initializes the CodeQL tools for scanning.
22+
- name: Initialize CodeQL
23+
uses: github/codeql-action/init@v2
24+
# Override language selection by uncommenting this and choosing your languages
25+
# with:
26+
# languages: go, javascript, csharp, python, cpp, java
27+
28+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
29+
# If this step fails, then you should remove it and run the build manually (see below)
30+
- name: Autobuild
31+
uses: github/codeql-action/autobuild@v2
32+
33+
# ℹ️ Command-line programs to run using the OS shell.
34+
# 📚 https://git.io/JvXDl
35+
36+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
37+
# and modify them (or add more) to build your code if your project
38+
# uses a compiled language
39+
40+
#- run: |
41+
# make bootstrap
42+
# make release
43+
44+
- name: Perform CodeQL Analysis
45+
uses: github/codeql-action/analyze@v2
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow was added by CodeSee. Learn more at https://codesee.io/
2+
# This is v2.0 of this workflow file
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request_target:
8+
types: [opened, synchronize, reopened]
9+
10+
name: CodeSee
11+
12+
permissions: read-all
13+
14+
jobs:
15+
codesee:
16+
runs-on: ubuntu-latest
17+
continue-on-error: true
18+
name: Analyze the repo with CodeSee
19+
steps:
20+
- uses: Codesee-io/codesee-action@v2
21+
with:
22+
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.vscode
2+
.eslintignore
3+
.eslintrc.js
4+
.prettierignore
5+
.editorconfig
6+
tsconfig.json
7+
babel.config.js
8+
jest.config.js
9+
prettier.config.js
10+
vite.config.ts
11+
webpack.config.js
12+
*.tsbuildinfo
13+
14+
/.yarn/*
15+
16+
!/.yarn/patches
17+
!/.yarn/plugins
18+
!/.yarn/releases
19+
!/.yarn/sdks
20+
21+
# Swap the comments on the following lines if you wish to use zero-installs
22+
# Documentation here: https://yarnpkg.com/features/zero-installs
23+
# !/.yarn/cache
24+
/.pnp.*
25+
26+
# Logs
27+
logs/
28+
*.log
29+
30+
# Cache
31+
.eslintcache
32+
.idea
33+
.npm
34+
.vscode
35+
.yarnclean
36+
37+
# Directories
38+
coverage/
39+
dts/
40+
mjs/
41+
node_modules/
42+
43+
# Custom
44+
*.min.js
45+
*.map
46+
47+
.DS_Store

0 commit comments

Comments
 (0)