Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Nov 21, 2023
1 parent c51fde6 commit e2fa308
Show file tree
Hide file tree
Showing 10 changed files with 3,631 additions and 12,532 deletions.
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ See [Throwback](https://github.com/serviejs/throwback#usage) for more informatio
```ts
type Plugin = (
req: Request,
next: () => Promise<Response>
next: () => Promise<Response>,
) => Promise<Response>;
```

Expand Down
15,996 changes: 3,572 additions & 12,424 deletions package-lock.json

Large diffs are not rendered by default.

126 changes: 48 additions & 78 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,6 @@
"name": "popsicle",
"version": "12.1.0",
"description": "Advanced HTTP requests in node.js and browsers",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist/",
"logo.svg"
],
"browser": {
"./dist/node.js": "./dist/browser.js"
},
"scripts": {
"prettier": "prettier --write",
"lint": "tslint \"{.,src/**}/*.{js,jsx,ts,tsx}\" --project tsconfig.json",
"format": "npm run prettier -- \"{.,src/**}/*.{js,jsx,ts,tsx,md,yml,yaml}\"",
"build": "rimraf dist && tsc",
"specs": "jest --coverage",
"test": "npm run -s lint && npm run -s build && npm run -s specs && npm run -s size",
"prepare": "npm run build",
"size": "size-limit"
},
"repository": {
"type": "git",
"url": "git://github.com/serviejs/popsicle.git"
},
"keywords": [
"request",
"http",
Expand All @@ -34,74 +11,67 @@
"browser",
"promise"
],
"homepage": "https://github.com/serviejs/popsicle",
"bugs": {
"url": "https://github.com/serviejs/popsicle/issues"
},
"repository": {
"type": "git",
"url": "git://github.com/serviejs/popsicle.git"
},
"license": "MIT",
"author": {
"name": "Blake Embrey",
"email": "[email protected]",
"url": "http://blakeembrey.me"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/serviejs/popsicle/issues"
},
"homepage": "https://github.com/serviejs/popsicle",
"jest": {
"roots": [
"<rootDir>/src/"
],
"transform": {
"\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
"main": "dist/index.js",
"browser": {
"./dist/node.js": "./dist/browser.js"
},
"size-limit": [
{
"path": "./dist/index.js",
"limit": "3.1 kB"
}
"types": "dist/index.d.ts",
"files": [
"dist/",
"logo.svg"
],
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,css,md,yml,yaml}": "npm run prettier"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@size-limit/preset-small-lib": "^4.6.0",
"@types/jest": "^26.0.14",
"@types/node": "^14.11.5",
"husky": "^4.3.0",
"jest": "^26.5.2",
"lint-staged": "^10.4.0",
"prettier": "^2.1.2",
"rimraf": "^3.0.0",
"size-limit": "^4.6.0",
"ts-jest": "^26.4.1",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"typescript": "^4.0.3"
"scripts": {
"build": "ts-scripts build",
"format": "ts-scripts format",
"prepare": "ts-scripts install",
"prepublishOnly": "npm run build",
"size": "size-limit",
"specs": "ts-scripts specs",
"test": "ts-scripts test && npm run size"
},
"dependencies": {
"popsicle-content-encoding": "^1.0.0",
"popsicle-cookie-jar": "^1.0.0",
"popsicle-redirects": "^1.1.0",
"popsicle-transport-http": "^1.1.0",
"popsicle-transport-xhr": "^2.0.0",
"popsicle-user-agent": "^1.0.0",
"servie": "^4.3.3",
"throwback": "^4.1.0"
}
}
},
"devDependencies": {
"@borderless/ts-scripts": "^0.15.0",
"@size-limit/preset-small-lib": "^11.0.0",
"@types/node": "^20.9.3",
"@vitest/coverage-v8": "^0.34.6",
"popsicle-cookie-jar": "^1.0.1",
"size-limit": "^11.0.0",
"typescript": "^5.3.2",
"vitest": "^0.34.6"
},
"engines": {
"node": ">=8"
},
"publishConfig": {
"access": "public"
},
"size-limit": [
{
"path": "./dist/index.js",
"limit": "3.3 kB"
}
]
}
2 changes: 1 addition & 1 deletion src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CommonRequest, CommonResponse } from "servie/dist/common";
export function toFetch<
T extends CommonRequest,
U extends CommonResponse,
A extends any[]
A extends any[],
>(middleware: Composed<T, U>, Request: new (...args: A) => T) {
function done(): never {
throw new TypeError("Invalid middleware stack, missing transport function");
Expand Down
1 change: 1 addition & 0 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from "vitest";
import { fetch, middleware } from "./index";

describe("popsicle", () => {
Expand Down
9 changes: 4 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
middleware as nodeMiddleware,
fetch as nodeFetch,
HttpResponse
HttpResponse,
} from "./node";
import {
middleware as browserMiddleware,
fetch as browserFetch,
XhrResponse
XhrResponse,
} from "./browser";

export * from "./common";
Expand All @@ -17,6 +17,5 @@ export const fetch: (
...args: Parameters<typeof nodeFetch> & Parameters<typeof browserFetch>
) => Promise<XhrResponse | HttpResponse> = nodeFetch;

export const middleware:
| typeof nodeMiddleware
| typeof browserMiddleware = nodeMiddleware;
export const middleware: typeof nodeMiddleware | typeof browserMiddleware =
nodeMiddleware;
4 changes: 2 additions & 2 deletions src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export {
redirects,
Request,
transport,
userAgent
userAgent,
};

/**
Expand All @@ -31,7 +31,7 @@ export const middleware = compose<Request, HttpResponse>([
userAgent(),
contentEncoding(),
// Redirects must happen around cookie support.
redirects(compose([cookies(), transport()]))
redirects(compose([cookies(), transport()])),
]);

/**
Expand Down
7 changes: 2 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"extends": "@borderless/ts-scripts/configs/tsconfig.json",
"compilerOptions": {
"target": "es2015",
"lib": ["es2015", "dom"],
"rootDir": "src",
"outDir": "dist",
"module": "commonjs",
"moduleResolution": "node",
"strict": true,
"declaration": true,
"sourceMap": true,
"inlineSources": true
"moduleResolution": "node"
}
}
3 changes: 0 additions & 3 deletions tslint.json

This file was deleted.

0 comments on commit e2fa308

Please sign in to comment.