httpsnippet-lite
Advanced tools
Comparing version 3.0.4 to 3.0.5
@@ -1,2 +0,1 @@ | ||
import type { Merge } from 'type-fest'; | ||
import type { CodeBuilderOptions } from '../helpers/code-builder.js'; | ||
@@ -12,3 +11,6 @@ import type { Request } from '../httpsnippet.js'; | ||
} | ||
export type Converter<T extends Record<string, any>> = (request: Request, options?: Merge<CodeBuilderOptions, T>) => string; | ||
type SimpleMerge<Destination, Source> = { | ||
[Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; | ||
} & Source; | ||
export type Converter<T extends Record<string, any>> = (request: Request, options?: SimpleMerge<CodeBuilderOptions, T>) => string; | ||
export interface Client<T extends Record<string, any> = Record<string, any>> { | ||
@@ -54,1 +56,2 @@ info: ClientInfo; | ||
export declare const addTargetClient: (targetId: TargetId, client: Client) => void; | ||
export {}; |
{ | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"name": "httpsnippet-lite", | ||
@@ -19,5 +19,5 @@ "description": "HTTP Request snippet generator for *most* languages", | ||
"types": "./dist/types/httpsnippet.d.ts", | ||
"import": "./dist/esm/httpsnippet.js", | ||
"module": "./dist/esm/httpsnippet.js", | ||
"require": "./dist/cjs/httpsnippet.js" | ||
"import": "./dist/esm/httpsnippet.mjs", | ||
"module": "./dist/esm/httpsnippet.mjs", | ||
"require": "./dist/cjs/httpsnippet.cjs" | ||
} | ||
@@ -64,13 +64,14 @@ }, | ||
"lint": "npm run lint:prettify && npm run lint:code && npm run lint:markdown", | ||
"lint:prettify": "prettier --config .prettierrc.cjs --check .", | ||
"lint:prettify": "prettier --check .", | ||
"lint:code": "eslint . --ext ts,d.ts,test.ts", | ||
"lint:markdown": "markdownlint-cli2 \"**/*.md\" \"#**/node_modules\"", | ||
"build": "npm run build:cjs && npm run build:esm", | ||
"build:esm": "tsc -p tsconfig.build.json --outDir dist/esm --module ES2020 --declarationDir dist/types", | ||
"build:cjs": "tsc -p tsconfig.build.json --outDir dist/cjs --module commonjs --declarationDir dist/types", | ||
"build": "npm run build:cjs && npm run build:esm && npm run test:packaging", | ||
"build:esm": "tsc -p tsconfig.build.json --outDir dist/esm --module ES2020 --declarationDir dist/types && node scripts/rewrite-extensions.mjs --module esm dist/esm", | ||
"build:cjs": "tsc -p tsconfig.build.json --outDir dist/cjs --module commonjs --declarationDir dist/types && node scripts/rewrite-extensions.mjs --module cjs dist/cjs", | ||
"test": "node --experimental-vm-modules node_modules/.bin/jest", | ||
"test:packaging": "node --input-type=commonjs -e \"require('./dist/cjs/httpsnippet.cjs')\" && node --input-type=module -e \"import './dist/esm/httpsnippet.mjs'\"", | ||
"prepublishOnly": "npm run lint && npm run test && npm run build" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^16.11.26", | ||
"@types/node": "^18.15.11", | ||
"@types/stringify-object": "^3.3.0", | ||
@@ -84,5 +85,7 @@ "@typescript-eslint/eslint-plugin": "^5.57.0", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"glob": "^9.3.2", | ||
"jest": "^29.5.0", | ||
"markdownlint-cli2": "^0.5.1", | ||
"prettier": "^2.8.7", | ||
"prettier": "^3.0.0-alpha.6", | ||
"recast": "^0.22.0", | ||
"ts-jest": "^29.0.5", | ||
@@ -94,5 +97,4 @@ "typescript": "^5.0.2" | ||
"formdata-node": "^4.4.1", | ||
"stringify-object": "3.3.0", | ||
"type-fest": "^3.6.1" | ||
"stringify-object": "3.3.0" | ||
} | ||
} |
751567
3
348
18698
16
4
- Removedtype-fest@^3.6.1
- Removedtype-fest@3.13.1(transitive)