Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Nx monorepo #371

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
2,683 changes: 2,517 additions & 166 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"scripts": {
"nx": "nx",
"commit": "npm run git-cz",
"release": "nx affected:version",
"release:pre": "nx affected:version --releaseAs=prerelease --preid=rc",
"build": " nx run-many --target=build --all",
"test": "nx run-many --target=test --all --parallel",
"test:integration": "nx run-many --target=integration --all",
Expand All @@ -15,6 +17,7 @@
"@commitlint/cli": "^16.1.0",
"@commitlint/config-conventional": "^16.0.0",
"@commitlint/prompt": "^16.1.0",
"@jscutlery/semver": "^2.17.5",
"@nestjs/testing": "^8.2.6",
"@nrwl/cli": "13.4.6",
"@nrwl/eslint-plugin-nx": "13.4.6",
Expand Down Expand Up @@ -44,6 +47,7 @@
"jest": "27.2.3",
"js-yaml": "^4.1.0",
"lint-staged": "^12.2.2",
"ngx-deploy-npm": "^3.0.11",
"prettier": "^2.3.1",
"supertest": "^6.2.2",
"ts-jest": "27.0.5",
Expand Down
13 changes: 13 additions & 0 deletions packages/common/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
"jestConfig": "packages/common/jest.config.js",
"passWithNoTests": true
}
},
"version": {
"executor": "@jscutlery/semver:version",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IamBlueSlime Do you have experience working with these plugin before as part of your day job? Or are these being included based just on the discussion we were having in #143

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I don't have any on these plugins, I just saw your discussion in the issue while doing this PR, so I've added them. But by reading their README's it seemed pretty accurate to our needs here :/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IamBlueSlime Could you potentially give us some pro/cons of using this rather than other available plugins or ways you would achieve this? I haven used this plugin before but I'm kinda curious

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay no worries, I'll want to do some tests to make sure that the release and changelog process is smooth before we merge this in but the plugins definitely look promising

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@underfisk I never used Nx to publish packages, I'm afraid I can't give you any pro/cons about any package concerning publishing :/

"options": {
"commitMessageFormat": "chore(${projectName}): release version ${version}",
"postTargets": ["common:publish"]
}
},
"publish": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
}
},
"tags": []
Expand Down
13 changes: 13 additions & 0 deletions packages/discovery/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
"jestConfig": "packages/discovery/jest.config.js",
"passWithNoTests": true
}
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"commitMessageFormat": "chore(${projectName}): release version ${version}",
"postTargets": ["discovery:publish"]
}
},
"publish": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
}
},
"tags": []
Expand Down
13 changes: 13 additions & 0 deletions packages/graphql-request/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
"jestConfig": "packages/graphql-request/jest.config.js",
"passWithNoTests": true
}
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"commitMessageFormat": "chore(${projectName}): release version ${version}",
"postTargets": ["graphql-request:publish"]
}
},
"publish": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
}
},
"tags": []
Expand Down
13 changes: 13 additions & 0 deletions packages/hasura/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
"jestConfig": "packages/hasura/jest.config.js",
"passWithNoTests": true
}
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"commitMessageFormat": "chore(${projectName}): release version ${version}",
"postTargets": ["hasura:publish"]
}
},
"publish": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
}
},
"tags": []
Expand Down
13 changes: 13 additions & 0 deletions packages/modules/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
"jestConfig": "packages/modules/jest.config.js",
"passWithNoTests": true
}
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"commitMessageFormat": "chore(${projectName}): release version ${version}",
"postTargets": ["modules:publish"]
}
},
"publish": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
}
},
"tags": []
Expand Down
13 changes: 13 additions & 0 deletions packages/rabbitmq/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
"jestConfig": "packages/rabbitmq/jest.config.js",
"passWithNoTests": true
}
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"commitMessageFormat": "chore(${projectName}): release version ${version}",
"postTargets": ["rabbitmq:publish"]
}
},
"publish": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
}
},
"tags": []
Expand Down
19 changes: 7 additions & 12 deletions packages/rabbitmq/src/lib/amqp/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,12 @@ export class AmqpConnection {
first()
);

await this.publish(
requestOptions.exchange,
requestOptions.routingKey,
payload,
{
replyTo: DIRECT_REPLY_QUEUE,
correlationId,
headers: requestOptions.headers,
expiration: requestOptions.expiration,
}
);
this.publish(requestOptions.exchange, requestOptions.routingKey, payload, {
underfisk marked this conversation as resolved.
Show resolved Hide resolved
replyTo: DIRECT_REPLY_QUEUE,
correlationId,
headers: requestOptions.headers,
expiration: requestOptions.expiration,
});

const timeout$ = interval(timeout).pipe(
first(),
Expand Down Expand Up @@ -391,7 +386,7 @@ export class AmqpConnection {

const { replyTo, correlationId, expiration, headers } = msg.properties;
if (replyTo) {
await this.publish('', replyTo, response, {
this.publish('', replyTo, response, {
correlationId,
expiration,
headers,
Expand Down
13 changes: 13 additions & 0 deletions packages/stripe/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
"jestConfig": "packages/stripe/jest.config.js",
"passWithNoTests": true
}
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"commitMessageFormat": "chore(${projectName}): release version ${version}",
"postTargets": ["stripe:publish"]
}
},
"publish": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
}
},
"tags": []
Expand Down
13 changes: 13 additions & 0 deletions packages/testing/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
"jestConfig": "packages/testing/jest.config.js",
"passWithNoTests": true
}
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"commitMessageFormat": "chore(${projectName}): release version ${version}",
"postTargets": ["testing:publish"]
}
},
"publish": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
}
},
"tags": []
Expand Down
13 changes: 13 additions & 0 deletions packages/webhooks/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@
"jestConfig": "packages/webhooks/jest.config.js",
"passWithNoTests": true
}
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {
"commitMessageFormat": "chore(${projectName}): release version ${version}",
"postTargets": ["webhooks:publish"]
}
},
"publish": {
"executor": "ngx-deploy-npm:deploy",
"options": {
"access": "public"
}
}
},
"tags": []
Expand Down