Skip to content

Commit

Permalink
fix: deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ruscon committed Sep 2, 2023
1 parent 847c82f commit 0b90d16
Show file tree
Hide file tree
Showing 27 changed files with 1,225 additions and 1,441 deletions.
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
pnpm-lock.yaml
dist/
coverage/
tmp/
git-server/
16 changes: 16 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"parserOptions": {
"project": ["tsconfig.eslint.json", "packages/*/tsconfig.json"]
},
"settings": {
"import/parsers": {
"@typescript-eslint/parser": ["*.ts", "*.mts", "*.сts", "*.tsx"]
}
},
"overrides": [
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {
// https://nx.dev/packages/eslint-plugin/documents/dependency-checks#overriding-defaults
"@nx/dependency-checks": "error"
}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
echo "Node.js version: $(node -v)"
echo "NPM version: $(npm -v)"
echo "NX version: $(npx nx --version)"
echo "NX version: $(pnpm nx --version)"
- name: Release
run: pnpm run release
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
always-auth=true
save-prefix=^
no-optional=true
auto-install-peers=true
dedupe-peer-dependents=true
Expand Down
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Add files here to ignore them from prettier formatting

node_modules/
pnpm-lock.yaml
/dist
/tmp
/coverage
/git-server
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Read more below to get started:
After cloning repo run:

```shell
npm install
pnpm install
```

In order to run tests run:

```shell
npm run test
pnpm run test
```

> Note: E2E tests use `@nx/plugin` for generating test workspace. You can learn more about it [here](https://nx.dev/packages/nx-plugin).
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { getJestProjects } = require('@nx/jest');
import { getJestProjects } from '@nx/jest';

export default {
projects: getJestProjects(),
Expand Down
10 changes: 10 additions & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@ const nxPreset = require('@nx/jest/preset').default;

module.exports = {
...nxPreset,
/* TODO: Update to latest Jest snapshotFormat
* By default Nx has kept the older style of Jest Snapshot formats
* to prevent breaking of any existing tests with snapshots.
* It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag.
* Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true },
};
136 changes: 28 additions & 108 deletions migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,139 +2,59 @@
"migrations": [
{
"cli": "nx",
"version": "16.0.0-beta.0",
"description": "Remove @nrwl/cli.",
"implementation": "./src/migrations/update-16-0-0/remove-nrwl-cli",
"version": "16.2.0-beta.0",
"description": "Remove outputPath from run commands",
"implementation": "./src/migrations/update-16-2-0/remove-run-commands-output-path",
"package": "nx",
"name": "16.0.0-remove-nrwl-cli"
"name": "16.2.0-remove-output-path-from-run-commands"
},
{
"cli": "nx",
"version": "16.0.0-beta.9",
"description": "Replace `dependsOn.projects` and `inputs` definitions with new configuration format.",
"implementation": "./src/migrations/update-16-0-0/update-depends-on-to-tokens",
"version": "16.6.0-beta.6",
"description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
"implementation": "./src/migrations/update-15-0-0/prefix-outputs",
"package": "nx",
"name": "16.0.0-tokens-for-depends-on"
"name": "16.6.0-prefix-outputs"
},
{
"cli": "nx",
"version": "16.0.0-beta.0",
"description": "Replace @nrwl/nx-cloud with nx-cloud",
"implementation": "./src/migrations/update-16-0-0/update-nx-cloud-runner",
"package": "nx",
"name": "16.0.0-update-nx-cloud-runner"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/devkit with @nx/devkit",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/devkit",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/workspace with @nx/workspace",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/workspace",
"name": "update-16-0-0-add-nx-packages"
},
{
"version": "16.0.0-beta.4",
"description": "Generates a plugin called 'workspace-plugin' containing your workspace generators.",
"cli": "nx",
"implementation": "./src/migrations/update-16-0-0/move-workspace-generators-to-local-plugin",
"package": "@nx/workspace",
"name": "16-0-0-move-workspace-generators-into-local-plugin"
},
{
"version": "16.0.0-beta.9",
"description": "Fix .babelrc presets if it contains an invalid entry for @nx/web/babel.",
"cli": "nx",
"implementation": "./src/migrations/update-16-0-0/fix-invalid-babelrc",
"package": "@nx/workspace",
"name": "16-0-0-fix-invalid-babelrc"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/linter with @nx/linter",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/linter",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/js with @nx/js",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"version": "16.6.0-beta.0",
"description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
"factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps",
"package": "@nx/js",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/eslint-plugin with @nx/eslint-plugin",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/eslint-plugin",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/web with @nx/web",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/web",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.4",
"description": "Replace @nx/web executors with @nx/webpack and @nx/rollup",
"implementation": "./src/migrations/update-16-0-0-update-executors/update-16-0-0-update-executors",
"package": "@nx/web",
"name": "update-16-0-0-update-executors"
"name": "explicitly-set-projects-to-update-buildable-deps"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/jest with @nx/jest",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"version": "16.5.0-beta.2",
"description": "Add test-setup.ts to ignored files in production input",
"implementation": "./src/migrations/update-16-5-0/add-test-setup-to-inputs-ignore",
"package": "@nx/jest",
"name": "update-16-0-0-add-nx-packages"
},
{
"version": "16.0.0-beta.1",
"cli": "nx",
"description": "Removes CLI property within schema.json files and moves generators and schematics to the proper root node in migrations.json",
"factory": "./src/migrations/update-16-0-0/cli-in-schema-json",
"package": "@nx/plugin",
"name": "update-remove-cli-prop"
"name": "add-test-setup-to-inputs-ignore"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/plugin with @nx/plugin",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"version": "16.2.0-beta.0",
"description": "Replace @nx/plugin:e2e with @nx/jest",
"implementation": "./src/migrations/update-16-2-0/replace-e2e-executor",
"package": "@nx/plugin",
"name": "update-16-0-0-add-nx-packages"
"name": "update-16-2-0-replace-e2e-executor"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/node with @nx/node",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"version": "16.3.1-beta.0",
"description": "Replace @nrwl/node:webpack and @nx/node:webpack with @nx/webpack:webpack for all project targets",
"implementation": "./src/migrations/update-16-3-1/update-webpack-executor",
"package": "@nx/node",
"name": "update-16-0-0-add-nx-packages"
"name": "update-16-3-1-update-executor"
},
{
"cli": "nx",
"version": "16.0.0-beta.5",
"description": "Replace @nx/node:webpack with @nx/node:webpack",
"implementation": "./src/migrations/update-16-0-0/update-webpack-executor",
"version": "16.4.0-beta.8",
"description": "Replace @nx/node:node with @nx/js:node for all project targets",
"implementation": "./src/migrations/update-16-4-0/replace-node-executor",
"package": "@nx/node",
"name": "update-16-0-0-update-executor"
"name": "update-16-4-0-replace-node-executor"
}
]
}
11 changes: 7 additions & 4 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"affected": {
"defaultBase": "master"
},
"packageManager": "pnpm",
"tasksRunnerOptions": {
"default": {
"runner": "nx-cloud",
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"],
"parallel": 1,
Expand Down Expand Up @@ -36,9 +37,10 @@
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": [
"{workspaceRoot}/workspace.json",
"{workspaceRoot}/pnpm-workspace.yaml",
"{workspaceRoot}/pnpm-lock.yaml",
"{workspaceRoot}/tsconfig.base.json",
"{workspaceRoot}/tslint.json",
"{workspaceRoot}/.eslintrc.json",
"{workspaceRoot}/nx.json",
"{workspaceRoot}/babel.config.json"
],
Expand All @@ -47,7 +49,8 @@
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/.eslintrc.json"
"!{projectRoot}/.eslintrc.json",
"!{projectRoot}/src/test-setup.[jt]s"
]
}
}
72 changes: 26 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "theunderscorer",
"version": "0.0.0",
"description": "Monorepo for semantic release for NX.",
"description": "Semantic release for NX with support ESM (PNPM version)",
"author": {
"email": "przemyslawzydek@gmail.com",
"name": "Przemysław Zydek"
"email": "ruscon@gmail.com",
"name": "Oleg Coroliov"
},
"repository": {
"type": "git",
"url": "https://github.com/ruscon/nx-semantic-release-pnpm"
},
"license": "MIT",
"engines": {
"node": ">=14"
"node": ">=16.0.0"
},
"scripts": {
"typecheck": "tsc --noEmit -p tsconfig.base.json",
Expand All @@ -21,7 +21,7 @@
"start": "nx build nx-semantic-release-pnpm --watch",
"build": "nx build nx-semantic-release-pnpm",
"build:skip-cache": "nx build nx-semantic-release-pnpm --skip-nx-cache",
"test": "nx test nx-semantic-release-pnpm --runInBand",
"test": "nx test nx-semantic-release-pnpm --runInBand --verbose",
"lint": "nx lint nx-semantic-release-pnpm",
"e2e": "nx e2e",
"affected:apps": "nx affected:apps",
Expand All @@ -41,49 +41,29 @@
"help": "nx help"
},
"private": true,
"dependencies": {
"@nrwl/tao": "16.0.0",
"@nx/devkit": "16.0.0",
"@semantic-release/changelog": "6.0.2",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1",
"@semantic-release/github": "8.0.7",
"cosmiconfig": "^7.0.1",
"remeda": "^0.0.32",
"semantic-release": "20.1.0",
"semantic-release-plugin-decorators": "github:tjg184/semantic-release-plugin-decorators#e3c3c66"
},
"devDependencies": {
"@nx/eslint-plugin": "16.0.0",
"@nx/jest": "16.0.0",
"@nx/js": "16.0.0",
"@nx/linter": "16.0.0",
"@nx/node": "16.0.0",
"@nx/plugin": "16.0.0-rc.0",
"@nx/web": "16.0.0",
"@nx/workspace": "16.0.0",
"@types/fs-extra": "^11.0.1",
"@types/jest": "29.4.4",
"@types/node": "18.7.1",
"@types/semantic-release": "20.0.1",
"@typescript-eslint/eslint-plugin": "5.59.1",
"@typescript-eslint/parser": "5.59.1",
"@zerollup/ts-transform-paths": "^1.7.18",
"@nx/devkit": "16.7.4",
"@nx/eslint-plugin": "16.7.4",
"@nx/jest": "16.7.4",
"@nx/js": "16.7.4",
"@nx/linter": "16.7.4",
"@nx/node": "16.7.4",
"@nx/plugin": "16.7.4",
"@nx/web": "16.7.4",
"@nx/workspace": "16.7.4",
"@types/jest": "^29.0.0",
"@types/node": "^20.4.0",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"conventional-changelog-conventionalcommits": "^5.0.0",
"eslint": "8.34.0",
"eslint": "8.46.0",
"eslint-config-prettier": "8.6.0",
"fs-extra": "^11.1.1",
"gitlog": "^4.0.4",
"jest": "29.4.3",
"jest-environment-jsdom": "29.4.3",
"nx": "16.0.0",
"nx-cloud": "16.0.5",
"prettier": "2.7.1",
"rimraf": "^4.1.2",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"ttypescript": "^1.5.13",
"type-fest": "^2.8.0",
"typescript": "4.9.5"
"jest": "^29.0.0",
"jest-environment-jsdom": "^29.6.0",
"nx": "16.7.4",
"prettier": "^2.8.0",
"ts-jest": "^29.0.0",
"ts-node": "^10.0.0",
"typescript": "^5.0.0"
}
}

0 comments on commit 0b90d16

Please sign in to comment.