Skip to content

Commit

Permalink
Merge branch 'feathersjs:dove' into client/underscored-methods
Browse files Browse the repository at this point in the history
  • Loading branch information
DaddyWarbucks authored Jul 19, 2023
2 parents c34bc7e + 414336a commit ccc9370
Show file tree
Hide file tree
Showing 102 changed files with 19,916 additions and 32,441 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [14.x, 18.x]
node-version: [16.x, 20.x]

services:
postgres:
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,50 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [5.0.8](https://github.com/feathersjs/feathers/compare/v5.0.7...v5.0.8) (2023-07-19)


### Bug Fixes

* add missing word ([#3237](https://github.com/feathersjs/feathers/issues/3237)) ([9a32184](https://github.com/feathersjs/feathers/commit/9a321848767e31176660d6937f8fa6d83ba215bd))
* **transport-commons:** Handle invalid service paths on socket lookups ([#3241](https://github.com/feathersjs/feathers/issues/3241)) ([c397ab3](https://github.com/feathersjs/feathers/commit/c397ab3a0cd184044ae4f73540549b30a396821c))





## [5.0.7](https://github.com/feathersjs/feathers/compare/v5.0.6...v5.0.7) (2023-07-14)


### Bug Fixes

* **core:** Ensure .service does not access Object properties ([#3235](https://github.com/feathersjs/feathers/issues/3235)) ([c0b670a](https://github.com/feathersjs/feathers/commit/c0b670ac4c7bf145e36b59ea89d1387b5514c237))
* **generators:** Fix channel/service configuration order for Koa based apps ([580344e](https://github.com/feathersjs/feathers/commit/580344e96fe8a2f17fd53476af5a0c7ddefac0b6))
* **koa:** Ensure .teardown works without a server ([#3234](https://github.com/feathersjs/feathers/issues/3234)) ([818572d](https://github.com/feathersjs/feathers/commit/818572df98456bc3e1a300e879329aa8f849be64))





## [5.0.6](https://github.com/feathersjs/feathers/compare/v5.0.5...v5.0.6) (2023-06-15)

### Bug Fixes

- **authentication-client:** Do not trigger storage methods if storage not defined ([#3210](https://github.com/feathersjs/feathers/issues/3210)) ([261acbc](https://github.com/feathersjs/feathers/commit/261acbcde387db731e434cb106a27b49dcb64a9a))
- **authentication-client:** removeAccessToken throws error if storage not defined ([#3195](https://github.com/feathersjs/feathers/issues/3195)) ([b8e2769](https://github.com/feathersjs/feathers/commit/b8e27698f7958a91fe9a4ee64ec5591d23194c44))
- **authentication-local:** Local Auth - Nested username & Password fields ([#3091](https://github.com/feathersjs/feathers/issues/3091)) ([d135526](https://github.com/feathersjs/feathers/commit/d135526da18ecf2dc620b82820e1d09d8af5c0b5))
- **authentication-oauth:** Update OAuth redirect to handle user requested redirect paths ([#3186](https://github.com/feathersjs/feathers/issues/3186)) ([3742028](https://github.com/feathersjs/feathers/commit/37420283c17bb8129c6ffdde841ce2034109cc6b))
- **authentication:** Export JwtVerifyOptions ([#3214](https://github.com/feathersjs/feathers/issues/3214)) ([d59896e](https://github.com/feathersjs/feathers/commit/d59896eb0229f1490c712f19cf84eb2bcf123698))

## [5.0.5](https://github.com/feathersjs/feathers/compare/v5.0.4...v5.0.5) (2023-04-28)

### Bug Fixes

- **generators:** Add sourceMap to tsconfig.json template ([#3166](https://github.com/feathersjs/feathers/issues/3166)) ([3049b7a](https://github.com/feathersjs/feathers/commit/3049b7a425d01cdd3058442c7183307a06cfc87a))
- **mongodb:** Speed up multi create ([#3171](https://github.com/feathersjs/feathers/issues/3171)) ([e34f728](https://github.com/feathersjs/feathers/commit/e34f728139a1008503aa440f1b7cf6395719417b))
- **schema:** Exclude [email protected] ([#3180](https://github.com/feathersjs/feathers/issues/3180)) ([aee8531](https://github.com/feathersjs/feathers/commit/aee8531b5f0578f11e43b19a469b96e6f4b170ce))
- **typebox:** Revert to TypeBox 0.25 ([#3183](https://github.com/feathersjs/feathers/issues/3183)) ([cacedf5](https://github.com/feathersjs/feathers/commit/cacedf59e3d2df836777f0cd06ab1b2484ed87c5))

## [5.0.4](https://github.com/feathersjs/feathers/compare/v5.0.3...v5.0.4) (2023-04-12)

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions docs/api/authentication/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export const authentication = (app: Application) => {

Options are set in the [authentication configuration](./service.md#configuration) under the strategy name. Available options are:

- `usernameField`: Name of the username field (e.g. `'email'`)
- `passwordField`: Name of the password field (e.g. `'password'`)
- `usernameField`: Name of the username field (e.g. `'email'`), may be a nested property (e.g. `'auth.email'`)
- `passwordField`: Name of the password field (e.g. `'password'`), may be a nested property (e.g. `'auth.password'`)
- `hashSize` (default: `10`): The BCrypt salt length
- `errorMessage` (default: `'Invalid login'`): The error message to return on errors
- `entityUsernameField` (default: `usernameField`): Name of the username field on the entity if authentication request data and entity field names are different
Expand Down
2 changes: 1 addition & 1 deletion docs/api/authentication/strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ An authentication strategy is any object or class that implements at least an [a
- [LocalStrategy](./local.md) in `@feathersjs/authentication-local`
- [OAuthStrategy](./oauth.md) in `@feathersjs/authentication-oauth`

More details on how to customize existing strategies can be found in their API documentation. This section describes the common methods for all authentication strategies and how a custom authentication strategy can implemented.
More details on how to customize existing strategies can be found in their API documentation. This section describes the common methods for all authentication strategies and how a custom authentication strategy can be implemented.

## setName(name)

Expand Down
2 changes: 1 addition & 1 deletion docs/api/client/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The following chapter describes the use of
npm install @feathersjs/rest-client --save
```

`@feathersjs/rest-client` allows to connect to a service exposed through a REST HTTP transport (e.g. with [Koa](../koa.md#rest) or [Express](../express.md#rest)) using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), [Superagent](http://visionmedia.github.io/superagent/) or [Axios](https://github.com/mzabriskie/axios).
`@feathersjs/rest-client` allows to connect to a service exposed through a REST HTTP transport (e.g. with [Koa](../koa.md#rest) or [Express](../express.md#rest)) using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), [Superagent](https://github.com/ladjs/superagent) or [Axios](https://github.com/mzabriskie/axios).

<BlockQuote type="info">

Expand Down
2 changes: 1 addition & 1 deletion docs/api/client/socketio.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ outline: deep
</Badges>

```
npm install @feathersjs/socketio-client --save
npm install @feathersjs/socketio-client socket.io-client --save
```

The `@feathersjs/socketio-client` module allows to connect to services exposed through the [Socket.io transport](../socketio.md) via a Socket.io socket. We recommend using Feathers and the `@feathersjs/socketio-client` module on the client if possible since it can also handle reconnection and reauthentication. If however, you want to use a direct Socket.io connection without using Feathers on the client, see the [Direct connection](#direct-connection) section.
Expand Down
4 changes: 2 additions & 2 deletions docs/api/schema/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ export const userSchema = {
$id: 'UserResult',
type: 'object',
additionalProperties: false,
required: [...userSchema.required, 'id'],
required: [...userDataSchema.required, 'id'],
properties: {
...userSchema.properties,
...userDataSchema.properties,
id: { type: 'number' }
}
} as const
Expand Down
49 changes: 39 additions & 10 deletions docs/api/schema/typebox.md
Original file line number Diff line number Diff line change
Expand Up @@ -1004,16 +1004,6 @@ const T = {
}
```

<BlockQuote type="warning" label="note">

TypeBox 0.26.0 introduced a breaking change in `Type.Intersect`. `@feathersjs/typebox` maintains the original behaviour which is now available in TypeBox as `Type.Composite`. It you want to use the new `Type.Intersect` use

```ts
import { Intersect } from '@feathersjs/typebox'
```

</BlockQuote>

##### Never

Creates a type that will never validate if the attribute is present. This is useful if you are allowing [additionalProperties](#additionalproperties) but need to prevent using specific keys.
Expand Down Expand Up @@ -1670,6 +1660,45 @@ const T = {
}
```


#### Symbol

Verifies that the value is of type `Symbol`. Requires [Extended Ajv Configuration](#extended-configuration).

```js
const T = Type.Symbol()
```

```js
type T = symbol
```

```js
const T = {
type: 'null',
typeOf: 'Symbol'
}
```

#### BigInt

Verifies that the value is of type `BigInt`. Requires [Extended Ajv Configuration](#extended-configuration).

```js
const T = Type.BigInt()
```

```js
type T = bigint
```

```js
const T = {
type: 'null',
typeOf: 'BigInt'
}
```

#### Void

Verifies that the value is `null`. Requires [Extended Ajv Configuration](#extended-configuration).
Expand Down
5 changes: 5 additions & 0 deletions docs/cookbook/general/scaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@ const app = feathers()
})
));
```
## Multiple instances
When running multiple instances of your Feathers application (e.g. on several Heroku Dynos), service events (created, updated, patched, removed and any custom defined events) do not get propagated to other instances for such cases you may want to use: https://github.com/feathersjs-ecosystem/feathers-sync

Which will use a messaging mechanism to propagate all events to all application instances like redis or RabbitMQ

2 changes: 1 addition & 1 deletion docs/guides/cli/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ outline: deep

# Client

A generated application can used as an npm module that provides a [Feathers client](../../api/client.md). It gives you a fully typed client that can be installed in any TypeScript (e.g. React, VueJS, React Native etc.) application.
A generated application can be used as an npm module that provides a [Feathers client](../../api/client.md). It gives you a fully typed client that can be installed in any TypeScript (e.g. React, VueJS, React Native etc.) application.

## Local installation

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/cli/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ app.service(messagePath).hooks({

Note that you can add hooks to a specific method as documented in the [hook registration API](../../api/hooks.md#registering-hooks). For example, to use the [profiling hook](./hook.md#profiling-example) only for `find` and `get` the registration can be updated like this:

```ts{8-9}
```ts{12-13}
import { profiler } from '../../hooks/profiler'
// ...
Expand Down
48 changes: 41 additions & 7 deletions docs/guides/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ The new [schemas and resolvers](../api/schema/index.md) cover most use cases pre

## TypeScript

<LanguageBlock global-id="js">

You have selected JavaScript as the language which does not have type information.

</LanguageBlock>

<LanguageBlock global-id="ts">

The new version comes with major improvements in TypeScript support from improved service typings, fully typed hook context and typed configuration. You can see the changes necessary in the Feathers chat [here](https://github.com/feathersjs/feathers-chat-ts/compare/dove-pre).

### Application and hook context
Expand All @@ -53,6 +61,8 @@ Now `import { HookContext } from './declarations'` can be used as the context in
### Service types
Service types now only need the actual service class type and should no longer include the `& ServiceAddons<any>`. E.g. for the messages service like this:
```ts
Expand Down Expand Up @@ -94,6 +104,8 @@ declare module '@feathersjs/feathers/lib/declarations' {
}
```

</LanguageBlock>

## Deprecations and breaking changes

### Express middleware order
Expand All @@ -104,20 +116,42 @@ The Express `rest` adapter now needs to be configured in the correct order, usua

The import of `feathers` has changed from

```js
```ts
const feathers = require('@feathersjs/feathers')

import feathers from '@feathersjs/feathers'
```

To

```js
```ts
const { feathers } = require('@feathersjs/feathers')

import { feathers } from '@feathersjs/feathers'
```

The Express exports for TypeScript have changed from

```ts
import express from '@feathersjs/express'

app.use(express.json())
app.use(express.urlencoded())
app.use(express.notFound())
app.use(express.errorHandler())
```

To

```ts
import express, { json, urlencoded, notFound, errorHandler } from '@feathersjs/express'

app.use(json())
app.use(urlencoded())
app.use(notFound())
app.use(errorHandler())
```

### Custom Filters & Operators

<BlockQuote type="warning" label="pending">
Expand Down Expand Up @@ -228,17 +262,17 @@ The automatic environment variable substitution in `@feathersjs/configuration` w

The `debug` module has been removed as a direct dependency. This reduces the the client bundle size and allows to support other platforms (like Deno). The original `debug` functionality can now be initialized as follows:

```js
const feathers = require('@feathersjs/feathers')
const debug = require('debug')
```ts
import { feathers } from '@feathersjs/feathers'
import debug from 'debug'

feathers.setDebug(debug)
```

It is also possible to set a custom logger like this:

```js
const feathers = require('@feathersjs/feathers')
```ts
import { feathers } from '@feathersjs/feathers'

const customDebug =
(name) =>
Expand Down
Loading

0 comments on commit ccc9370

Please sign in to comment.