Gathering detailed insights and metrics for ember-native-dom-helpers-codemod
Gathering detailed insights and metrics for ember-native-dom-helpers-codemod
Gathering detailed insights and metrics for ember-native-dom-helpers-codemod
Gathering detailed insights and metrics for ember-native-dom-helpers-codemod
npm install ember-native-dom-helpers-codemod
Typescript
Module System
33.5
Supply Chain
82.1
Quality
63.4
Maintenance
25
Vulnerability
94.9
License
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
5,978
Last Day
6
Last Week
16
Last Month
70
Last Year
776
MIT License
27 Stars
99 Commits
9 Forks
5 Watchers
3 Branches
8 Contributors
Updated on Dec 17, 2021
Minified
Minified + Gzipped
Latest Version
0.2.5
Package Id
ember-native-dom-helpers-codemod@0.2.5
Unpacked Size
71.53 kB
Size
11.62 kB
File Count
49
Cumulative downloads
Total Downloads
Last Day
100%
6
Compared to previous day
Last Week
33.3%
16
Compared to previous week
Last Month
52.2%
70
Compared to previous month
Last Year
69.8%
776
Compared to previous year
2
A jscodeshift based codemod to help migrating your jQuery based Ember tests to ember-native-dom-helpers.
Please note that this will not be able to cover all possible cases how jQuery based tests can be written. Given the dynamic nature of JavaScript and the extensive API and fluent interface of jQuery, this would be impossible. Instead this codemod focuses to cover the most common usages and do those transformations that it can safely do. So it is likely that you will have to manually migrate some usages this tool cannot cover!
This package requires Node 6 or later. Make sure you are using a newer version of Node before installing and running this package.
WARNING: jscodeshift
, and thus this codemod, edit your files in place.
It does not make a copy. Make sure your code is checked into a source control
repository like Git and that you have no outstanding changes to commit before
running this tool.
1npm install -g ember-native-dom-helpers-codemod 2cd my-ember-app-or-addon 3ember-native-dom-helpers-codemod --type=integration tests/integration 4ember-native-dom-helpers-codemod --type=acceptance tests/acceptance
This addon will perform the following transformations suitable for integration tests:
Before | After | Transform |
---|---|---|
this.$('.foo').attr('id') | find('.foo').id | attr.js |
this.$('.foo').attr('data-test') | find('.foo').getAttribute('data-test') | attr.js |
this.$('.foo').click() | await click('.foo') | click.js |
this.$('.foo').change() (and more events) | await triggerEvent('.foo', 'change') | trigger-shortcut.js |
this.$('.foo').trigger('input') | await triggerEvent('.foo', 'input') | trigger.js |
this.$('.foo').focus() | await focus('.foo') | focus.js |
this.$('.foo').val() | find('.foo').value | get-value.js |
this.$('div').hasClass('foo') | find('div').classList.contains('foo') | has-class.js |
this.$('.foo').trigger('click') | await click('.foo') | key-event.js |
this.$('.foo').trigger('keydown', { keyCode: 13 }) | await keyEvent('.foo', 'keydown', 13) | key-event.js |
this.$('.foo').length | findAll('.foo').length | length.js |
this.$('.foo').prop('tagName') | find('.foo').tagName | prop.js |
this.$('.foo').val('foo') | await fillIn('.foo', 'foo') | set-value.js |
this.$('.foo').val('bar').change() | await fillIn('.foo', 'foo'); await blur('.foo'); | set-value.js |
this.$('.foo').val('bar').trigger('input') | await fillIn('.foo', 'foo') | set-value.js |
this.$('.foo').text() | find('.foo').textContent | text.js |
this.$('.foo').html() | find('.foo').innerHTML | html.js |
this.$('.foo').html('foo') | find('.foo').innerHTML = 'foo' | html.js |
this.$('.foo').each((index, elem) => {...}) | findAll('.foo').forEach((elem, index) => {...}) | each.js |
this.$('.foo').get(3) | findAll('.foo')[3] | get.js |
If you want to run only selected transforms on your code, you can just the needed transform:
1jscodeshift -t ../ember-native-dom-helpers-codemod/lib/transforms/click.js tests/integration
These transformations are available for acceptance tests:
Before | After | Transform |
---|---|---|
find('.foo').attr('id') | find('.foo').id | attr.js |
find('.foo').attr('data-test') | find('.foo').getAttribute('data-test') | attr.js |
click('.foo') | await click('.foo') | click.js |
fillIn('#bar', 'baz') | await fillIn('#bar', 'baz') | fill-in.js |
triggerEvent('input', 'focus') | await focus('.foo') | trigger-event.js |
triggerEvent('input', 'blur') | await blur('.foo') | trigger-event.js |
triggerEvent('input', 'mouseenter') | await triggerEvent('input', 'mouseenter') | trigger-event.js |
find('.foo').val() | find('.foo').value | get-value.js |
find('div').hasClass('foo') | find('div').classList.contains('foo') | has-class.js |
keyEvent('#bar', 'keypress', 13); | await keyEvent('.foo', 'keydown', 13) | key-event.js |
find('.foo').length | findAll('.foo').length | length.js |
find('.foo').prop('tagName') | find('.foo').tagName | prop.js |
find('.foo').text() | find('.foo').textContent | text.js |
find('.foo').html() | find('.foo').innerHTML | html.js |
find('.foo').html('foo') | find('.foo').innerHTML = 'foo' | html.js |
find('.foo').each((index, elem) => {...}) | findAll('.foo').forEach((elem, index) => {...}) | each.js |
find('.foo').get(3) | findAll('.foo')[3] | get.js |
If you want to run only selected transforms on your code, you can just the needed transform:
1jscodeshift -t ../ember-native-dom-helpers-codemod/lib/transforms/click.js tests/integration
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 10/14 approved changesets -- score normalized to 7
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
70 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More