Skip to content

Commit

Permalink
released v4.0.10-next.0 - removing specified exports
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhitley committed Jun 15, 2023
1 parent 4bf18d1 commit 59239b4
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 89 deletions.
20 changes: 20 additions & 0 deletions example/node-require.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const { createServerAdapter } = require('@whatwg-node/server')
const { createServer } = require('http')
require('isomorphic-fetch')
const { Router, error, json } = require('itty-router')

const router = Router()

router.get('/', () => 'Success!').all('*', () => error(404))

const ittyServer = createServerAdapter((...args) =>
router
.handle(...args)
.then(json)
.catch(error)
)

// Then use it in any environment
const httpServer = createServer(ittyServer)
httpServer.listen(3001)
console.log('listening at https://localhost:3001')
91 changes: 7 additions & 84 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,88 +1,10 @@
{
"name": "itty-router",
"version": "4.0.10",
"version": "4.0.10-next.0",
"description": "A tiny, zero-dependency router, designed to make beautiful APIs in any environment.",
"type": "module",
"main": "index.js",
"module": "index.js",
"types": "index.d.ts",
"exports": {
".": {
"import": "./index.js",
"require": "./cjs/index.js",
"types": "./index.d.ts"
},
"./createCors": {
"import": "./createCors.js",
"require": "./cjs/createCors.js",
"types": "./createCors.d.ts"
},
"./createResponse": {
"import": "./createResponse.js",
"require": "./cjs/createResponse.js",
"types": "./createResponse.d.ts"
},
"./error": {
"import": "./error.js",
"require": "./cjs/error.js",
"types": "./error.d.ts"
},
"./html": {
"import": "./html.js",
"require": "./cjs/html.js",
"types": "./html.d.ts"
},
"./jpeg": {
"import": "./jpeg.js",
"require": "./cjs/jpeg.js",
"types": "./jpeg.d.ts"
},
"./png": {
"import": "./png.js",
"require": "./cjs/png.js",
"types": "./png.d.ts"
},
"./Router": {
"import": "./Router.js",
"require": "./cjs/Router.js",
"types": "./Router.d.ts"
},
"./status": {
"import": "./status.js",
"require": "./cjs/status.js",
"types": "./status.d.ts"
},
"./text": {
"import": "./text.js",
"require": "./cjs/text.js",
"types": "./text.d.ts"
},
"./webp": {
"import": "./webp.js",
"require": "./cjs/webp.js",
"types": "./webp.d.ts"
},
"./websocket": {
"import": "./websocket.js",
"require": "./cjs/websocket.js",
"types": "./websocket.d.ts"
},
"./withContent": {
"import": "./withContent.js",
"require": "./cjs/withContent.js",
"types": "./withContent.d.ts"
},
"./withCookies": {
"import": "./withCookies.js",
"require": "./cjs/withCookies.js",
"types": "./withCookies.d.ts"
},
"./withParams": {
"import": "./withParams.js",
"require": "./cjs/withParams.js",
"types": "./withParams.d.ts"
}
},
"main": "./cjs/index.js",
"module": "./index.js",
"types": "./index.d.ts",
"keywords": [
"api",
"router",
Expand All @@ -107,9 +29,10 @@
"coveralls": "yarn coverage && cat ./coverage/lcov.info | coveralls",
"verify": "echo 'verifying module...' && yarn build && yarn test:once",
"prerelease": "yarn verify",
"prebuild": "rimraf dist && mkdir dist && yarn coverage && yarn format",
"prebuild": "rimraf dist && mkdir dist",
"build": "rollup -c",
"release": "release --tag --push --patch --src=dist",
"release:next": "release --tag --push --type=next --src=dist",
"runtime:bun": "bun example/bun.ts",
"runtime:node": "node example/node.js"
},
Expand Down Expand Up @@ -144,7 +67,7 @@
"gzip-size": "^7.0.0",
"http": "^0.0.1-security",
"isomorphic-fetch": "^3.0.0",
"itty-router": "^4.0.6",
"itty-router": "^4.0.10",
"jsdom": "^22.1.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default async () => {
],
plugins: [
typescript({ sourceMap: true }),
terser(),
// terser(),
bundleSize(),
copy({
targets: [
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2455,10 +2455,10 @@ istanbul-reports@^3.1.4:
html-escaper "^2.0.0"
istanbul-lib-report "^3.0.0"

itty-router@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/itty-router/-/itty-router-4.0.6.tgz#6481246d6326c5ad188ef4838c26170151058493"
integrity sha512-bzfBY19gJS/GQK7Wvw/Wj03t6KFRo/JOvtzmlNtEv0UJqqWWbBT/0PIf6j9YbpIUwwA3OpeZHjJN05+YWaAVvQ==
itty-router@^4.0.10:
version "4.0.10"
resolved "https://registry.yarnpkg.com/itty-router/-/itty-router-4.0.10.tgz#d2f6bdd74880539975552a0db5c81bfaa3655e2e"
integrity sha512-2B8nfXlHpzRiCEp1uSULRoy1lyzzOmLvLYEcX+Jg2Io9Q7e6F+Lv/qwYv+qzR2z256PmCzaq6yrA+2dnXysy9g==

jackspeak@^2.0.3:
version "2.2.1"
Expand Down

0 comments on commit 59239b4

Please sign in to comment.