Skip to content

Commit

Permalink
refactor code to several files
Browse files Browse the repository at this point in the history
add tsup
update github actions
update npm packages
fix eslint config
  • Loading branch information
TimurRin committed Jun 24, 2024
1 parent ff2c9f3 commit 713f841
Show file tree
Hide file tree
Showing 15 changed files with 2,168 additions and 527 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/publish-npm.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
release:
types: [created]
workflow_dispatch:

jobs:
publish-npm:
runs-on: ubuntu-latest
name: "Publish package to npm registry"
steps:
- uses: actions/checkout@v4
name: "Checkout repo"
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
name: "Install Node.js"
- run: npm ci
name: "Install dependencies"
- run: npm test
name: "Run tests"
- run: npm run build
name: "Build distribution bundle"
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
name: "Publish to registry"
18 changes: 0 additions & 18 deletions .github/workflows/test-commit.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test

on:
push:
branches: ["**"]
workflow_dispatch:

jobs:
test-commit:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20, 22]
name: Test repo on Node.js ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
name: "Checkout repo"
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
registry-url: https://registry.npmjs.org/
name: "Install Node.js"
- run: npm ci
name: "Install dependencies"
- run: npm test
name: "Run tests"
12 changes: 8 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import cinnabarPlugin from "@cinnabar-forge/eslint-plugin";

export default [
...cinnabarPlugin.default,
{
ignores: ["src/cinnabar.js", "build/*", "dist/*", "bin/*"],
},
...cinnabarPlugin.default.map((config) => ({
...config,
files: ["src/**/*.ts"],
rules: {
...config.rules,
"security/detect-object-injection": "off",
},
})),
];
Loading

0 comments on commit 713f841

Please sign in to comment.