Skip to content

Commit dab2daf

Browse files
committed
chore: fix action, satisfy biome
1 parent d69a76a commit dab2daf

6 files changed

Lines changed: 29 additions & 31 deletions

File tree

.github/workflows/publish.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
name: Publish
1+
name: Publish to NPM
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
branches: main
66

77
jobs:
8-
build:
8+
lint:
99
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: biomejs/setup-biome@v1
13+
with:
14+
version: latest
15+
- name: Run Biome
16+
run: biome ci .
17+
publish:
18+
runs-on: ubuntu-latest
19+
needs: [lint]
1020
steps:
1121
- uses: actions/checkout@v4
12-
- uses: actions/setup-node@v1
22+
- uses: actions/setup-node@v3
1323
with:
1424
node-version: 18
15-
registry-url: https://registry.npmjs.org/
16-
- name: Upgrade NPM
17-
run: npm install -g npm
18-
- run: npm install
19-
- run: npm run build
20-
- run: npm publish --access public
21-
env:
22-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
25+
- uses: JS-DevTools/npm-publish@v3.0.1
26+
with:
27+
token: ${{ secrets.NPM_TOKEN }}

biome.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
3+
"files": {
4+
"ignore": ["build/", "node_modules/", "jest/"]
5+
},
36
"organizeImports": {
47
"enabled": true
58
},

config/jest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { Config } from "@jest/types";
21
// eslint-disable-next-line unicorn/prefer-node-protocol
32
// eslint-disable-next-line unicorn/import-style
4-
import * as path from "path";
3+
import * as path from "node:path";
4+
import type { Config } from "@jest/types";
55

66
const config: Config.InitialOptions = {
77
verbose: Boolean(process.env.CI),

package.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,9 @@
1818
"test": "jest --config=config/jest.config.ts --passWithNoTests",
1919
"coverage": "npm run test -- --coverage"
2020
},
21-
"keywords": [
22-
"remix",
23-
"remix-auth",
24-
"auth",
25-
"authentication",
26-
"strategy"
27-
],
21+
"keywords": ["remix", "remix-auth", "auth", "authentication", "strategy"],
2822
"license": "MIT",
29-
"files": [
30-
"build",
31-
"package.json",
32-
"README.md"
33-
],
23+
"files": ["build", "package.json", "README.md"],
3424
"peerDependencies": {
3525
"@remix-run/server-runtime": "^1.0.0"
3626
},

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import type { StrategyVerifyCallback } from "remix-auth";
12
import {
23
OAuth2Strategy,
34
type OAuth2StrategyVerifyParams,
45
} from "remix-auth-oauth2";
56
import type { GuildedStrategyOptions, GuildedUser } from "./types";
6-
import type { StrategyVerifyCallback } from "remix-auth";
77

88
const AUTHLINK = "https://authlink.app";
99
const API_V = "1";

test/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { createCookieSessionStorage } from "@remix-run/node";
22
import { MyStrategy } from "../src";
33

44
describe(MyStrategy, () => {
5-
let verify = jest.fn();
5+
const verify = jest.fn();
66
// You will probably need a sessionStorage to test the strategy.
7-
let sessionStorage = createCookieSessionStorage({
7+
const sessionStorage = createCookieSessionStorage({
88
cookie: { secrets: ["s3cr3t"] },
99
});
1010

@@ -13,7 +13,7 @@ describe(MyStrategy, () => {
1313
});
1414

1515
test("should have the name of the strategy", () => {
16-
let strategy = new MyStrategy({ something: "You may need" }, verify);
16+
const strategy = new MyStrategy({ something: "You may need" }, verify);
1717
expect(strategy.name).toBe("change-me");
1818
});
1919

0 commit comments

Comments
 (0)