Skip to content

Commit

Permalink
explicitly support node 18x+
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
  • Loading branch information
explodingcamera committed Oct 4, 2023
1 parent 676e177 commit 7b8a45b
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 5,007 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ jobs:
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 20

- uses: pnpm/action-setup@v2
- uses: oven-sh/setup-bun@v1
with:
version: 8.6.12
run_install: true
bun-version: latest

- name: Build Deps
run: pnpm build
run: bun run build

- name: Run Tests
run: pnpm test
run: bun run test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Subsonic-API <a href="https://www.npmjs.com/package/subsonic-api"><img src="https://img.shields.io/npm/v/subsonic-api?style=flat&colorA=000000&colorB=efefef"/></a> <a href="https://github.com/explodingcamera/subsonic-api/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/explodingcamera/subsonic-api/test.yml?branch=main&style=flat&colorA=000000"/></a>

A simple API library for interacting with Subsonic-compatible servers (Up to API version 1.16.1) written in TypeScript.
A simple API library for interacting with Subsonic-compatible servers (Up to API version 1.16.1) written in TypeScript. Supports Node.js >= 18, bun >= 1 and Browser.

## Installation

Expand Down
8 changes: 6 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"lineWidth": 110
},
"files": {
"ignore": ["**/node_modules/*", "**/dist/*", "**/.turbo/*"]
"ignore": [
"**/node_modules/*",
"**/dist/*",
"**/.turbo/*"
]
},
"linter": {
"enabled": true,
Expand All @@ -23,4 +27,4 @@
}
}
}
}
}
Binary file added bun.lockb
Binary file not shown.
21 changes: 17 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@
"files": [
"lib"
],
"exports": {
".": {
"import": "./lib/index.js",
"require": "./lib/index.js",
"types": "./lib/index.d.ts"
},
"./lib": "./lib/index.js",
"./lib/index.js": "./lib/index.js",
"./lib/index.d.ts": "./lib/index.d.ts"
},
"scripts": {
"watch": "npm run build:esbuild -- --watch",
"build": "npm run build:esbuild && npm run types",
"build:esbuild": "esbuild src/*.ts --minify --bundle --outdir=lib --platform=neutral --external:crypto --external:spark-md5 --external:node-fetch --target=node16 --format=esm",
"build:esbuild": "esbuild src/*.ts --minify --bundle --outdir=lib --platform=neutral --external:crypto --external:spark-md5 --target=node16 --format=esm",
"dev": "bun example/test.ts",
"release": "release-it",
"test": "vitest",
Expand Down Expand Up @@ -42,7 +52,10 @@
}
},
"dependencies": {
"node-fetch": "^3.3.2",
"spark-md5": "^3.0.2"
}
}
},
"engines": {
"node": ">=18"
},
"engineStrict": false
}
Loading

0 comments on commit 7b8a45b

Please sign in to comment.