From f30e0d26a9e4c99efffbcb8415e59d1f8fbdf328 Mon Sep 17 00:00:00 2001
From: "allcontributors[bot]"
 <46447321+allcontributors[bot]@users.noreply.github.com>
Date: Fri, 10 Jun 2022 10:09:33 +0200
Subject: [PATCH 1/2] docs: add dzonatan as a contributor for code (#301)

---
 .all-contributorsrc | 9 +++++++++
 README.md           | 1 +
 2 files changed, 10 insertions(+)

diff --git a/.all-contributorsrc b/.all-contributorsrc
index 83afbd4..9eac3c7 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -294,6 +294,15 @@
         "code",
         "test"
       ]
+    },
+    {
+      "login": "dzonatan",
+      "name": "Rokas Brazdžionis",
+      "avatar_url": "https://avatars.githubusercontent.com/u/5166666?v=4",
+      "profile": "https://github.com/dzonatan",
+      "contributions": [
+        "code"
+      ]
     }
   ],
   "contributorsPerLine": 7,
diff --git a/README.md b/README.md
index eb47f89..acd2255 100644
--- a/README.md
+++ b/README.md
@@ -222,6 +222,7 @@ Thanks goes to these people ([emoji key][emojis]):
   <tr>
     <td align="center"><a href="https://github.com/meirka"><img src="https://avatars.githubusercontent.com/u/750901?v=4?s=100" width="100px;" alt=""/><br /><sub><b>MeIr</b></sub></a><br /><a href="https://github.com/testing-library/angular-testing-library/issues?q=author%3Ameirka" title="Bug reports">🐛</a> <a href="https://github.com/testing-library/angular-testing-library/commits?author=meirka" title="Tests">⚠️</a></td>
     <td align="center"><a href="https://github.com/jadengis"><img src="https://avatars.githubusercontent.com/u/13421336?v=4?s=100" width="100px;" alt=""/><br /><sub><b>John Dengis</b></sub></a><br /><a href="https://github.com/testing-library/angular-testing-library/commits?author=jadengis" title="Code">💻</a> <a href="https://github.com/testing-library/angular-testing-library/commits?author=jadengis" title="Tests">⚠️</a></td>
+    <td align="center"><a href="https://github.com/dzonatan"><img src="https://avatars.githubusercontent.com/u/5166666?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rokas Brazdžionis</b></sub></a><br /><a href="https://github.com/testing-library/angular-testing-library/commits?author=dzonatan" title="Code">💻</a></td>
   </tr>
 </table>
 

