-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Convert to V2 addon #411
Convert to V2 addon #411
Conversation
0ca168c
to
bf02610
Compare
bf02610
to
8ce8d1b
Compare
9e98b01
to
f6d56df
Compare
@herzzanu ok to wait with merging this until we release v2? |
@SkoebaSteve are we good to merge at this point or waiting for something else? Happy to help and unblock the situation. |
.github/workflows/ci.yml
Outdated
@@ -46,7 +50,7 @@ jobs: | |||
- name: Install Dependencies | |||
run: yarn install --frozen-lockfile | |||
- name: Run Tests | |||
run: yarn test:ember | |||
run: yarn test |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
.github/workflows/ci.yml
Outdated
@@ -77,4 +80,5 @@ jobs: | |||
- name: Install Dependencies | |||
run: yarn install --frozen-lockfile | |||
- name: Run Tests | |||
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} | |||
run: yarn ember try:one ${{ matrix.try-scenario }} | |||
working-directory: ./test-app |
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.
working-directory: ./test-app | |
working-directory: test-app |
We can make it even a bit shorter 😄
Maybe we can add a prettier configuration for the addon as well? |
ember-launch-darkly/LICENSE.md
Outdated
@@ -0,0 +1,9 @@ | |||
The MIT License (MIT) |
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 file can be left on the root level, it is copied by rollup when publishing
ember-launch-darkly/README.md
Outdated
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.
README can be left on the root level as well, it is copied by rollup when publishing:
// Copy Readme and License into published package
copy({
targets: [
{ src: '../README.md', dest: '.' },
{ src: '../LICENSE.md', dest: '.' },
],
}),
test-app/ember-cli-build.js
Outdated
// please specify an object with the list of modules as keys | ||
// along with the exports of each module as its value. | ||
|
||
return app.toTree(); |
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.
Should we keep maybeEmbroider
?
const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
skipBabel: [
{
package: 'qunit',
},
],
});
ember-launch-darkly/package.json
Outdated
@@ -0,0 +1,79 @@ | |||
{ | |||
"name": "ember-launch-darkly", | |||
"version": "2.2.0", |
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.
Isn't it v3.0.0 now?
ember-launch-darkly/package.json
Outdated
}, | ||
"dependencies": { | ||
"@embroider/addon-shim": "^1.0.0", | ||
"launchdarkly-js-client-sdk": "^2.24.2", |
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.
It was upgraded to ^3.1.1
ember-launch-darkly/package.json
Outdated
"@rollup/plugin-babel": "^6.0.3", | ||
"babel-eslint": "^10.1.0", | ||
"concurrently": "^7.6.0", | ||
"ember-source": "4.11.0", |
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.
Do you think we can add it as a peer dep? Example: https://github.com/adopted-ember-addons/ember-launch-darkly/blob/master/package.json#L77
That's a great idea. I prefer to add it in a separate PR, once we merge, since it was not there before. |
plugins: [ | ||
// These are the modules that users should be able to import from your | ||
// addon. Anything not listed here may get optimized away. | ||
addon.publicEntrypoints(['**/*.js']), |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
// "app" tree. Things in here should also be in publicEntrypoints above, but | ||
// not everything in publicEntrypoints necessarily needs to go here. | ||
addon.appReexports(['helpers/**/*.js']), | ||
|
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
test-app/.editorconfig
Outdated
@@ -0,0 +1,19 @@ | |||
# EditorConfig helps developers define and maintain consistent |
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.
Should it stay at the root level? 🤔
@@ -0,0 +1,12 @@ | |||
'use strict'; | |||
|
|||
module.exports = { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
test-app/README.md
Outdated
|
||
* `git clone <repository-url>` this repository | ||
* `cd test-app` | ||
* `npm install` |
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.
* `npm install` | |
* `yarn install` |
test-app/README.md
Outdated
* `npm run lint` | ||
* `npm run lint:fix` |
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.
* `npm run lint` | |
* `npm run lint:fix` | |
* `yarn lint` | |
* `yarn lint:fix` |
|
||
import { variation } from 'ember-launch-darkly'; | ||
|
||
export default class IdentifiedUserController extends Controller { | ||
get shape() { | ||
return capitalize(variation('shape')); | ||
return variation('shape'); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
<br /> | ||
<br /> | ||
|
||
{{#let (component (ensure-safe-component this.shape)) as |Shape|}} |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
"--yarn", | ||
"--no-welcome" | ||
"--no-welcome", | ||
"--ci-provider=github" |
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.
"--ci-provider=github" | |
"--yarn" |
@@ -23,18 +23,8 @@ module.exports = async function () { | |||
}, | |||
}, | |||
}, | |||
{ | |||
name: 'ember-lts-4.4', |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
edition: 'classic', | ||
}, | ||
}), | ||
embroiderOptimized({ |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
"description": "Small description for test-app goes here", | ||
"repository": "", | ||
"license": "MIT", | ||
"author": "", |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -11,9 +11,7 @@ module.exports = { | |||
ci: [ | |||
// --no-sandbox is needed when running Chrome inside a container | |||
process.env.CI ? '--no-sandbox' : null, | |||
process.platform === 'darwin' ? '--crash-dumps-dir=/tmp' : null, // Fix for https://superuser.com/questions/1292863/chrome-crashpad-crashes-on-xattr |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
ea2a036
to
31f7e9a
Compare
"./-sdk/initialize": "./dist/-sdk/initialize.js", | ||
"./-sdk/variation": "./dist/-sdk/variation.js", | ||
"./addon-main.js": "./addon-main.js" | ||
} |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
I think we can keep them Added.
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.
Alright, thanks!
31f7e9a
to
6a57006
Compare
@herzzanu This might be a bit odd question but I wanted to help the community to move some addons from V1 to V2 so... how did you know what to do? 😅 Is there some "v1 to v2 TODO list" resource? |
Great stuff @herzzanu! Thank you! |
No description provided.