Skip to content

Commit

Permalink
refactor: merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Moreau committed Jan 24, 2025
2 parents 585f533 + 2843dce commit ea54eb5
Show file tree
Hide file tree
Showing 20 changed files with 135 additions and 20 deletions.
11 changes: 11 additions & 0 deletions packages/_example/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## example [1.13.3](https://github.com/ForestAdmin/agent-nodejs/compare/example@1.13.2...example@1.13.3) (2025-01-24)





### Dependencies

* **@forestadmin/agent:** upgraded to 1.58.2
* **@forestadmin/datasource-dummy:** upgraded to 1.1.48

## example [1.13.2](https://github.com/ForestAdmin/agent-nodejs/compare/example@1.13.1...example@1.13.2) (2025-01-23)


Expand Down
6 changes: 3 additions & 3 deletions packages/_example/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "example",
"version": "1.13.2",
"version": "1.13.3",
"license": "GPL-V3",
"private": true,
"dependencies": {
"@faker-js/faker": "^7.6.0",
"@forestadmin/agent": "1.58.1",
"@forestadmin/datasource-dummy": "1.1.47",
"@forestadmin/agent": "1.58.2",
"@forestadmin/datasource-dummy": "1.1.48",
"@forestadmin/datasource-mongo": "1.4.1",
"@forestadmin/datasource-mongoose": "1.9.0",
"@forestadmin/datasource-sequelize": "1.11.5",
Expand Down
15 changes: 15 additions & 0 deletions packages/agent/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## @forestadmin/agent [1.58.2](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/agent@1.58.1...@forestadmin/agent@1.58.2) (2025-01-24)


### Bug Fixes

* do not override view default sorting ordrer ([#1245](https://github.com/ForestAdmin/agent-nodejs/issues/1245)) ([8e27769](https://github.com/ForestAdmin/agent-nodejs/commit/8e2776925b6999c967c050c23cc7d63d76c87228))





### Dependencies

* **@forestadmin/datasource-customizer:** upgraded to 1.61.1

## @forestadmin/agent [1.58.1](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/agent@1.58.0...@forestadmin/agent@1.58.1) (2025-01-23)


Expand Down
4 changes: 2 additions & 2 deletions packages/agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@forestadmin/agent",
"version": "1.58.1",
"version": "1.58.2",
"main": "dist/index.js",
"license": "GPL-3.0",
"publishConfig": {
Expand All @@ -14,7 +14,7 @@
"dependencies": {
"@fast-csv/format": "^4.3.5",
"@fastify/express": "^1.1.0",
"@forestadmin/datasource-customizer": "1.61.0",
"@forestadmin/datasource-customizer": "1.61.1",
"@forestadmin/datasource-toolkit": "1.47.0",
"@forestadmin/forestadmin-client": "1.36.4",
"@koa/cors": "^5.0.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/datasource-customizer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## @forestadmin/datasource-customizer [1.61.1](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-customizer@1.61.0...@forestadmin/datasource-customizer@1.61.1) (2025-01-24)


### Bug Fixes

* **lazy join:** do not remove foreignkey when they are asking ([#1246](https://github.com/ForestAdmin/agent-nodejs/issues/1246)) ([621b243](https://github.com/ForestAdmin/agent-nodejs/commit/621b2434900f565e37fbd982dae6e82664797c37))

# @forestadmin/datasource-customizer [1.61.0](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-customizer@1.60.0...@forestadmin/datasource-customizer@1.61.0) (2025-01-23)


Expand Down
2 changes: 1 addition & 1 deletion packages/datasource-customizer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@forestadmin/datasource-customizer",
"version": "1.61.0",
"version": "1.61.1",
"main": "dist/index.js",
"license": "GPL-3.0",
"publishConfig": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class LazyJoinDecorator extends CollectionDecorator {
record[relationName] = { [foreignKeyTarget]: record[foreignKey] };
}

delete record[foreignKey];
if (!projection.includes(foreignKey)) delete record[foreignKey];
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ describe('LazyJoinDecorator', () => {
id: factories.columnSchema.uuidPrimaryKey().build(),
description: factories.columnSchema.build(),
amountInEur: factories.columnSchema.build(),
card_id: factories.columnSchema.uuidPrimaryKey().build(),
card: factories.manyToOneSchema.build({
foreignCollection: 'cards',
foreignKey: 'card_id',
}),
user_id: factories.columnSchema.uuidPrimaryKey().build(),
user: factories.manyToOneSchema.build({
foreignCollection: 'users',
foreignKey: 'user_id',
Expand Down Expand Up @@ -207,6 +209,25 @@ describe('LazyJoinDecorator', () => {
expect(spy).toHaveBeenCalledWith(caller, filter, new Projection('id', 'card_id'));
expect(records).toStrictEqual([{ id: 1 }]);
});

describe('when projection ask for foreign key and relation', () => {
test('it should not remove the key from the record', async () => {
const spy = jest.spyOn(transactions, 'list');
spy.mockResolvedValue([{ id: 1, card_id: 2 }]);

const caller = factories.caller.build();
const filter = factories.filter.build();

const records = await decoratedTransactions.list(
caller,
filter,
new Projection('id', 'card:id', 'card_id'),
);

expect(spy).toHaveBeenCalledWith(caller, filter, new Projection('id', 'card_id'));
expect(records).toStrictEqual([{ id: 1, card: { id: 2 }, card_id: 2 }]);
});
});
});

describe('aggregate', () => {
Expand Down
10 changes: 10 additions & 0 deletions packages/datasource-dummy/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## @forestadmin/datasource-dummy [1.1.48](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-dummy@1.1.47...@forestadmin/datasource-dummy@1.1.48) (2025-01-24)





### Dependencies

* **@forestadmin/datasource-customizer:** upgraded to 1.61.1

## @forestadmin/datasource-dummy [1.1.47](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-dummy@1.1.46...@forestadmin/datasource-dummy@1.1.47) (2025-01-23)


Expand Down
4 changes: 2 additions & 2 deletions packages/datasource-dummy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@forestadmin/datasource-dummy",
"version": "1.1.47",
"version": "1.1.48",
"main": "dist/index.js",
"license": "GPL-3.0",
"publishConfig": {
Expand All @@ -12,7 +12,7 @@
"directory": "packages/datasource-dummy"
},
"dependencies": {
"@forestadmin/datasource-customizer": "1.61.0",
"@forestadmin/datasource-customizer": "1.61.1",
"@forestadmin/datasource-toolkit": "1.47.0"
},
"files": [
Expand Down
10 changes: 10 additions & 0 deletions packages/datasource-replica/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## @forestadmin/datasource-replica [1.5.13](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-replica@1.5.12...@forestadmin/datasource-replica@1.5.13) (2025-01-24)





### Dependencies

* **@forestadmin/datasource-customizer:** upgraded to 1.61.1

## @forestadmin/datasource-replica [1.5.12](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-replica@1.5.11...@forestadmin/datasource-replica@1.5.12) (2025-01-23)


Expand Down
4 changes: 2 additions & 2 deletions packages/datasource-replica/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@forestadmin/datasource-replica",
"version": "1.5.12",
"version": "1.5.13",
"main": "dist/index.js",
"license": "GPL-3.0",
"publishConfig": {
Expand All @@ -23,7 +23,7 @@
"test": "jest"
},
"dependencies": {
"@forestadmin/datasource-customizer": "1.61.0",
"@forestadmin/datasource-customizer": "1.61.1",
"@forestadmin/datasource-sequelize": "1.11.5",
"@forestadmin/datasource-sql": "1.16.5",
"@forestadmin/datasource-toolkit": "1.47.0",
Expand Down
11 changes: 11 additions & 0 deletions packages/forest-cloud/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## @forestadmin/forest-cloud [1.12.21](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/forest-cloud@1.12.20...@forestadmin/forest-cloud@1.12.21) (2025-01-24)





### Dependencies

* **@forestadmin/agent:** upgraded to 1.58.2
* **@forestadmin/datasource-customizer:** upgraded to 1.61.1

## @forestadmin/forest-cloud [1.12.20](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/forest-cloud@1.12.19...@forestadmin/forest-cloud@1.12.20) (2025-01-23)


Expand Down
6 changes: 3 additions & 3 deletions packages/forest-cloud/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@forestadmin/forest-cloud",
"version": "1.12.20",
"version": "1.12.21",
"description": "Utility to bootstrap and publish forest admin cloud projects customization",
"dependencies": {
"@forestadmin/agent": "1.58.1",
"@forestadmin/datasource-customizer": "1.61.0",
"@forestadmin/agent": "1.58.2",
"@forestadmin/datasource-customizer": "1.61.1",
"@forestadmin/datasource-mongo": "1.4.1",
"@forestadmin/datasource-mongoose": "1.9.0",
"@forestadmin/datasource-sequelize": "1.11.5",
Expand Down
10 changes: 10 additions & 0 deletions packages/plugin-aws-s3/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## @forestadmin/plugin-aws-s3 [1.4.16](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/plugin-aws-s3@1.4.15...@forestadmin/plugin-aws-s3@1.4.16) (2025-01-24)





### Dependencies

* **@forestadmin/datasource-customizer:** upgraded to 1.61.1

## @forestadmin/plugin-aws-s3 [1.4.15](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/plugin-aws-s3@1.4.14...@forestadmin/plugin-aws-s3@1.4.15) (2025-01-23)


Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-aws-s3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@forestadmin/plugin-aws-s3",
"version": "1.4.15",
"version": "1.4.16",
"main": "dist/index.js",
"license": "GPL-3.0",
"publishConfig": {
Expand All @@ -17,7 +17,7 @@
"@forestadmin/datasource-toolkit": "1.47.0"
},
"devDependencies": {
"@forestadmin/datasource-customizer": "1.61.0",
"@forestadmin/datasource-customizer": "1.61.1",
"@forestadmin/datasource-toolkit": "1.47.0"
},
"files": [
Expand Down
10 changes: 10 additions & 0 deletions packages/plugin-export-advanced/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## @forestadmin/plugin-export-advanced [1.1.22](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/plugin-export-advanced@1.1.21...@forestadmin/plugin-export-advanced@1.1.22) (2025-01-24)





### Dependencies

* **@forestadmin/datasource-customizer:** upgraded to 1.61.1

## @forestadmin/plugin-export-advanced [1.1.21](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/plugin-export-advanced@1.1.20...@forestadmin/plugin-export-advanced@1.1.21) (2025-01-23)


Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-export-advanced/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@forestadmin/plugin-export-advanced",
"version": "1.1.21",
"version": "1.1.22",
"main": "dist/index.js",
"license": "GPL-3.0",
"publishConfig": {
Expand All @@ -15,7 +15,7 @@
"excel4node": "^1.8.0"
},
"devDependencies": {
"@forestadmin/datasource-customizer": "1.61.0",
"@forestadmin/datasource-customizer": "1.61.1",
"@forestadmin/datasource-toolkit": "1.47.0"
},
"files": [
Expand Down
10 changes: 10 additions & 0 deletions packages/plugin-flattener/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## @forestadmin/plugin-flattener [1.4.6](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/plugin-flattener@1.4.5...@forestadmin/plugin-flattener@1.4.6) (2025-01-24)





### Dependencies

* **@forestadmin/datasource-customizer:** upgraded to 1.61.1

## @forestadmin/plugin-flattener [1.4.5](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/plugin-flattener@1.4.4...@forestadmin/plugin-flattener@1.4.5) (2025-01-23)


Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-flattener/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@forestadmin/plugin-flattener",
"version": "1.4.5",
"version": "1.4.6",
"description": "A plugin that allows to flatten columns and relations in Forest Admin",
"main": "dist/index.js",
"license": "GPL-3.0",
Expand All @@ -24,7 +24,7 @@
"test": "jest"
},
"devDependencies": {
"@forestadmin/datasource-customizer": "1.61.0",
"@forestadmin/datasource-customizer": "1.61.1",
"@types/object-hash": "^3.0.2"
},
"dependencies": {
Expand Down

0 comments on commit ea54eb5

Please sign in to comment.