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

feat: Add vue2 package from npm/vue/v2 branch #21026

Merged
merged 20 commits into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ npm/cypress-schematic/src/**/*.js
/npm/create-cypress-tests/initial-template
/npm/create-cypress-tests/**/*.template.*

# The global eslint configuration is not set up to parse vue@2 files
/npm/vue2/**/*.vue

packages/data-context/test/unit/codegen/files

# community templates we test against, no need to lint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ describe('init component tests script', () => {
}) as any)

await initComponentTesting({ config: {}, cypressConfigPath, useYarn: true })
expect(execStub).to.be.calledWith('yarn add @cypress/vue@3 --dev')
expect(execStub).to.be.calledWith('yarn add @cypress/vue --dev')
})

it('suggest the right instruction based on user template choice', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,16 @@ type InstallAdapterOptions = {
useYarn: boolean
}

const frameworkDependencies = {
react: '@cypress/react',
'vue@2': '@cypress/vue2',
'vue@3': '@cypress/vue',
}

export async function installFrameworkAdapter (cwd: string, options: InstallAdapterOptions) {
const framework = await guessOrAskForFramework(cwd)

await installDependency(`@cypress/${framework}`, options)
await installDependency(frameworkDependencies[framework], options)

return framework
}
17 changes: 17 additions & 0 deletions npm/vue2/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"plugins": [
"cypress"
],
"extends": [
"plugin:@cypress/dev/tests"
],
"env": {
"cypress/globals": true
},
"rules": {
"mocha/no-global-tests": "off",
"no-unused-vars": "off",
"no-console": "off",
"@typescript-eslint/no-unused-vars": "off"
}
}
1 change: 1 addition & 0 deletions npm/vue2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cypress/videos
4 changes: 4 additions & 0 deletions npm/vue2/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
registry=http://registry.npmjs.org/
save-exact=true
progress=false
package-lock=true
9 changes: 9 additions & 0 deletions npm/vue2/.releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
...require('../../.releaserc.base'),
branches: [
// this one releases v3 on master on the latest channel
'master',
// this line forces releasing 2.X releases on the v2 channel
{ name: 'npm/vue/v2', range: '2.X.X', channel: 'v2' },
],
}
5 changes: 5 additions & 0 deletions npm/vue2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @cypress/vue2-v1.0.0 (2021-06-17)

### Features

* Split out as separate package from `@cypress/vue`, based on the `npm/vue/v2` branch.
Loading