Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/feathers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"require": "./cjs/hooks/index.js"
},
"./commons": {
"import": "./lib/commons.js",
"require": "./cjs/commons.js"
"import": "./lib/commons/index.js",
"require": "./cjs/commons/index.js"
},
"./errors": {
"import": "./lib/errors.js",
Expand Down Expand Up @@ -57,7 +57,7 @@
"./lib/hooks/index.d.ts"
],
"commons": [
"./lib/commons.d.ts"
"./lib/commons/index.d.ts"
],
"client": [
"./lib/client/index.d.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/feathers/src/application.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { EventEmitter } from './event-emitter.js'
import { HOOKS, hooks, middleware } from './hooks/index.js'

import { stripSlashes } from './commons.js'
import { stripSlashes } from './commons/index.js'
import { createDebug } from './debug.js'

import version from './version.js'
Expand Down
9 changes: 6 additions & 3 deletions packages/feathers/src/client/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { Params, Id, Query, NullableId } from '../declarations.js'
import { BadRequest, Unavailable, convert, errors } from '../errors.js'
import { _, stripSlashes } from '../commons.js'
import { pick, stripSlashes } from '../commons/index.js'
import { protectedProperties } from '../service.js'

function toError(error: Error & { code: string }, status?: number) {
function toError(
error: Error & { code: string; address?: string; port?: number; config?: unknown },
status?: number
) {
if (error.code === 'ECONNREFUSED') {
return new Unavailable(error.message, _.pick(error, 'address', 'port', 'config'))
return new Unavailable(error.message, pick(error, 'address', 'port', 'config'))
}

return convert(error, status)
Expand Down
226 changes: 0 additions & 226 deletions packages/feathers/src/commons.test.ts

This file was deleted.

106 changes: 0 additions & 106 deletions packages/feathers/src/commons.ts

This file was deleted.

2 changes: 2 additions & 0 deletions packages/feathers/src/commons/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './object.js'
export * from './path.js'
Loading
Loading