Skip to content

Commit

Permalink
Resolve failing test scenarios (#580)
Browse files Browse the repository at this point in the history
* resolving anomalies

* upgraded minor version of referenced version of ember-cli

* Added deps error messages complained about

* fixed spelling error in input test

* resolve express upgrade

* updated CONTRIBUTING for pnpm

* resolve dependency issue

* explicitly add @ember/string

* adjusted a few lines per review

* Linter fixes

* explicitly add ember/test-helpers
  • Loading branch information
MelSumner authored Jan 29, 2024
1 parent c3a0066 commit b16efab
Show file tree
Hide file tree
Showing 10 changed files with 1,747 additions and 794 deletions.
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/).
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ 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
- 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 +35,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 +131,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 +193,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 +234,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 +258,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 +279,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
16 changes: 8 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ Releases in this repo are mostly automated using [release-plan](https://github.c

## Preparation

Since the majority of the actual release process is automated, the remaining tasks before releasing are:
Since the majority of the actual release process is automated, the remaining tasks before releasing are:

- correctly labeling **all** pull requests that have been merged since the last release
- updating pull request titles so they make sense to our users
- correctly labeling **all** pull requests that have been merged since the last release
- updating pull request titles so they make sense to our users

Some great information on why this is important can be found at [keepachangelog.com](https://keepachangelog.com/en/1.1.0/), but the overall
guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Internal changes or things that don't fit in any other category.
- breaking - Used when the PR is considered a breaking change.
- enhancement - Used when the PR adds a new feature or enhancement.
- bug - Used when the PR fixes a bug included in a previous release.
- documentation - Used when the PR adds or updates documentation.
- internal - Internal changes or things that don't fit in any other category.

**Note:** `release-plan` requires that **all** PRs are labeled. If a PR doesn't fit in a category it's fine to label it as `internal`

Expand Down
10 changes: 3 additions & 7 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 @@ -108,11 +107,8 @@
"optional": true
}
},
"engines": {
"node": ">= 20"
},
"volta": {
"node": "14.17.5",
"node": "20.11.0",
"yarn": "1.22.11"
},
"ember-addon": {
Expand Down
Loading

0 comments on commit b16efab

Please sign in to comment.