Skip to content

Commit

Permalink
Switch to fetch-http2 (#54)
Browse files Browse the repository at this point in the history
* Switch to fetch-http2

* Use node 18

* Deps

* Fix build include

* Changelog
  • Loading branch information
AndrewBarba authored Jan 12, 2023
1 parent 3f67694 commit cdeeda3
Show file tree
Hide file tree
Showing 13 changed files with 765 additions and 634 deletions.
13 changes: 11 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@
"node": true,
"mocha": true
},
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": 2019,
"ecmaVersion": 2022,
"sourceType": "module"
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off"
}
}
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2.2.1
- uses: pnpm/action-setup@v2
with:
version: 7

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: pnpm

- run: pnpm install --frozen-lockfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:

strategy:
matrix:
node-version: [16, 18]
node-version: [18]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2.2.1
- uses: pnpm/action-setup@v2
with:
version: 7

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

---

## [11.0.0](https://github.com/AndrewBarba/apns2/releases/tag/11.0.0)

1. Built for Node.js 18
2. Drops support for all versions of Node <18

## [10.1.0](https://github.com/AndrewBarba/apns2/releases/tag/10.1.0)

1. Add support for alert subtitle
Expand Down
4 changes: 2 additions & 2 deletions esbuild.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { build, BuildOptions } from 'esbuild'

const options: BuildOptions = {
entryPoints: ['./index.ts'],
entryPoints: ['./src/index.ts'],
platform: 'node',
target: 'node16',
target: 'node18',
external: ['jsonwebtoken'],
minify: true,
bundle: true,
Expand Down
4 changes: 0 additions & 4 deletions index.ts

This file was deleted.

39 changes: 21 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,47 @@
{
"name": "apns2",
"version": "10.1.0",
"version": "11.0.0",
"description": "Node client for connecting to Apple's Push Notification Service using the new HTTP/2 protocol with JSON web tokens.",
"author": "Andrew Barba <[email protected]>",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",
"engines": {
"node": ">=16.14.0"
"node": ">=18"
},
"repository": {
"url": "https://github.com/AndrewBarba/apns2"
},
"dependencies": {
"jsonwebtoken": "^8.5.1"
"fetch-http2": "^1.0.2",
"jsonwebtoken": "^9.0.0"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.2",
"@types/jsonwebtoken": "^8.5.8",
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.33",
"@tsconfig/node18": "^1.0.1",
"@types/jsonwebtoken": "^9.0.1",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.18",
"@types/should": "^13.0.0",
"dotenv": "^8.2.0",
"esbuild": "^0.14.39",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"mocha": "^10.0.0",
"prettier": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^5.48.1",
"@typescript-eslint/parser": "^5.48.1",
"dotenv": "^16.0.3",
"esbuild": "^0.16.17",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
"mocha": "^10.2.0",
"prettier": "^2.8.2",
"should": "^13.2.3",
"ts-node": "^10.7.0",
"typescript": "^4.6.4"
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
},
"files": [
"dist"
],
"scripts": {
"build": "tsc -emitDeclarationOnly && ts-node -T ./esbuild.ts",
"lint": "eslint .",
"test": "mocha --exit --bail --slow 1000 --timeout 5000 ./test/test.js",
"lint": "eslint src",
"test": "mocha --require ts-node/register --exit --bail --slow 1000 --timeout 5000 ./test/test.ts",
"ts": "ts-node -T"
}
}
Loading

0 comments on commit cdeeda3

Please sign in to comment.