urllib

v4.3.1
Help in opening URLs (mostly HTTP) in a complex world — basic and digest authentication, redirections, timeout and more. Base undici API.
urllib http urlopen curl wget request https undici fetch and 1 more...

lint

eslint src test --ext .ts --cache

prebuild

npm run clean

build

tsc --version && tshy && tshy-after && npm run build:version

postbuild

rm -rf *.tsbuildinfo

build:version

node ./scripts/replace_urllib_version.js

build:cjs:test

cd test/cjs && rm -rf node_modules && npm link ../.. && node index.js

build:esm:test

cd test/esm && rm -rf node_modules && npm link ../.. && node index.js

build:mts:test

cd test/mts && rm -rf node_modules && npm link ../.. && tsc

build:test

npm run build && npm run build:cjs:test && npm run build:esm:test && npm run build:mts:test && npm run test-tsc

test-tsc

npm run test-tsc:cjs:es2021 && npm run test-tsc:cjs && npm run test-tsc:esm

test-tsc:cjs

cd test/fixtures/ts && rm -rf node_modules && npm link ../../.. && npm run build

test-tsc:cjs:es2021

cd test/fixtures/ts-cjs-es2021 && rm -rf node_modules && npm link ../../.. && npm run build

test-tsc:esm

cd test/fixtures/ts-esm && rm -rf node_modules && npm link ../../.. && npm run build

test

npm run lint && vitest run

test-keepalive

cross-env TEST_KEEPALIVE_COUNT=50 vitest run --test-timeout 180000 keep-alive-header.test.ts

cov

vitest run --coverage

ci

npm run lint && npm run cov && npm run prepublishOnly && npm pack && attw --pack

clean

rm -rf dist

prepublishOnly

npm run build
npm i urllib

Metadata

  • MIT
  • >= 18.19.0
  • fengmk2
  • released 9/19/2024

Downloads