Skip to content
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

Resolve failing test scenarios #580

Merged
merged 11 commits into from
Jan 29, 2024
Merged
72 changes: 10 additions & 62 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,12 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: thursday
time: "02:00"
open-pull-requests-limit: 10
versioning-strategy: increase
ignore:
- dependency-name: ember-cli
versions:
- 3.24.0
- 3.25.0
- 3.25.1
- 3.25.2
- 3.25.3
- 3.26.0
- dependency-name: eslint
versions:
- 7.18.0
- 7.19.0
- 7.20.0
- 7.21.0
- 7.22.0
- 7.23.0
- 7.24.0
- dependency-name: release-it
versions:
- 14.2.2
- 14.3.0
- 14.4.0
- 14.4.1
- 14.5.0
- 14.5.1
- dependency-name: ember-template-lint
versions:
- 2.17.0
- 2.18.1
- 2.20.0
- 3.0.1
- 3.1.1
- 3.2.0
- dependency-name: eslint-plugin-ember
versions:
- 10.1.2
- 10.2.0
- 10.3.0
- dependency-name: ember-cli-htmlbars
versions:
- 5.3.1
- 5.3.2
- 5.4.0
- 5.6.2
- 5.6.4
- 5.7.0
- dependency-name: ember-source
versions:
- 3.24.1
- 3.25.1
- 3.25.3
commit-message:
prefix: ""
- package-ecosystem: npm
directory: '/'
schedule:
interval: weekly
day: thursday
time: '02:00'
open-pull-requests-limit: 10
versioning-strategy: increase
commit-message:
prefix: ''
20 changes: 10 additions & 10 deletions .github/workflows/plan-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- main
- master
pull_request:
types:
types:
- labeled

concurrency:
Expand All @@ -14,7 +14,7 @@ concurrency:

jobs:
check-plan:
name: "Check Release Plan"
name: 'Check Release Plan'
runs-on: ubuntu-latest
outputs:
command: ${{ steps.check-release.outputs.command }}
Expand Down Expand Up @@ -51,20 +51,20 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20.x

- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install --frozen-lockfile
- name: "Generate Explanation and Prep Changelogs"

- name: 'Generate Explanation and Prep Changelogs'
id: explanation
run: |
set -x

pnpm release-plan prepare

echo 'text<<EOF' >> $GITHUB_OUTPUT
jq .description .release-plan.json -r >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
Expand All @@ -74,8 +74,8 @@ jobs:
- uses: peter-evans/create-pull-request@v5
with:
commit-message: "Prepare Release using 'release-plan'"
author: "github-actions[bot] <github-actions-bot@users.noreply.github.com>"
labels: "internal"
author: 'github-actions[bot] <github-actions-bot@users.noreply.github.com>'
labels: 'internal'
branch: release-preview
title: Prepare Release
body: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

jobs:
check-plan:
name: "Check Release Plan"
name: 'Check Release Plan'
runs-on: ubuntu-latest
outputs:
command: ${{ steps.check-release.outputs.command }}
Expand All @@ -34,7 +34,7 @@ jobs:
run: if git diff --name-only HEAD HEAD~1 | grep -w -q ".release-plan.json"; then echo "command=release"; fi >> $GITHUB_OUTPUT

publish:
name: "NPM Publish"
name: 'NPM Publish'
runs-on: ubuntu-latest
needs: check-plan
if: needs.check-plan.outputs.command == 'release'
Expand All @@ -46,17 +46,17 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20.x
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
registry-url: 'https://registry.npmjs.org'

- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install --frozen-lockfile
- name: npm publish
run: pnpm release-plan publish

env:
GITHUB_AUTH: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@

* `git clone <repository-url>`
* `cd ember-pikaday`
* `yarn install`
* `pnpm install`

## Linting

* `yarn lint:hbs`
* `yarn lint:js`
* `yarn lint:js --fix`
* `pnpm lint:hbs`
* `pnpm lint:js`
* `pnpm lint:js --fix`

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions
* `pnpm test` – Runs the test suite(s)
* `pnpm test:ember --server` – Runs the test suite in "watch mode"
* `pnpm test:ember-compatibility` – Runs the test suite against multiple Ember versions

## Running the test-app application

* `ember serve`
* `pnpm start`
* Visit the test-app application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ ember-pikaday provides a datepicker modifier & components for Ember using the Pi

Prerequisites:

- Ember.js v3.25 or above
- Node.js v12 or above
- Ember.js v3.28 or above
- Node.js v20 or above
MelSumner marked this conversation as resolved.
Show resolved Hide resolved
- ember-auto-import 2.0 or above

Optional prerequisites:

- If you use the backward-compatible `<PikadayInput>` or `<PikadayInputless>` components, your app must depend on either `moment` or `moment-timezone` and you should remember to configure your locale and timezone requirements. See [Using Moment.js in Ember Apps & Addons](https://github.com/adopted-ember-addons/ember-moment#using-momentjs-in-ember-apps--addons).
- But if you only use the new `<input {{pikaday}} />` modifier, `moment` or `moment-timezone` are optional. Pikday itself uses them if they present, but doesn't require them.
- But if you only use the new `<input {{pikaday}} />` modifier, `moment` or `moment-timezone` are optional. Pikaday itself uses them if they present, but doesn't require them.

Anti-prerequisites:

Expand All @@ -36,7 +36,7 @@ import 'ember-pikaday/pikaday.css';
export { default } from 'ember-pikaday/modifiers/pikaday';
```

This guarantees that the CSS will load whenever your app uses the `{{pikaday}}` modifier (and the `{{pikday}}` modifier is used internally by all the other provided components, so this covers them too).
This guarantees that the CSS will load whenever your app uses the `{{pikaday}}` modifier (and the `{{pikaday}}` modifier is used internally by all the other provided components, so this covers them too).

## Usage

Expand Down Expand Up @@ -132,7 +132,7 @@ the maximum selectable year to the current year.
</label>
```

The `readonly` attribute is supported as binding so you can make the input readonly for mobile or other usecases.
The `readonly` attribute is supported as binding so you can make the input readonly for mobile or other use cases.

```handlebars
<label>
Expand Down Expand Up @@ -194,7 +194,7 @@ The `maxDate` attribute is supported as a binding so you can set the latest date

#### Return dates in UTC time zone

The date returned by ember-pikaday is in your local time zone due to the JavaScript default behaviour of `new Date()`. This can lead to problems when your application converts the date to UTC. In additive time zones (e.g. +0010) the resulting converted date could be yesterdays date. You can force the component to return a date with the UTC time zone by passing `useUTC=true` to it.
The date returned by ember-pikaday is in your local time zone due to the JavaScript default behavior of `new Date()`. This can lead to problems when your application converts the date to UTC. In additive time zones (e.g. +0010) the resulting converted date could be yesterdays date. You can force the component to return a date with the UTC time zone by passing `useUTC=true` to it.

```handlebars
<label>
Expand Down Expand Up @@ -235,7 +235,7 @@ Localizing the datepicker is possible in two steps. To localize the output of th
app.import('node_modules/moment/locale/de.js');
```

To localize the datepicker itself, this is the popup you see after clicking the input, a little more work is necessary. The prefered way to do this is to implement a custom component that extends the `PikadayInput` component and customizes the `i18n` attribute. The following example uses the translations provided by Moment.js - naturally you can use your own localized strings instead.
To localize the datepicker itself, this is the popup you see after clicking the input, a little more work is necessary. The preferred way to do this is to implement a custom component that extends the `PikadayInput` component and customizes the `i18n` attribute. The following example uses the translations provided by Moment.js - naturally you can use your own localized strings instead.

```js
// app/components/pikaday-input.js
Expand All @@ -259,7 +259,7 @@ export default PikadayInput.extend({

## Examples

### Show `ember-pikaday` when clicking on a button:
### Show `ember-pikaday` when clicking on a button

```handlebars
<button {{action 'togglePika'}}>Show Pika</button>
Expand All @@ -280,7 +280,7 @@ export default Ember.Controller.extend({
});
```

### Show `ember-pikaday` when hovering over a div:
### Show `ember-pikaday` when hovering over a div

```handlebars
<div
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-decorators": "^7.16.7",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.6.0",
"@ember/test-helpers": "^2.9.4",
"@embroider/addon-dev": "^4.1.3",
"@embroider/compat": "npm:@embroider/compat@latest",
"@embroider/core": "npm:@embroider/core@latest",
Expand All @@ -59,8 +59,7 @@
"@rollup/plugin-babel": "^5.3.0",
"babel-eslint": "^10.1.0",
"ember-auto-import": "^2.3.0",
"ember-cli": "~3.28.5",
"ember-cli-3.25": "npm:ember-cli@~3.25.0",
"ember-cli": "~3.28.6",
"ember-cli-babel": "^7.26.10",
"ember-cli-beta": "npm:ember-cli@beta",
"ember-cli-htmlbars": "^5.7.2",
Expand Down Expand Up @@ -109,10 +108,10 @@
}
},
"engines": {
"node": ">= 20"
"node": ">=20.11.0"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove the node engine from the package because in the consuming app it doesn't matter what version of node it's using

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I even leave the "engines" section in there at all then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no we don't need the engines section any more 👍

"volta": {
"node": "14.17.5",
"node": "20.11.0",
"yarn": "1.22.11"
},
"ember-addon": {
Expand Down
Loading
Loading