Skip to content

Commit 4131b1f

Browse files
feat(angular): angular mount (#22858)
Co-authored-by: Zachary Williams <zachjw34@gmail.com>
1 parent b62c949 commit 4131b1f

File tree

151 files changed

+765
-5939
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+765
-5939
lines changed

circle.yml

-8
Original file line numberDiff line numberDiff line change
@@ -1791,14 +1791,6 @@ jobs:
17911791
- run:
17921792
name: Build
17931793
command: yarn workspace @cypress/angular build
1794-
- run:
1795-
name: Run tests
1796-
command: yarn test-ci
1797-
working_directory: npm/angular
1798-
- store_test_results:
1799-
path: npm/angular/test_results
1800-
- store_artifacts:
1801-
path: npm/angular/test_results
18021794
- store-npm-logs
18031795

18041796
npm-react:

cli/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ types/minimatch
99
types/sinon
1010
types/sinon-chai
1111
# copied from net-stubbing package on build
12-
types/net-stubbing.ts
12+
types/net-stubbing.d.ts
1313
# ignore CLI output build folder
1414
build
1515

@@ -19,3 +19,4 @@ vue
1919
vue2
2020
react*
2121
mount-utils
22+
angular

cli/package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@
103103
"index.js",
104104
"index.mjs",
105105
"types/**/*.d.ts",
106-
"types/net-stubbing.ts",
107106
"mount-utils",
108107
"vue",
109108
"react",
110109
"vue2",
111-
"react18"
110+
"react18",
111+
"angular"
112112
],
113113
"bin": {
114114
"cypress": "bin/cypress"
@@ -150,6 +150,11 @@
150150
"./mount-utils": {
151151
"require": "./mount-utils/dist/index.js",
152152
"types": "./mount-utils/dist/index.d.ts"
153+
},
154+
"./angular": {
155+
"import": "./angular/dist/index.js",
156+
"require": "./angular/dist/index.js",
157+
"types": "./angular/dist/index.d.ts"
153158
}
154159
},
155160
"workspaces": {

cli/scripts/post-build.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const npmModulesToCopy = [
1212
'react18',
1313
'vue',
1414
'vue2',
15+
'angular',
1516
]
1617

1718
npmModulesToCopy.forEach((folder) => {

cli/scripts/post-install.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ shell.sed('-i', 'from \'sinon\';', 'from \'../sinon\';', sinonChaiFilename)
7575

7676
// copy experimental network stubbing type definitions
7777
// so users can import: `import 'cypress/types/net-stubbing'`
78-
fs.copySync(resolvePkg('@packages/net-stubbing/lib/external-types.ts'), 'types/net-stubbing.ts')
78+
fs.copySync(resolvePkg('@packages/net-stubbing/lib/external-types.ts'), 'types/net-stubbing.d.ts')
7979

8080
// https://github.com/cypress-io/cypress/issues/18069
8181
// To avoid type clashes, some files should be commented out entirely by patch-package

cli/types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
// hmm, how to load it better?
2727
/// <reference path="./cypress-npm-api.d.ts" />
2828

29-
/// <reference path="./net-stubbing.ts" />
29+
/// <reference path="./net-stubbing.d.ts" />
3030
/// <reference path="./cypress.d.ts" />
3131
/// <reference path="./cypress-global-vars.d.ts" />
3232
/// <reference path="./cypress-type-helpers.d.ts" />

cli/types/tslint.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838
"./mocha/*",
3939
"./minimatch/*",
4040
"./sinon/**/*",
41-
"./sinon-chai/*"
41+
"./sinon-chai/*",
42+
// Copied from net-stubbing and renamed to a declaration file. Since it's not originally
43+
// a declaration file, we need to exclude it from linting.
44+
"./net-stubbing.d.ts"
4245
]
4346
}
4447
}

npm/angular/.editorconfig

-13
This file was deleted.

npm/angular/.eslintrc

+4-30
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,17 @@
11
{
22
"plugins": [
3-
"cypress",
4-
"@cypress/dev",
5-
"@angular-eslint/eslint-plugin"
3+
"cypress"
64
],
75
"extends": [
8-
"plugin:@cypress/dev/general",
96
"plugin:@cypress/dev/tests"
107
],
11-
"parser": "@typescript-eslint/parser",
128
"env": {
139
"cypress/globals": true
1410
},
15-
"root": true,
16-
"globals": {
17-
"jest": "readonly"
18-
},
1911
"rules": {
20-
"no-console": "off",
2112
"mocha/no-global-tests": "off",
22-
"no-useless-constructor": "off",
23-
"@typescript-eslint/no-useless-constructor": "off",
13+
"no-unused-vars": "off",
14+
"no-console": "off",
2415
"@typescript-eslint/no-unused-vars": "off"
25-
},
26-
"overrides": [
27-
{
28-
"files": [
29-
"lib/*",
30-
"src/*"
31-
]
32-
},
33-
{
34-
"files": [
35-
"**/*.json"
36-
],
37-
"rules": {
38-
"quotes": "off",
39-
"comma-dangle": "off"
40-
}
41-
}
42-
]
16+
}
4317
}

npm/angular/.gitignore

-53
This file was deleted.

npm/angular/.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
examples
2+
src
3+
cypress

npm/angular/.releaserc.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
...require('../../.releaserc.base'),
3+
branches: [
4+
{ name: 'master', channel: 'latest' },
5+
],
6+
}

0 commit comments

Comments
 (0)