From 0db3a5c8fb2357b33a15ef04b0e1acd3c9c18d23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rokas=20Brazd=C5=BEionis?= <rokas.brazdzionis@gmail.com>
Date: Fri, 10 Jun 2022 11:09:59 +0300
Subject: [PATCH 2/2] fix(jest-utils): use official secondary package format
 (#300)

Closes #299
---
 angular.json                                  |  1 -
 package.json                                  |  2 +-
 projects/jest-utils/.eslintrc.json            | 47 ----------------
 projects/jest-utils/jest.config.js            |  9 ----
 projects/jest-utils/ng-package.json           |  8 ---
 projects/jest-utils/package.json              | 33 ------------
 projects/jest-utils/project.json              | 54 -------------------
 projects/jest-utils/test-setup.ts             |  2 -
 projects/jest-utils/tsconfig.json             | 24 ---------
 projects/jest-utils/tsconfig.lib.json         | 12 -----
 projects/jest-utils/tsconfig.lib.prod.json    |  9 ----
 projects/jest-utils/tsconfig.spec.json        |  9 ----
 .../{ => testing-library}/jest-utils/index.ts |  0
 .../jest-utils/ng-package.json                |  1 +
 .../jest-utils/src/lib/create-mock.ts         |  0
 .../jest-utils/src/lib/index.ts               |  0
 .../jest-utils/src/public_api.ts              |  0
 .../jest-utils/tests/create-mock.spec.ts      |  0
 tsconfig.base.json                            |  2 +-
 19 files changed, 3 insertions(+), 210 deletions(-)
 delete mode 100644 projects/jest-utils/.eslintrc.json
 delete mode 100644 projects/jest-utils/jest.config.js
 delete mode 100644 projects/jest-utils/ng-package.json
 delete mode 100644 projects/jest-utils/package.json
 delete mode 100644 projects/jest-utils/project.json
 delete mode 100644 projects/jest-utils/test-setup.ts
 delete mode 100644 projects/jest-utils/tsconfig.json
 delete mode 100644 projects/jest-utils/tsconfig.lib.json
 delete mode 100644 projects/jest-utils/tsconfig.lib.prod.json
 delete mode 100644 projects/jest-utils/tsconfig.spec.json
 rename projects/{ => testing-library}/jest-utils/index.ts (100%)
 create mode 100644 projects/testing-library/jest-utils/ng-package.json
 rename projects/{ => testing-library}/jest-utils/src/lib/create-mock.ts (100%)
 rename projects/{ => testing-library}/jest-utils/src/lib/index.ts (100%)
 rename projects/{ => testing-library}/jest-utils/src/public_api.ts (100%)
 rename projects/{ => testing-library}/jest-utils/tests/create-mock.spec.ts (100%)

diff --git a/angular.json b/angular.json
index dfd6bcf..46abc72 100644
--- a/angular.json
+++ b/angular.json
@@ -3,7 +3,6 @@
   "projects": {
     "example-app": "apps/example-app",
     "example-app-karma": "apps/example-app-karma",
-    "jest-utils": "projects/jest-utils",
     "testing-library": "projects/testing-library"
   }
 }
diff --git a/package.json b/package.json
index 818f0dd..66fb3d8 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
     "postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2015 browser module main",
     "start": "nx serve",
     "prebuild": "rimraf dist",
-    "build": "nx run-many --target=build --projects=testing-library,jest-utils",
+    "build": "nx run-many --target=build --projects=testing-library",
     "build:schematics": "tsc -p ./projects/testing-library/tsconfig.schematics.json",
     "test": "nx run-many --target=test --all",
     "lint": "nx workspace-lint && nx lint",
diff --git a/projects/jest-utils/.eslintrc.json b/projects/jest-utils/.eslintrc.json
deleted file mode 100644
index 785bfeb..0000000
--- a/projects/jest-utils/.eslintrc.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
-  "extends": "../../.eslintrc.json",
-  "ignorePatterns": ["!**/*"],
-  "overrides": [
-    {
-      "files": ["*.ts"],
-      "extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
-      "parserOptions": {
-        "project": ["projects/jest-utils/tsconfig.*?.json"]
-      },
-      "rules": {
-        "@angular-eslint/directive-selector": [
-          "error",
-          {
-            "type": "attribute",
-            "prefix": "atl",
-            "style": "camelCase"
-          }
-        ],
-        "@angular-eslint/component-selector": [
-          "error",
-          {
-            "type": "element",
-            "prefix": "atl",
-            "style": "kebab-case"
-          }
-        ]
-      }
-    },
-    {
-      "files": ["*.spec.ts"],
-      "env": {
-        "jest": true
-      },
-      "extends": ["plugin:jest/recommended", "plugin:jest/style", "plugin:jest-dom/recommended"],
-      "rules": {
-        "jest/consistent-test-it": ["error"],
-        "jest/expect-expect": "off"
-      }
-    },
-    {
-      "files": ["*.html"],
-      "extends": ["plugin:@nrwl/nx/angular-template"],
-      "rules": {}
-    }
-  ]
-}
diff --git a/projects/jest-utils/jest.config.js b/projects/jest-utils/jest.config.js
deleted file mode 100644
index 0d80b62..0000000
--- a/projects/jest-utils/jest.config.js
+++ /dev/null
@@ -1,9 +0,0 @@
-module.exports = {
-  name: 'Jest utils',
-  displayName: {
-    name: 'JEST UTILS',
-    color: 'magenta',
-  },
-  preset: '../../jest.preset.js',
-  setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
-};
diff --git a/projects/jest-utils/ng-package.json b/projects/jest-utils/ng-package.json
deleted file mode 100644
index 210c7bc..0000000
--- a/projects/jest-utils/ng-package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
-  "dest": "../../dist/@testing-library/angular/jest-utils",
-  "deleteDestPath": false,
-  "lib": {
-    "entryFile": "index.ts"
-  }
-}
diff --git a/projects/jest-utils/package.json b/projects/jest-utils/package.json
deleted file mode 100644
index 4462dc3..0000000
--- a/projects/jest-utils/package.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-  "name": "@testing-library/angular/jest-utils",
-  "version": "0.0.0-semantically-released",
-  "description": "Test your Angular components with the dom-testing-library",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/testing-library/angular-testing-library.git"
-  },
-  "keywords": [
-    "angular",
-    "ngx",
-    "ng",
-    "typescript",
-    "angular2",
-    "test",
-    "dom-testing-library"
-  ],
-  "author": "Tim Deschryver",
-  "license": "MIT",
-  "bugs": {
-    "url": "https://github.com/testing-library/angular-testing-library/issues"
-  },
-  "homepage": "https://github.com/testing-library/angular-testing-library#readme",
-  "peerDependencies": {
-    "jest": ">=27.0.0"
-  },
-  "publishConfig": {
-    "access": "public"
-  },
-  "dependencies": {
-    "tslib": "^2.0.0"
-  }
-}
diff --git a/projects/jest-utils/project.json b/projects/jest-utils/project.json
deleted file mode 100644
index 8c4976f..0000000
--- a/projects/jest-utils/project.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
-  "projectType": "library",
-  "root": "projects/jest-utils",
-  "sourceRoot": "projects/jest-utils/src",
-  "prefix": "lib",
-  "targets": {
-    "build-package": {
-      "executor": "@nrwl/angular:package",
-      "outputs": ["dist/@testing-library/angular/jest-utils"],
-      "options": {
-        "project": "projects/jest-utils/ng-package.json"
-      },
-      "configurations": {
-        "production": {
-          "tsConfig": "projects/jest-utils/tsconfig.lib.prod.json"
-        },
-        "development": {
-          "tsConfig": "projects/jest-utils/tsconfig.lib.json"
-        }
-      },
-      "defaultConfiguration": "production"
-    },
-    "lint": {
-      "executor": "@nrwl/linter:eslint",
-      "options": {
-        "lintFilePatterns": [
-          "projects/jest-utils/**/*.ts",
-          "projects/jest-utils/**/*.html",
-          "projects/jest-utils/src/**/*.html"
-        ]
-      },
-      "outputs": ["{options.outputFile}"]
-    },
-    "build": {
-      "executor": "@nrwl/workspace:run-commands",
-      "options": {
-        "parallel": false,
-        "commands": [
-          {
-            "command": "nx run jest-utils:build-package"
-          }
-        ]
-      }
-    },
-    "test": {
-      "executor": "@nrwl/jest:jest",
-      "options": {
-        "jestConfig": "projects/jest-utils/jest.config.js"
-      },
-      "outputs": ["coverage/projects/jest-utils"]
-    }
-  },
-  "tags": []
-}
diff --git a/projects/jest-utils/test-setup.ts b/projects/jest-utils/test-setup.ts
deleted file mode 100644
index 0da94a0..0000000
--- a/projects/jest-utils/test-setup.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import 'jest-preset-angular/setup-jest';
-import '@testing-library/jest-dom';
diff --git a/projects/jest-utils/tsconfig.json b/projects/jest-utils/tsconfig.json
deleted file mode 100644
index 24663f6..0000000
--- a/projects/jest-utils/tsconfig.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "extends": "../../tsconfig.base.json",
-  "files": [],
-  "include": [],
-  "references": [
-    {
-      "path": "./tsconfig.lib.json"
-    },
-    {
-      "path": "./tsconfig.lib.prod.json"
-    },
-    {
-      "path": "./tsconfig.spec.json"
-    }
-  ],
-  "compilerOptions": {},
-  "angularCompilerOptions": {
-    "strictInjectionParameters": true,
-    "strictInputAccessModifiers": true,
-    "strictTemplates": true,
-    "flatModuleId": "AUTOGENERATED",
-    "flatModuleOutFile": "AUTOGENERATED"
-  }
-}
diff --git a/projects/jest-utils/tsconfig.lib.json b/projects/jest-utils/tsconfig.lib.json
deleted file mode 100644
index 0566ff8..0000000
--- a/projects/jest-utils/tsconfig.lib.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-  "extends": "./tsconfig.json",
-  "compilerOptions": {
-    "outDir": "../../dist/out-tsc",
-    "declaration": true,
-    "declarationMap": true,
-    "inlineSources": true,
-    "types": ["jest"]
-  },
-  "exclude": ["src/test.ts", "**/*.spec.ts", "**/*.test.ts"],
-  "include": ["**/*.ts"]
-}
diff --git a/projects/jest-utils/tsconfig.lib.prod.json b/projects/jest-utils/tsconfig.lib.prod.json
deleted file mode 100644
index 2a2faa8..0000000
--- a/projects/jest-utils/tsconfig.lib.prod.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "extends": "./tsconfig.lib.json",
-  "compilerOptions": {
-    "declarationMap": false
-  },
-  "angularCompilerOptions": {
-    "compilationMode": "partial"
-  }
-}
diff --git a/projects/jest-utils/tsconfig.spec.json b/projects/jest-utils/tsconfig.spec.json
deleted file mode 100644
index 73461f3..0000000
--- a/projects/jest-utils/tsconfig.spec.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "extends": "./tsconfig.json",
-  "compilerOptions": {
-    "module": "commonjs",
-    "types": ["node", "jest", "@testing-library/jest-dom"]
-  },
-  "files": ["test-setup.ts"],
-  "include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts"]
-}
diff --git a/projects/jest-utils/index.ts b/projects/testing-library/jest-utils/index.ts
similarity index 100%
rename from projects/jest-utils/index.ts
rename to projects/testing-library/jest-utils/index.ts
diff --git a/projects/testing-library/jest-utils/ng-package.json b/projects/testing-library/jest-utils/ng-package.json
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/projects/testing-library/jest-utils/ng-package.json
@@ -0,0 +1 @@
+{}
diff --git a/projects/jest-utils/src/lib/create-mock.ts b/projects/testing-library/jest-utils/src/lib/create-mock.ts
similarity index 100%
rename from projects/jest-utils/src/lib/create-mock.ts
rename to projects/testing-library/jest-utils/src/lib/create-mock.ts
diff --git a/projects/jest-utils/src/lib/index.ts b/projects/testing-library/jest-utils/src/lib/index.ts
similarity index 100%
rename from projects/jest-utils/src/lib/index.ts
rename to projects/testing-library/jest-utils/src/lib/index.ts
diff --git a/projects/jest-utils/src/public_api.ts b/projects/testing-library/jest-utils/src/public_api.ts
similarity index 100%
rename from projects/jest-utils/src/public_api.ts
rename to projects/testing-library/jest-utils/src/public_api.ts
diff --git a/projects/jest-utils/tests/create-mock.spec.ts b/projects/testing-library/jest-utils/tests/create-mock.spec.ts
similarity index 100%
rename from projects/jest-utils/tests/create-mock.spec.ts
rename to projects/testing-library/jest-utils/tests/create-mock.spec.ts
diff --git a/tsconfig.base.json b/tsconfig.base.json
index 1e0de6e..ede79fb 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -23,7 +23,7 @@
     "noUnusedParameters": true,
     "paths": {
       "@testing-library/angular": ["projects/testing-library"],
-      "@testing-library/angular/jest-utils": ["projects/jest-utils"]
+      "@testing-library/angular/jest-utils": ["projects/testing-library/jest-utils"]
     }
   },
   "exclude": ["node_modules", "tmp"]