Skip to content

Commit 595d8bb

Browse files
committed
feat: Add Rollup 4 to supported versions
And upgrade the dependencies. And exzchange denolint with biome lint. And refactor sources to satisfy the new linter. And eschange semantic-release with publish-release-action.
1 parent 4e8fb5b commit 595d8bb

File tree

10 files changed

+358
-2448
lines changed

10 files changed

+358
-2448
lines changed

.denolint.json

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

.github/workflows/ci.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
name: Test or Release
1+
name: Test and Release
22

33
on:
4-
- push
5-
- pull_request
4+
push:
5+
branches:
6+
- master
7+
tags-ignore:
8+
- '**'
9+
paths-ignore:
10+
- '**/*.md'
11+
- LICENSE
12+
pull_request:
613

714
jobs:
8-
test-or-release:
15+
test-and-release:
916
runs-on: ubuntu-latest
1017
steps:
11-
- name: Checkout Sources
12-
uses: actions/checkout@v3
13-
- name: Install Node
14-
uses: actions/setup-node@v3
18+
- uses: actions/checkout@v4
19+
- uses: pnpm/action-setup@v4
20+
with:
21+
version: latest
22+
- uses: actions/setup-node@v4
1523
with:
1624
node-version: 'lts/*'
1725
registry-url: 'https://registry.npmjs.org'
18-
- name: Install PNPM
19-
uses: pnpm/action-setup@v2
20-
with:
21-
version: latest
22-
run_install: |
23-
- args: [--frozen-lockfile, --no-verify-store-integrity]
24-
- name: Test
25-
run: npm test
26-
- name: Coverage
27-
uses: codecov/codecov-action@v3
28-
- name: Publish
29-
uses: cycjimmy/semantic-release-action@v3
26+
cache: 'pnpm'
27+
- run: pnpm i --frozen-lockfile --no-verify-store-integrity
28+
- run: npm test
29+
- uses: prantlf/publish-release-action@v1
30+
if: ${{ github.ref_name == 'master' }}
3031
with:
31-
semantic_version: 19
32-
branches: master
32+
no-archives: true
3333
env:
3434
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3535
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

biome.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"files": {
7+
"ignore": [
8+
"lib/*.cjs"
9+
]
10+
},
11+
"linter": {
12+
"enabled": true,
13+
"rules": {
14+
"recommended": true,
15+
"style": {
16+
"noParameterAssign": "off"
17+
},
18+
"complexity": {
19+
"useArrowFunction": "off"
20+
}
21+
}
22+
},
23+
"formatter": {
24+
"enabled": true,
25+
"formatWithErrors": false,
26+
"indentStyle": "space",
27+
"indentWidth": 2,
28+
"lineEnding": "lf",
29+
"lineWidth": 90
30+
},
31+
"javascript": {
32+
"formatter": {
33+
"arrowParentheses": "asNeeded",
34+
"bracketSpacing": true,
35+
"quoteProperties": "asNeeded",
36+
"quoteStyle": "single",
37+
"semicolons": "asNeeded",
38+
"trailingCommas": "none"
39+
}
40+
},
41+
"json": {
42+
"parser": {
43+
"allowComments": false,
44+
"allowTrailingCommas": false
45+
},
46+
"formatter": {
47+
"enabled": true,
48+
"trailingCommas": "none"
49+
}
50+
}
51+
}

lib/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Plugin } from 'rollup'
1+
import type { Plugin } from 'rollup'
22

33
export interface WriteOnlyChangesLogOptions {
44
/**

lib/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
import { readFile } from 'fs/promises'
2-
import { dirname, join } from 'path'
1+
import { readFile } from 'node:fs/promises'
2+
import { dirname, join } from 'node:path'
33

44
const cache = new Map()
55

66
export const writeOnlyChanges = ({ verbose, rebuild } = {}) => {
7-
let missing, failing, existed, created, changed, intact
7+
let missing
8+
let failing
9+
let existed
10+
let created
11+
let changed
12+
let intact
813
if (verbose) {
914
if (verbose === true) {
1015
missing = failing = existed = created = changed = intact = true

package.json

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,21 @@
3434
},
3535
"scripts": {
3636
"prepare": "rollup -c",
37-
"lint": "denolint && tsc --noEmit test/types.ts",
37+
"lint": "biome lint lib test && tsc --noEmit test/types.ts",
3838
"check": "teru test/*.cjs && teru-esm test/*.js",
39-
"test": "denolint && tsc --noEmit test/types.ts && teru test/*.cjs && teru-esm test/*.js"
40-
},
41-
"release": {
42-
"plugins": [
43-
"@semantic-release/commit-analyzer",
44-
"@semantic-release/release-notes-generator",
45-
"@semantic-release/changelog",
46-
"@semantic-release/npm",
47-
[
48-
"@semantic-release/github",
49-
{
50-
"failComment": false
51-
}
52-
],
53-
"@semantic-release/git"
54-
]
39+
"test": "biome lint lib test && tsc --noEmit test/types.ts && teru test/*.cjs && teru-esm test/*.js"
5540
},
5641
"devDependencies": {
57-
"@semantic-release/changelog": "^6.0.3",
58-
"@semantic-release/git": "^10.0.1",
59-
"@types/node": "^18.16.3",
60-
"denolint": "^2.0.9",
61-
"rollup": "^3.21.4",
42+
"@biomejs/biome": "^1.8.3",
43+
"@types/node": "^22.10.1",
44+
"rollup": "^4.28.1",
6245
"tehanu": "^1.0.1",
63-
"tehanu-repo-coco": "^1.0.0",
64-
"tehanu-teru": "^1.0.0",
65-
"typescript": "^5.0.4"
46+
"tehanu-repo-coco": "^1.0.1",
47+
"tehanu-teru": "^1.0.1",
48+
"typescript": "^5.7.2"
6649
},
6750
"peerDependencies": {
68-
"rollup": "^1.20 || ^2 || ^3"
51+
"rollup": "^1.20 || ^2 || ^3 || ^4"
6952
},
7053
"keywords": [
7154
"rollup",

0 commit comments

Comments
 (0)