@feathersjs/memory 5.0.0-pre.34 → 5.0.0-pre.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/LICENSE +1 -1
  3. package/README.md +41 -36
  4. package/package.json +11 -11
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [5.0.0-pre.36](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.35...v5.0.0-pre.36) (2023-01-29)
7
+
8
+ **Note:** Version bump only for package @feathersjs/memory
9
+
10
+ # [5.0.0-pre.35](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.34...v5.0.0-pre.35) (2023-01-12)
11
+
12
+ ### Features
13
+
14
+ - **generators:** Move core code generators to shared generators package ([#2982](https://github.com/feathersjs/feathers/issues/2982)) ([0328d22](https://github.com/feathersjs/feathers/commit/0328d2292153870bc43958f73d2c6f288a8cec17))
15
+
6
16
  # [5.0.0-pre.34](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.33...v5.0.0-pre.34) (2022-12-14)
7
17
 
8
18
  ### Features
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 Feathers
3
+ Copyright (c) 2023 Feathers Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -10,8 +10,7 @@ A [Feathers](https://feathersjs.com) service adapter for in-memory data storage
10
10
  $ npm install --save @feathersjs/memory
11
11
  ```
12
12
 
13
- > __Important:__ `@feathersjs/memory` implements the [Feathers Common database adapter API](https://docs.feathersjs.com/api/databases/common.html) and [querying syntax](https://docs.feathersjs.com/api/databases/querying.html).
14
-
13
+ > **Important:** `@feathersjs/memory` implements the [Feathers Common database adapter API](https://docs.feathersjs.com/api/databases/common.html) and [querying syntax](https://docs.feathersjs.com/api/databases/querying.html).
15
14
 
16
15
  ## API
17
16
 
@@ -20,22 +19,22 @@ $ npm install --save @feathersjs/memory
20
19
  Returns a new service instance initialized with the given options.
21
20
 
22
21
  ```js
23
- const service = require('@feathersjs/memory');
22
+ const service = require('@feathersjs/memory')
24
23
 
25
- app.use('/messages', service());
26
- app.use('/messages', service({ id, startId, store, events, paginate }));
24
+ app.use('/messages', service())
25
+ app.use('/messages', service({ id, startId, store, events, paginate }))
27
26
  ```
28
27
 
29
- __Options:__
28
+ **Options:**
30
29
 
31
- - `id` (*optional*, default: `'id'`) - The name of the id field property.
32
- - `startId` (*optional*, default: `0`) - An id number to start with that will be incremented for every new record (unless it is already set).
33
- - `store` (*optional*) - An object with id to item assignments to pre-initialize the data store
34
- - `events` (*optional*) - A list of [custom service events](https://docs.feathersjs.com/api/events.html#custom-events) sent by this service
35
- - `paginate` (*optional*) - A [pagination object](https://docs.feathersjs.com/api/databases/common.html#pagination) containing a `default` and `max` page size
36
- - `whitelist` (*DEPRECATED*) - renamed to `allow`
37
- - `allow` (*optional*) - A list of additional query parameters to allow
38
- - `multi` (*optional*) - Allow `create` with arrays and `update` and `remove` with `id` `null` to change multiple items. Can be `true` for all methods or an array of allowed methods (e.g. `[ 'remove', 'create' ]`)
30
+ - `id` (_optional_, default: `'id'`) - The name of the id field property.
31
+ - `startId` (_optional_, default: `0`) - An id number to start with that will be incremented for every new record (unless it is already set).
32
+ - `store` (_optional_) - An object with id to item assignments to pre-initialize the data store
33
+ - `events` (_optional_) - A list of [custom service events](https://docs.feathersjs.com/api/events.html#custom-events) sent by this service
34
+ - `paginate` (_optional_) - A [pagination object](https://docs.feathersjs.com/api/databases/common.html#pagination) containing a `default` and `max` page size
35
+ - `whitelist` (_DEPRECATED_) - renamed to `allow`
36
+ - `allow` (_optional_) - A list of additional query parameters to allow
37
+ - `multi` (_optional_) - Allow `create` with arrays and `update` and `remove` with `id` `null` to change multiple items. Can be `true` for all methods or an array of allowed methods (e.g. `[ 'remove', 'create' ]`)
39
38
 
40
39
  ## Example
41
40
 
@@ -48,50 +47,56 @@ $ npm install @feathersjs/feathers @feathersjs/express @feathersjs/socketio @fea
48
47
  In `app.js`:
49
48
 
50
49
  ```js
51
- const feathers = require('@feathersjs/feathers');
52
- const express = require('@feathersjs/express');
53
- const socketio = require('@feathersjs/socketio');
50
+ const feathers = require('@feathersjs/feathers')
51
+ const express = require('@feathersjs/express')
52
+ const socketio = require('@feathersjs/socketio')
54
53
 
55
- const memory = require('@feathersjs/memory');
54
+ const memory = require('@feathersjs/memory')
56
55
 
57
56
  // Create an Express compatible Feathers application instance.
58
- const app = express(feathers());
57
+ const app = express(feathers())
59
58
  // Turn on JSON parser for REST services
60
- app.use(express.json());
59
+ app.use(express.json())
61
60
  // Turn on URL-encoded parser for REST services
62
- app.use(express.urlencoded({ extended: true }));
61
+ app.use(express.urlencoded({ extended: true }))
63
62
  // Enable REST services
64
- app.configure(express.rest());
63
+ app.configure(express.rest())
65
64
  // Enable REST services
66
- app.configure(socketio());
65
+ app.configure(socketio())
67
66
  // Create an in-memory Feathers service with a default page size of 2 items
68
67
  // and a maximum size of 4
69
- app.use('/messages', memory({
70
- paginate: {
71
- default: 2,
72
- max: 4
73
- }
74
- }));
68
+ app.use(
69
+ '/messages',
70
+ memory({
71
+ paginate: {
72
+ default: 2,
73
+ max: 4
74
+ }
75
+ })
76
+ )
75
77
  // Set up default error handler
76
- app.use(express.errorHandler());
78
+ app.use(express.errorHandler())
77
79
 
78
80
  // Create a dummy Message
79
- app.service('messages').create({
80
- text: 'Message created on server'
81
- }).then(message => console.log('Created message', message));
81
+ app
82
+ .service('messages')
83
+ .create({
84
+ text: 'Message created on server'
85
+ })
86
+ .then((message) => console.log('Created message', message))
82
87
 
83
88
  // Start the server.
84
- const port = 3030;
89
+ const port = 3030
85
90
 
86
91
  app.listen(port, () => {
87
92
  console.log(`Feathers server listening on port ${port}`)
88
- });
93
+ })
89
94
  ```
90
95
 
91
96
  Run the example with `node app` and go to [localhost:3030/messages](http://localhost:3030/messages).
92
97
 
93
98
  ## License
94
99
 
95
- Copyright (c) 2022 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
100
+ Copyright (c) 2023 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
96
101
 
97
102
  Licensed under the [MIT license](LICENSE).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@feathersjs/memory",
3
3
  "description": "An in memory service store",
4
- "version": "5.0.0-pre.34",
4
+ "version": "5.0.0-pre.36",
5
5
  "homepage": "https://github.com/feathersjs/feathers",
6
6
  "main": "lib/",
7
7
  "types": "lib/",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "scripts": {
40
40
  "prepublish": "npm run compile",
41
- "pack": "npm pack --pack-destination ../cli/test/build",
41
+ "pack": "npm pack --pack-destination ../generators/test/build",
42
42
  "compile": "shx rm -rf lib/ && tsc && npm run pack",
43
43
  "test": "mocha --config ../../.mocharc.json --recursive test/**/*.test.ts"
44
44
  },
@@ -49,20 +49,20 @@
49
49
  "lib": "lib"
50
50
  },
51
51
  "dependencies": {
52
- "@feathersjs/adapter-commons": "^5.0.0-pre.34",
53
- "@feathersjs/commons": "^5.0.0-pre.34",
54
- "@feathersjs/errors": "^5.0.0-pre.34",
52
+ "@feathersjs/adapter-commons": "^5.0.0-pre.36",
53
+ "@feathersjs/commons": "^5.0.0-pre.36",
54
+ "@feathersjs/errors": "^5.0.0-pre.36",
55
55
  "sift": "^16.0.1"
56
56
  },
57
57
  "devDependencies": {
58
- "@feathersjs/adapter-tests": "^5.0.0-pre.34",
59
- "@feathersjs/feathers": "^5.0.0-pre.34",
58
+ "@feathersjs/adapter-tests": "^5.0.0-pre.36",
59
+ "@feathersjs/feathers": "^5.0.0-pre.36",
60
60
  "@types/mocha": "^10.0.1",
61
- "@types/node": "^18.11.10",
62
- "mocha": "^10.1.0",
61
+ "@types/node": "^18.11.18",
62
+ "mocha": "^10.2.0",
63
63
  "shx": "^0.3.4",
64
64
  "ts-node": "^10.9.1",
65
- "typescript": "^4.9.3"
65
+ "typescript": "^4.9.4"
66
66
  },
67
- "gitHead": "42cca600d00f0b3b9d89fa79be30fcd46bc50132"
67
+ "gitHead": "9a107b463cc80d7f3c28553c908987e05b0b634a"
68
68
  }