Skip to content

Commit

Permalink
fix(plugin): prevent type collision with projectRoot due to partial (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
prescottprue authored Dec 31, 2022
1 parent bdd94a8 commit 16754da
Show file tree
Hide file tree
Showing 12 changed files with 1,364 additions and 1,493 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ If you are interested in what drove the need for this checkout [the why section]
import { defineConfig } from 'cypress';
import { plugin as cypressFirebasePlugin } from 'cypress-firebase';

const cypressConfig = defineConfig({
export default defineConfig({
e2e: {
baseUrl: 'http://localhost:3000',
// NOTE: Make supportFile exists if separate location is provided
// NOTE: Add "supportFile" setting if separate location is used
setupNodeEvents(on, config) {
// e2e testing node events setup code
return cypressFirebasePlugin(on, config, admin);
Expand All @@ -53,8 +53,6 @@ If you are interested in what drove the need for this checkout [the why section]
},
},
});

export default cypressConfig;
```

or if you are not using TS, then within `cypress.config.js`:
Expand Down
14 changes: 7 additions & 7 deletions examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
"test:emulate": "cross-env FIREBASE_AUTH_EMULATOR_HOST=\"localhost:$(cat firebase.json | jq .emulators.auth.port)\" FIREBASE_DATABASE_EMULATOR_HOST=\"localhost:$(cat firebase.json | jq .emulators.database.port)\" FIRESTORE_EMULATOR_HOST=\"localhost:$(cat firebase.json | jq .emulators.firestore.port)\" yarn test:open"
},
"dependencies": {
"firebase": "^9.5.0",
"firebase": "^9.15.0",
"lodash": "^4.17.21",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"cross-env": "7.0.3",
"cypress": "10.11.0",
"cypress-firebase": "2.2.5",
"cypress": "12.2.0",
"cypress-firebase": "3.0.0",
"eslint-plugin-chai-friendly": "0.7.2",
"eslint-plugin-cypress": "2.12.1",
"firebase-admin": "10.3.0",
"firebase-tools": "11.1.0",
"firebase-admin": "11.4.1",
"firebase-tools": "11.19.0",
"react-scripts": "5.0.1"
},
"eslintConfig": {
Expand Down
1,673 changes: 826 additions & 847 deletions examples/basic/yarn.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/typescript/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { defineConfig } from 'cypress'
import { plugin as cypressFirebasePlugin } from 'cypress-firebase'
import admin from 'firebase-admin'

export default defineConfig({
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.ts')(on, config)
return cypressFirebasePlugin(on, config, admin)
},
},
})
10 changes: 0 additions & 10 deletions examples/typescript/cypress/plugins/index.ts

This file was deleted.

28 changes: 14 additions & 14 deletions examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@
"test:emulate": "cross-env FIREBASE_AUTH_EMULATOR_HOST=\"localhost:$(cat firebase.json | jq .emulators.auth.port)\" FIREBASE_DATABASE_EMULATOR_HOST=\"localhost:$(cat firebase.json | jq .emulators.database.port)\" FIRESTORE_EMULATOR_HOST=\"localhost:$(cat firebase.json | jq .emulators.firestore.port)\" yarn test:open"
},
"dependencies": {
"firebase": "^9.5.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "5.0.1",
"typescript": "^4.1.2",
"web-vitals": "^2.0.0"
"firebase": "9.15.0",
"react": "18.2.0",
"react-dom": "18.2.0"
},
"devDependencies": {
"@testing-library/jest-dom": "5.15.1",
"@testing-library/react": "12.1.3",
"@testing-library/user-event": "13.5.0",
"@types/jest": "28.1.8",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "13.4.0",
"@testing-library/user-event": "14.4.3",
"@types/jest": "29.2.5",
"@types/node": "16.18.11",
"@types/react": "17.0.52",
"@types/react-dom": "17.0.11",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.10",
"cross-env": "7.0.3",
"cypress": "12.2.0",
"cypress-firebase": "2.2.5",
"cypress-firebase": "3.0.0",
"eslint-plugin-chai-friendly": "0.7.2",
"eslint-plugin-cypress": "2.12.1",
"react-scripts": "5.0.1",
"firebase-admin": "11.4.1",
"firebase-tools": "11.19.0"
"firebase-tools": "11.19.0",
"typescript": "4.9.4",
"web-vitals": "2.0.0"
},
"eslintConfig": {
"extends": [
Expand Down
Loading

0 comments on commit 16754da

Please sign in to comment.