-
Notifications
You must be signed in to change notification settings - Fork 90
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 #576
Convert to v2 addon #576
Conversation
with: | ||
node-version: 12.x | ||
cache: npm | ||
|
||
- name: npm8 | ||
run: npm install -g npm@8 |
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@8
is needed for workspaces support
@@ -1,19 +0,0 @@ | |||
Copyright (c) 2015-2016 Santiago Ferreira |
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.
deleted in favor of LICENSE.md
* Ember.js v3.16 or above | ||
* Ember CLI v2.13 or above | ||
* Node.js v10 or above | ||
* Node.js v12 or above |
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.
engines
field already requires v12, hence it's not technically dropping support for Node.js v10 but a correction in readme
|
||
module.exports = { | ||
root: true, | ||
parser: '@babel/eslint-parser', |
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 is for ESLint v8 support
var setupTestHooks = blueprintHelpers.setupTestHooks; | ||
var emberNew = blueprintHelpers.emberNew; | ||
var emberGenerateDestroy = blueprintHelpers.emberGenerateDestroy; | ||
let blueprintHelpers = require('ember-cli-blueprint-test-helpers/helpers'); |
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.
changes in this files made to make prettier happy
@@ -1,5 +1,5 @@ | |||
import { $, buildSelector, findClosestValue, guardMultiple } from './helpers'; | |||
import { getAdapter } from '../adapters'; | |||
import { getAdapter } from '../adapters/index'; |
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.
rollup wasn't happy with previous path :/
|
||
let jQuery; | ||
|
||
if (macroCondition(dependencySatisfies('@ember/jquery', '*'))) { |
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 is to use jquery
shipped by @ember/jquery
if present, otherwise includes own jquery
@@ -1,5 +1,4 @@ | |||
import { resolve } from 'rsvp'; | |||
import { getAdapter } from '../adapters'; | |||
import { getAdapter } from '../adapters/index'; |
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 changed to make rollup happy and rsvp
removed as ember-source
package ships rsvp
bundled in hence we can't ship own copy.
Luckily, we could easily switch to native promise
"private": true, | ||
"description": "Docs app for ember-cli-page-object", | ||
"scripts": { | ||
"build": "node ./index.js" |
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.
now docs/guides completely separated from the addon and the test addon
@@ -2,12 +2,17 @@ | |||
|
|||
module.exports = { | |||
root: true, | |||
parser: '@babel/eslint-parser', |
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 allows using ESLint v8
Thank you very much for this work! I'll do my best to check it this weekend. |
Overall looks fantastic! Me, as a not an active monorepo user, is mostly interested in how to release the thing? At the moment we have the following release instructions https:/san650/ember-cli-page-object/wiki/How-to-release-a-new-version. May you provide steps to release the |
any chance we can get this released -- I'm trying to upgrade to ember 4 / deal with ember 3.28 deprecations and ember-cli-page-object is my last blocker @ro0gr , re: releasing the addon folder with "just" be for docs, looks like you use this: https:/san650/ember-cli-page-object/blob/master/docs.js we'd need to test it out, but I think you'd move that file into the docs folder and just invoke it. |
@SergeAstapov is this a non-breaking change? (other than now requiring ember-auto-import@v2?) |
@ro0gr I'm sorry, missed you question. TL;DR I will create a PR adding release-it config and adding Longer answer. As a pros, it automatically publishes to npm, creates GitHub release, generates changelog and monorepo setup is super simple (thanks to release-it-yarn-workspaces plugin) The only downside (in my opinion) - it requires labels to be added to pull requests. semantic-release or standard-version could be another option, however to me they are not that straightforward and easy to use as @NullVoxPopuli correct, no breaking changes except ember-auto-import@v2 (which *is* a breaking change). |
docs: fix api docs generation
@SergeAstapov thank you for the update! I do really like an idea of release automation. However, I don't want to block this PR with it, since it's already a great move! I think for the time being we can live with a manual release process, while we have it clearly defined. And we can deliver release automation separately. My question for now is how do we intend to release the whole thing? To me it looks like it's fine just release the What do you think about the preferred release strategy, if leave an exact release tool out of the equation for now? |
@ro0gr sure, totally makes sense to keep release process as is and I'll submit follow up PR where we can work on automation separately. We just should make following changes in https:/san650/ember-cli-page-object/wiki/How-to-release-a-new-version:
Rest of the steps don't seem to change. |
Hey @SergeAstapov, thanks for the update! I'm trying to figure out CI failure for the test scenarios w/o a lock file:
I think this is first time I see this kind of error. The current v2-beta branch does not have this failure(see #578). Do you have an idea which change can cause this? |
Alright, seems like downgrading to the "@ember/test-helpers": "~2.7.0" does the trick. For some reason we end up in the https:/emberjs/ember-test-helpers/blob/2b1ddcc91a971e1a3e1509d55f711778c32984b1/addon-test-support/%40ember/test-helpers/-internal/get-component-manager.ts#L14-L17, which does not make sense to me and might mean some underlying bug there. I'll need some time to wrap my head around this issue. Meanwhile feel free to add a commit to downgrade the test helpers if you want for now. Anyways, I'll do my best to finally cut the release this week. |
"ember-cli-doc-server": "1.1.0", | ||
"ember-cli-htmlbars": "^6.0.1", | ||
"ember-cli-inject-live-reload": "^1.8.2", | ||
"ember-cli-page-object": "2.0.0-beta.3", |
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've just noticed this, and I wonder if this is supposed to be a relative path, or use *
instead of the hardcoded version?
Well, I figured out test failures and fixed it by migrating to pnpm #579 |
@SergeAstapov thank you! 🚀 |
Yet another situation where |
just published it as 2.0.0-beta.4 |
Follows Porting an Addon to V2 guide