Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@feathersjs/adapter-tests

Package Overview
Dependencies
Maintainers
3
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feathersjs/adapter-tests - npm Package Compare versions

Comparing version 5.0.0-pre.35 to 5.0.0-pre.36

10

CHANGELOG.md

@@ -6,2 +6,12 @@ # Change Log

# [5.0.0-pre.36](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.35...v5.0.0-pre.36) (2023-01-29)
### Bug Fixes
- **databases:** Improve documentation for adapters and allow dynamic Knex adapter options ([#3019](https://github.com/feathersjs/feathers/issues/3019)) ([66c4b5e](https://github.com/feathersjs/feathers/commit/66c4b5e72000dd03acb57fca1cad4737c85c9c9e))
### Features
- **database:** Add and to the query syntax ([#3021](https://github.com/feathersjs/feathers/issues/3021)) ([00cb0d9](https://github.com/feathersjs/feathers/commit/00cb0d9c302ae951ae007d3d6ceba33e254edd9c))
# [5.0.0-pre.35](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.34...v5.0.0-pre.35) (2023-01-12)

@@ -8,0 +18,0 @@

4

lib/declarations.d.ts

@@ -7,3 +7,3 @@ export type AdapterTest = (name: AdapterTestName, runner: any) => void;

export type AdapterBasicTestName = '.id' | '.options' | '.events' | '._get' | '._find' | '._create' | '._update' | '._patch' | '._remove' | '.$get' | '.$find' | '.$create' | '.$update' | '.$patch' | '.$remove';
export type AdapterMethodsTestName = '.get' | '.get + $select' | '.get + id + query' | '.get + NotFound' | '.get + id + query id' | '.find' | '.remove' | '.remove + $select' | '.remove + id + query' | '.remove + multi' | '.remove + multi no pagination' | '.remove + id + query id' | '.update' | '.update + $select' | '.update + id + query' | '.update + NotFound' | '.update + query + NotFound' | '.update + id + query id' | '.patch' | '.patch + $select' | '.patch + id + query' | '.patch multiple' | '.patch multiple no pagination' | '.patch multi query same' | '.patch multi query changed' | '.patch + NotFound' | '.patch + query + NotFound' | '.patch + id + query id' | '.create' | '.create + $select' | '.create multi' | 'internal .find' | 'internal .get' | 'internal .create' | 'internal .update' | 'internal .patch' | 'internal .remove';
export type AdapterSyntaxTestName = '.find + equal' | '.find + equal multiple' | '.find + $sort' | '.find + $sort + string' | '.find + $limit' | '.find + $limit 0' | '.find + $skip' | '.find + $select' | '.find + $or' | '.find + $in' | '.find + $nin' | '.find + $lt' | '.find + $lte' | '.find + $gt' | '.find + $gte' | '.find + $ne' | '.find + $gt + $lt + $sort' | '.find + $or nested + $sort' | 'params.adapter + paginate' | 'params.adapter + multi' | '.find + paginate' | '.find + paginate + query' | '.find + paginate + $limit + $skip' | '.find + paginate + $limit 0' | '.find + paginate + params';
export type AdapterMethodsTestName = '.get' | '.get + $select' | '.get + id + query' | '.get + NotFound' | '.get + id + query id' | '.find' | '.remove' | '.remove + $select' | '.remove + id + query' | '.remove + multi' | '.remove + multi no pagination' | '.remove + id + query id' | '.update' | '.update + $select' | '.update + id + query' | '.update + NotFound' | '.update + query + NotFound' | '.update + id + query id' | '.patch' | '.patch + $select' | '.patch + id + query' | '.patch multiple' | '.patch multiple no pagination' | '.patch multi query same' | '.patch multi query changed' | '.patch + NotFound' | '.patch + query + NotFound' | '.patch + id + query id' | '.create' | '.create + $select' | '.create multi' | '.create ignores query' | 'internal .find' | 'internal .get' | 'internal .create' | 'internal .update' | 'internal .patch' | 'internal .remove';
export type AdapterSyntaxTestName = '.find + equal' | '.find + equal multiple' | '.find + $sort' | '.find + $sort + string' | '.find + $limit' | '.find + $limit 0' | '.find + $skip' | '.find + $select' | '.find + $or' | '.find + $in' | '.find + $nin' | '.find + $lt' | '.find + $lte' | '.find + $gt' | '.find + $gte' | '.find + $ne' | '.find + $gt + $lt + $sort' | '.find + $or nested + $sort' | '.find + $and' | '.find + $and + $or' | 'params.adapter + paginate' | 'params.adapter + multi' | '.find + paginate' | '.find + paginate + query' | '.find + paginate + $limit + $skip' | '.find + paginate + $limit 0' | '.find + paginate + params';

@@ -476,2 +476,15 @@ "use strict";

});
test('.create ignores query', async () => {
const originalData = {
name: 'Billy',
age: 42
};
const data = await service.create(originalData, {
query: {
name: 'Dave'
}
});
assert_1.default.strictEqual(data.name, 'Billy', 'data.name matches');
await service.remove(data[idProp]);
});
test('.create + $select', async () => {

@@ -478,0 +491,0 @@ const originalData = {

@@ -237,2 +237,24 @@ "use strict";

});
test('.find + $and', async () => {
const params = {
query: {
$and: [{ age: 19 }],
$sort: { name: 1 }
}
};
const data = await service.find(params);
assert_1.default.strictEqual(data.length, 1);
assert_1.default.strictEqual(data[0].name, 'Alice');
});
test('.find + $and + $or', async () => {
const params = {
query: {
$and: [{ $or: [{ name: 'Alice' }] }],
$sort: { name: 1 }
}
};
const data = await service.find(params);
assert_1.default.strictEqual(data.length, 1);
assert_1.default.strictEqual(data[0].name, 'Alice');
});
describe('params.adapter', () => {

@@ -239,0 +261,0 @@ test('params.adapter + paginate', async () => {

{
"name": "@feathersjs/adapter-tests",
"version": "5.0.0-pre.35",
"version": "5.0.0-pre.36",
"description": "Feathers shared database adapter test suite",

@@ -60,3 +60,3 @@ "homepage": "https://feathersjs.com",

},
"gitHead": "c641598d9a4de3ceda10f56cf2af288a4236b15e"
"gitHead": "9a107b463cc80d7f3c28553c908987e05b0b634a"
}

@@ -19,4 +19,4 @@ # Feathers Adapter Tests

Copyright (c) 2022 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
Copyright (c) 2023 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
Licensed under the [MIT license](LICENSE).

@@ -58,2 +58,3 @@ export type AdapterTest = (name: AdapterTestName, runner: any) => void

| '.create multi'
| '.create ignores query'
| 'internal .find'

@@ -85,2 +86,4 @@ | 'internal .get'

| '.find + $or nested + $sort'
| '.find + $and'
| '.find + $and + $or'
| 'params.adapter + paginate'

@@ -87,0 +90,0 @@ | 'params.adapter + multi'

@@ -594,2 +594,18 @@ import assert from 'assert'

test('.create ignores query', async () => {
const originalData = {
name: 'Billy',
age: 42
}
const data = await service.create(originalData, {
query: {
name: 'Dave'
}
})
assert.strictEqual(data.name, 'Billy', 'data.name matches')
await service.remove(data[idProp])
})
test('.create + $select', async () => {

@@ -596,0 +612,0 @@ const originalData = {

@@ -277,2 +277,30 @@ import assert from 'assert'

test('.find + $and', async () => {
const params = {
query: {
$and: [{ age: 19 }],
$sort: { name: 1 }
}
}
const data = await service.find(params)
assert.strictEqual(data.length, 1)
assert.strictEqual(data[0].name, 'Alice')
})
test('.find + $and + $or', async () => {
const params = {
query: {
$and: [{ $or: [{ name: 'Alice' }] }],
$sort: { name: 1 }
}
}
const data = await service.find(params)
assert.strictEqual(data.length, 1)
assert.strictEqual(data[0].name, 'Alice')
})
describe('params.adapter', () => {

@@ -279,0 +307,0 @@ test('params.adapter + paginate', async () => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc