Skip to content

Commit 0a507b0

Browse files
committed
refactor: upgrade project stack
1 parent fc08856 commit 0a507b0

18 files changed

+8016
-3774
lines changed

.eslintignore

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

.eslintrc.cjs

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

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
12+
groups:
13+
dev-dependencies:
14+
patterns:
15+
- "*"
16+
dependencies:
17+
patterns:
18+
- "*"

.github/workflows/build.yml

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,54 +8,35 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout 🛎️
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212

13-
- uses: pnpm/action-setup@v2
14-
name: Install pnpm 📦
15-
id: pnpm-install
13+
- uses: actions/setup-node@v4
1614
with:
17-
version: 8
18-
run_install: false
19-
20-
- name: Get pnpm store directory 📦
21-
id: pnpm-cache
22-
shell: bash
23-
run: |
24-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
25-
26-
- uses: actions/cache@v3
27-
name: Setup pnpm cache 📦
28-
with:
29-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
30-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
31-
restore-keys: |
32-
${{ runner.os }}-pnpm-store-
15+
node-version: lts/*
16+
cache: npm
3317

3418
- name: Install dependencies 📦
35-
run: pnpm install
19+
run: npm ci
3620

3721
- name: Lint 🧹
38-
run: pnpm run lint
22+
run: npm run lint
3923

4024
- name: Build 🔧
41-
run: pnpm run build
25+
run: npm run build
4226

4327
- name: Test 🧪
44-
run: pnpm run coverage
28+
run: npm run test:ci
4529

46-
- name: Upload Coverage 📊
47-
uses: paambaati/codeclimate-action@v5.0.0
48-
env:
49-
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
30+
- name: Coveralls 🎉
31+
uses: coverallsapp/github-action@v2
5032
with:
51-
coverageLocations: ${{github.workspace}}/coverage/clover.xml:clover
33+
github-token: ${{ secrets.GITHUB_TOKEN }}
5234

5335
- name: Build Docs 📖
54-
run: |
55-
pnpm run docs
36+
run: npm run docs
5637

5738
- name: Deploy 🚀
58-
uses: JamesIves/github-pages-deploy-action@4.1.5
39+
uses: JamesIves/github-pages-deploy-action@v4
5940
with:
6041
branch: gh-pages
6142
folder: docs

.github/workflows/pr.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,21 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout 🛎️
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212

13-
- uses: pnpm/action-setup@v2
14-
name: Install pnpm 📦
15-
id: pnpm-install
13+
- uses: actions/setup-node@v4
1614
with:
17-
version: 8
18-
run_install: false
19-
20-
- name: Get pnpm store directory 📦
21-
id: pnpm-cache
22-
shell: bash
23-
run: |
24-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
25-
26-
- uses: actions/cache@v3
27-
name: Setup pnpm cache 📦
28-
with:
29-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
30-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
31-
restore-keys: |
32-
${{ runner.os }}-pnpm-store-
15+
node-version: lts/*
16+
cache: npm
3317

3418
- name: Install dependencies 📦
35-
run: pnpm install
19+
run: npm ci
3620

3721
- name: Lint 🧹
38-
run: pnpm run lint
22+
run: npm run lint
3923

4024
- name: Build 🔧
41-
run: pnpm run build
25+
run: npm run build
4226

4327
- name: Test 🧪
44-
run: pnpm run coverage
28+
run: npm run test:ci

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Node.js Package
2+
3+
on:
4+
push:
5+
tags: "v**"
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
id-token: write
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
steps:
18+
- name: Checkout 🛎️
19+
uses: actions/checkout@v4
20+
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: lts/*
24+
registry-url: "https://registry.npmjs.org"
25+
cache: npm
26+
27+
- name: Install dependencies 📦
28+
run: npm install
29+
30+
- name: Build 🔧
31+
run: npm run build
32+
33+
- name: Publish Package 🚀
34+
run: npm publish --provenance --access public
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.vscode/settings.json

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,28 @@
11
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"cSpell.enabled": true,
4+
"eslint.enable": true,
5+
"prettier.enable": true,
6+
"conventionalCommits.gitmoji": false,
7+
"conventionalCommits.promptFooter": false,
28
"editor.tabSize": 2,
39
"editor.formatOnSave": true,
4-
"editor.defaultFormatter": "esbenp.prettier-vscode",
510
"editor.codeActionsOnSave": {
611
"source.fixAll": "explicit",
712
"source.addMissingImports": "explicit",
813
"source.organizeImports": "never"
914
},
10-
"eslint.validate": ["javascript", "javascriptreact", "vue", "svelte"],
11-
"typescript.tsdk": "node_modules/typescript/lib",
12-
"[html]": {
13-
"editor.formatOnSave": true,
14-
"editor.defaultFormatter": "esbenp.prettier-vscode"
15-
},
16-
"[css]": {
17-
"editor.formatOnSave": true,
18-
"editor.defaultFormatter": "esbenp.prettier-vscode"
19-
},
20-
"[scss]": {
21-
"editor.formatOnSave": true,
22-
"editor.defaultFormatter": "esbenp.prettier-vscode"
23-
},
24-
"[json]": {
25-
"editor.formatOnSave": true,
26-
"editor.defaultFormatter": "esbenp.prettier-vscode"
27-
},
28-
"[jsonc]": {
29-
"editor.formatOnSave": true,
30-
"editor.defaultFormatter": "esbenp.prettier-vscode"
31-
},
15+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3216
"[javascript]": {
33-
"editor.formatOnSave": true,
3417
"editor.defaultFormatter": "esbenp.prettier-vscode"
3518
},
36-
"[svelte]": {
37-
"editor.formatOnSave": true,
38-
"editor.defaultFormatter": "svelte.svelte-vscode"
19+
"[javascriptreact]": {
20+
"editor.defaultFormatter": "esbenp.prettier-vscode"
3921
},
4022
"[typescript]": {
41-
"editor.formatOnSave": true,
4223
"editor.defaultFormatter": "esbenp.prettier-vscode"
4324
},
4425
"[typescriptreact]": {
45-
"editor.formatOnSave": true,
4626
"editor.defaultFormatter": "esbenp.prettier-vscode"
47-
},
48-
"[markdown]": {
49-
"editor.formatOnSave": true,
50-
"editor.defaultFormatter": "esbenp.prettier-vscode"
51-
},
52-
"[yaml]": {
53-
"editor.formatOnSave": true,
54-
"editor.defaultFormatter": "esbenp.prettier-vscode"
55-
},
56-
"conventionalCommits.gitmoji": false,
57-
"conventionalCommits.promptFooter": false
27+
}
5828
}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
[![Docs](https://img.shields.io/badge/Docs-read-%23fdf9f5)](https://wopjs.github.io/tsur)
88
[![Build Status](https://img.shields.io/github/actions/workflow/status/wopjs/tsur/build.yml)](https://github.com/wopjs/tsur/actions/workflows/build.yml)
99
[![npm-version](https://img.shields.io/npm/v/@wopjs/tsur.svg)](https://www.npmjs.com/package/@wopjs/tsur)
10-
[![Coverage Status](https://img.shields.io/codeclimate/coverage/wopjs/tsur)](https://codeclimate.com/github/wopjs/tsur)
10+
[![Coverage Status](https://img.shields.io/coverallsCoverage/github/wopjs/tsur)](https://coveralls.io/github/wopjs/tsur)
11+
[![minified-size](https://img.shields.io/bundlephobia/minzip/@wopjs/tsur)](https://bundlephobia.com/package/@wopjs/tsur)
1112

1213
TypeScript goodies inspired by Rust.
1314

0 commit comments

Comments
 (0)