Installations
npm install ember-native-dom-helpers-codemod
Developer Guide
Typescript
No
Module System
CommonJS
Score
33.5
Supply Chain
82.1
Quality
63.4
Maintenance
25
Vulnerability
94.9
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
simonihmig
Download Statistics
Total Downloads
5,978
Last Day
6
Last Week
16
Last Month
70
Last Year
776
GitHub Statistics
MIT License
27 Stars
99 Commits
9 Forks
5 Watchers
3 Branches
8 Contributors
Updated on Dec 17, 2021
Bundle Size
4.25 kB
Minified
1.88 kB
Minified + Gzipped
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
5,978
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
ember-native-dom-helpers-codemod
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!
Usage
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
Transformations
Integrations tests
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
Acceptance tests
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
- Info: project has a license file: LICENSE.md:0
- Info: FSF or OSI recognized license: MIT License: LICENSE.md:0
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 26 are checked with a SAST tool
Reason
70 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-rq8g-5pc5-wrhr
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-hr2v-3952-633q
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c
- Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6
- Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9
- Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f
- Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p
- Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv
- Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8
- Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65
- Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq
- Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm
- Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3
- Warn: Project is vulnerable to: GHSA-f9cm-qmx5-m98h
- Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-6394-6h9h-cfjg
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3
- Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
2.7
/10
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