0.12.0 • Published 2 years ago

@wdio/codemod v0.12.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

WebdriverIO Codemod Test

This project contains various codemods to help migrating from either one major WebdriverIO version to another or from a specific framework to WebdriverIO. It can be used with jscodeshift and currently supports the following migrations:

If you run into any issues during your migration please let us know.

Install

To transform your spec files, you need to install the following packages:

$ npm install jscodeshift @wdio/codemod

Usage

To transform you code, run:

$ npx jscodeshift -t ./node_modules/@wdio/codemod/<framework> <path>
# e.g. to migrate from v5 to v6
$ npx jscodeshift -t ./node_modules/@wdio/codemod/v6 ./e2e/
# e.g. to migrate from v6 to v7:
$ npx jscodeshift -t ./node_modules/@wdio/codemod/v7 ./e2e/
# e.g. to transform Protractor code:
$ npx jscodeshift -t ./node_modules/@wdio/codemod/protractor ./e2e/
# e.g. to tranform from sync to async
$ npx jscodeshift -t ./node_modules/@wdio/codemod/async ./e2e/

If you use TypeScript make sure you apply a different parser as parameter, e.g.:

$ npx jscodeshift -t ./node_modules/@wdio/codemod/protractor --parser=tsx ./e2e/*.ts

If you use a different line terminator from your os, you can override it as parameter, e.g.:

$ npx jscodeshift -t ./node_modules/@wdio/codemod/async --printOptions='{\"lineTerminator\":\"\n\"}' ./e2e/

You can transform tests as well as config files, e.g.:

Codemod Usage Example

0.11.0

2 years ago

0.10.1

2 years ago

0.12.0

2 years ago

0.10.0

2 years ago

0.9.1

3 years ago

0.8.9

3 years ago

0.5.10

3 years ago

0.8.8

3 years ago

0.5.11

3 years ago

0.5.11-0

3 years ago

0.5.12-0

3 years ago

0.8.5

3 years ago

0.5.8

3 years ago

0.8.4

3 years ago

0.8.7

3 years ago

0.8.6

3 years ago

0.5.9

3 years ago

0.6.0-0

3 years ago

0.8.11

3 years ago

0.8.10

3 years ago

0.9.0

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.8.3

3 years ago

0.8.2

3 years ago

0.7.0

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.7

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.2

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago