Skip to content

Commit 82de4b3

Browse files
authored
Merge pull request #30 from leancodepl/feat/upgrades
Modernize package
2 parents f25bcf9 + 644ef4e commit 82de4b3

33 files changed

Lines changed: 9557 additions & 5287 deletions

.eslintrc.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
11
name: build
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
88

99
jobs:
10-
build:
11-
name: Build
12-
runs-on: ubuntu-latest
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
1313

14-
steps:
15-
- uses: actions/checkout@v2
16-
- name: Install modules
17-
run: npm ci
18-
- name: Run ESLint
19-
run: npm run lint
20-
- name: Run tests
21-
run: npm test
22-
- name: Test types
23-
run: npm run test:types
24-
- name: Build
25-
run: npm run build
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v5
17+
with:
18+
fetch-depth: 0
19+
- name: Setup Node
20+
uses: actions/setup-node@v5
21+
with:
22+
node-version-file: .nvmrc
23+
cache: "npm"
24+
registry-url: "https://registry.npmjs.org"
25+
- name: Install
26+
run: npm ci
27+
- name: Lint
28+
run: npm run lint
29+
- name: Run tests
30+
run: npm test
31+
- name: Test types
32+
run: npm run test:types
33+
- name: Build
34+
run: npm run build

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_tag:
7+
type: choice
8+
description: Choose release tag
9+
options:
10+
- alpha
11+
- latest
12+
13+
permissions:
14+
id-token: write
15+
contents: read
16+
17+
jobs:
18+
release:
19+
name: Release
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v5
25+
with:
26+
fetch-depth: 0
27+
- name: Get the version
28+
id: get_version
29+
run: echo "version=$(jq -Mr '.version' < package.json)" >> $GITHUB_OUTPUT
30+
- name: Setup Node
31+
uses: actions/setup-node@v5
32+
with:
33+
node-version-file: .nvmrc
34+
cache: "npm"
35+
registry-url: "https://registry.npmjs.org"
36+
# Ensure npm 11.5.1 or later is installed for OIDC to work.
37+
- name: Update npm
38+
run: npm install -g npm@latest
39+
- name: Install
40+
run: npm ci
41+
- name: Lint
42+
run: npm run lint
43+
- name: Run tests
44+
run: npm test
45+
- name: Test types
46+
run: npm run test:types
47+
- name: Build
48+
run: npm run build
49+
- name: Publish
50+
run: npm publish --registry=https://registry.npmjs.org --tag=${{github.event.inputs.release_tag}}

.nvmrc

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

.prettierrc.cjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const baseConfig = require("@leancodepl/prettier-config")
2+
3+
module.exports = baseConfig

.prettierrc.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"typescript.tsdk": "node_modules/typescript/lib"
3-
}
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

0 commit comments

Comments
 (0)