forked from q2ebanking/ember-select-light
-
Notifications
You must be signed in to change notification settings - Fork 11
ember-codemod-v1-to-v2 #46
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
Open
pkimber
wants to merge
9
commits into
ember-a11y:main
Choose a base branch
from
pkimber:6649-ember-codemod-v1-to-v2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c35bb2b
fix - change 'hasBlock' to 'has-block'
pkimber 7fcf54d
fork '@kb/ember-select-light'
pkimber 1c78e0a
2.0.6
pkimber d0c6983
prep for release
pkimber 1d16bb8
ember-codemod-v1-to-v2
pkimber ff8c45b
prep for release
pkimber 82f3eb0
ember - update versions #6310
pkimber 58fdc93
prep for release
pkimber 25334cb
Merge pull request #3 from pkimber/6310-update-ember
pkimber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# unconventional js | ||
/blueprints/*/files/ | ||
/vendor/ | ||
|
||
# compiled output | ||
/dist/ | ||
/tmp/ | ||
|
||
# dependencies | ||
/bower_components/ | ||
/node_modules/ | ||
|
||
# misc | ||
/coverage/ | ||
!.* | ||
.*/ | ||
.eslintcache | ||
|
||
# ember-try | ||
/.node_modules.ember-try/ | ||
/bower.json.ember-try | ||
/npm-shrinkwrap.json.ember-try | ||
/package.json.ember-try | ||
/package-lock.json.ember-try | ||
/yarn.lock.ember-try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
name: require('./package').name, | ||
singleQuote: true, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# unconventional js | ||
/blueprints/*/files/ | ||
|
||
# compiled output | ||
/dist/ | ||
|
||
# misc | ||
/coverage/ |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist/ | ||
/tmp/ | ||
|
||
# dependencies | ||
/bower_components/ | ||
/node_modules/ | ||
|
||
# misc | ||
/.env* | ||
/.pnp* | ||
/.sass-cache | ||
/.eslintcache | ||
/connect.lock | ||
/coverage/ | ||
/libpeerconnection.log | ||
/npm-debug.log* | ||
/testem.log | ||
/yarn-error.log | ||
|
||
# ember-try | ||
/.node_modules.ember-try/ | ||
/bower.json.ember-try | ||
/package.json.ember-try |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2020 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
--- | ||
|
||
Originally published under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) (Copyright 2016 Q2 Holdings Inc.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Ember-Select-Light | ||
|
||
   [](https://badge.fury.io/js/ember-select-light) [](https://emberobserver.com/addons/ember-select-light) | ||
|
||
Ember-Select-Light is an Ember Addon focused on simplicity. Just powerful enough to offer expected baseline functionality while being easy to implement, style, and make accessible. | ||
|
||
This addon is [Octane ready](https://emberjs.com/editions/octane/) and follows [ember-component-pattern's for how to best write a Select Element](https://emberjs-1.gitbook.io/ember-component-patterns/form-components/select-element). | ||
|
||
## Getting Started | ||
|
||
```bash | ||
ember install ember-select-light | ||
``` | ||
|
||
### Example Usage | ||
|
||
```handlebars | ||
<SelectLight | ||
@value="turtle" | ||
@options={{array "turtle" "tortoise"}} | ||
@onChange={{this.handleChange}} /> | ||
``` | ||
|
||
#### With an array of objects... | ||
|
||
```handlebars | ||
<SelectLight | ||
@options={{array | ||
(hash value="shortfin" label="Shortfin Shark") | ||
(hash value="mako" label="Mako Shark") | ||
}} /> | ||
``` | ||
|
||
`value` and `label` will be the default object keys used unless `@valueKey="...` and/or `@displayKey="...` are used respectively, like so... | ||
|
||
```handlebars | ||
<SelectLight | ||
@options={{array | ||
(hash myValue="shortfin" myLabel="Shortfin Shark") | ||
(hash myValue="mako" myLabel="Mako Shark") | ||
}} | ||
@valueKey="myValue" | ||
@displayKey="myLabel" /> | ||
``` | ||
|
||
#### As a Yield | ||
|
||
```handlebars | ||
<SelectLight> | ||
<option value="clown">Clown Fish</option> | ||
<option value="cat">Cat Fish</option> | ||
</SelectLight> | ||
``` | ||
|
||
### Other arguments | ||
|
||
Other arguments are spread onto the `<select ...attributes` as you'd expect, allowing you to use common attributes such as `disabled`, `tabindex` and of course `class`. | ||
|
||
```handlebars | ||
<SelectLight class="my-select" disabled="true" /> | ||
``` | ||
|
||
#### Styled | ||
|
||
As shown above we can pass in other arguments like `class="` which allows us to style our Select dropdowns. Below is an example with the Select dropdown styled using [Tailwind CSS](https://tailwindcss.com/). | ||
|
||
[](https://tailwindcss.com/components/forms#custom-select) | ||
|
||
--- | ||
|
||
## Upgrading | ||
|
||
See [the upgrading guide for how to upgrade from previous versions](./UPGRADE.md). | ||
|
||
--- | ||
|
||
## Running | ||
|
||
* `ember serve` | ||
* Visit your app at [http://localhost:4200](http://localhost:4200). | ||
|
||
### Linting | ||
|
||
* `npm run lint:hbs` | ||
* `npm run lint:js` | ||
* `npm run lint:js -- --fix` | ||
|
||
## Contributing | ||
|
||
We love pull requests from everyone. By participating in this project, you agree to abide by the [code of conduct](./code-of-conduct.md) and is subject to the [project license](./LICENSE.md). | ||
|
||
Clone this repo, make your changes with test coverage, push up a fork and [submit a pull request](https://github.com/sharpshark28/ember-select-light/compare). | ||
|
||
Soon after some primary contributors will review your code and submit feedback and hopefully click the fancy green approve button. Any test and linting failures should be caught during the pull request continuous integration environment and human eyes here after. | ||
|
||
## Running Tests | ||
|
||
* `npm run test` (Runs `ember try:each` to test your addon against multiple Ember versions) | ||
* or `ember test` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use strict'; | ||
|
||
const { addonV1Shim } = require('@embroider/addon-shim'); | ||
|
||
module.exports = addonV1Shim(__dirname); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"plugins": [ | ||
"@embroider/addon-dev/template-colocation-plugin", | ||
["@babel/plugin-proposal-decorators", { "legacy": true }], | ||
"@babel/plugin-proposal-class-properties" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"name": "@kb/ember-select-light", | ||
"version": "2.0.8", | ||
"description": "The simple DDAU component built for Ember", | ||
"keywords": [ | ||
"ember-addon" | ||
], | ||
"repository": "https://github.com/ember-a11y/ember-select-light", | ||
"license": "MIT", | ||
"author": "Ava Wroten <[email protected]> (https://www.wroten.me/)", | ||
"directories": { | ||
"doc": "doc", | ||
"test": "tests" | ||
}, | ||
"scripts": { | ||
"build": "rollup --config", | ||
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", | ||
"lint:hbs": "ember-template-lint .", | ||
"lint:hbs:fix": "ember-template-lint . --fix", | ||
"lint:js": "eslint . --cache", | ||
"lint:js:fix": "eslint . --fix", | ||
"prepack": "rollup --config", | ||
"start": "rollup --config --watch", | ||
"test": "echo 'A v2 addon does not have tests, run tests in test-app'", | ||
"test:ember": "ember test", | ||
"test:ember-compatibility": "ember try:each" | ||
}, | ||
"dependencies": { | ||
"@embroider/addon-shim": "^1.8.5" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.22.5", | ||
"@babel/plugin-proposal-class-properties": "^7.18.6", | ||
"@babel/plugin-proposal-decorators": "^7.22.5", | ||
"@embroider/addon-dev": "^3.1.1", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"rollup": "^3.25.1", | ||
"rollup-plugin-copy": "^3.4.0" | ||
}, | ||
"engines": { | ||
"node": "16.* || >= 18" | ||
}, | ||
"ember": { | ||
"edition": "octane" | ||
}, | ||
"ember-addon": { | ||
"app-js": { | ||
"./components/select-light.js": "./dist/_app_/components/select-light.js", | ||
"./helpers/is-equal.js": "./dist/_app_/helpers/is-equal.js" | ||
}, | ||
"main": "addon-main.cjs", | ||
"type": "addon", | ||
"version": 2 | ||
}, | ||
"exports": { | ||
".": "./dist/index.js", | ||
"./*": "./dist/*.js", | ||
"./addon-main.js": "./addon-main.cjs" | ||
}, | ||
"files": [ | ||
"addon-main.cjs", | ||
"dist" | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good as far as avoiding a major SemVer bump goes, provided no other major code changes were required to accommodate the migration.