Skip to content

Commit

Permalink
chore: update node to v20 (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya authored Oct 4, 2024
1 parent aa1b657 commit f12855a
Show file tree
Hide file tree
Showing 6 changed files with 19,022 additions and 13,648 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ on:
pull_request:

env:
NODE_VERSION: '14.x'
NODE_VERSION: '20.x'

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

Expand All @@ -58,7 +58,7 @@ jobs:

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
Expand Down Expand Up @@ -88,11 +88,11 @@ jobs:
browser: [chrome]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

Expand All @@ -102,7 +102,7 @@ jobs:

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
Expand Down Expand Up @@ -132,11 +132,11 @@ jobs:
browser: [chrome]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

Expand All @@ -146,7 +146,7 @@ jobs:

- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
Expand Down Expand Up @@ -184,11 +184,11 @@ jobs:
]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v4
with:
node-version: '${{ env.NODE_VERSION }}'

Expand Down
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
/.prettierignore
/.prettierrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
Expand Down
62 changes: 0 additions & 62 deletions .travis.yml

This file was deleted.

83 changes: 41 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# ember-cli-new-version

[![Build Status](https://travis-ci.org/sethwebster/ember-cli-new-version.svg?branch=master)](https://travis-ci.org/sethwebster/ember-cli-new-version)

A convention-based version update notifier. Use it to notify users already on the page that a new version has been deployed.

## Compatibility

* Ember.js v3.20 or above
* Ember CLI v3.20 or above
* Node.js v12 or above
- Ember.js v3.20 or above
- Ember CLI v3.20 or above
- Node.js v20 or above (should still work with older versions)

## Usage

1. Add this add-on as you would any other:
```bash
> ember install ember-cli-new-version
```

```bash
> ember install ember-cli-new-version
```

2. Add a version file to your app, eg:
_./public/VERSION.txt_
_./public/VERSION.txt_

```bash
1.0.0
```
```bash
1.0.0
```

3. Include the component in your view:
```handlebars
<NewVersionNotifier/>
```

```handlebars
<NewVersionNotifier />
```

**voila**!

Expand All @@ -45,24 +45,25 @@ module.exports = function (environment) {
firstCheckInterval: 0,
enableInTests: false,
enableInDev: false,
maxCountInTesting: 10,
maxCountInTesting: 10,
},
};
};
```

----
* `currentVersion` - The current version of the app if not using [Automatic VERSION file creation][#Automatic VERSION file creation] **default: null**
* `versionFileName` - the name of the file on the server to check **default: /VERSION.txt**
* `updateInterval` - the amount of time, in milliseconds, to wait between version checks **default: 60000**
* `firstCheckInterval` - the amount of time, in milliseconds, to wait before the first version check is run after booting the application **default: 0**
* `enableInTests` - Should the version checking run in test environments? **default: false**
* `enableInDev` - Should the version checking run in the dev environments? **default: false**
* `maxCountInTesting` - How many times to check for a new version in tests. **default: 10**
---

- `currentVersion` - The current version of the app if not using [Automatic VERSION file creation][#automatic version file creation] **default: null**
- `versionFileName` - the name of the file on the server to check **default: /VERSION.txt**
- `updateInterval` - the amount of time, in milliseconds, to wait between version checks **default: 60000**
- `firstCheckInterval` - the amount of time, in milliseconds, to wait before the first version check is run after booting the application **default: 0**
- `enableInTests` - Should the version checking run in test environments? **default: false**
- `enableInDev` - Should the version checking run in the dev environments? **default: false**
- `maxCountInTesting` - How many times to check for a new version in tests. **default: 10**

## Automatic Version File Creation

## Automatic Version File Creation ##
If no `VERSION.txt` file exists it will be automatically generated during the build process
If no `VERSION.txt` file exists it will be automatically generated during the build process
with the value of `currentVersion` or the `version` from `package.json`.

### Supports `ember-cli-app-version`
Expand All @@ -73,43 +74,41 @@ All you have to do is install `ember-cli-app-version`.

Then an update is triggered based on full version strings with build metadata such as `1.0.0-beta-2-e1dffe1`.

### Notifier Configuration and Interface ###
----
* `updateMessage` - the message to show to users when update has been detected. There are two tokens allowed in this string: `{newVersion}` and `{oldVersion}` which will replaced with their respective values.
eg. (and **default**). "This application has been updated from version {oldVersion} to {newVersion}. Please save any work, then refresh browser to see changes."
* `showReload` - _true_ shows a reload button the user can click to refresh. _false_ hides the button. **default: true**
* `reloadButtonText` - Sets the text for the default reload button. **default: "Reload"**
### Notifier Configuration and Interface

---

- `updateMessage` - the message to show to users when update has been detected. There are two tokens allowed in this string: `{newVersion}` and `{oldVersion}` which will replaced with their respective values.
eg. (and **default**). "This application has been updated from version {oldVersion} to {newVersion}. Please save any work, then refresh browser to see changes."
- `showReload` - _true_ shows a reload button the user can click to refresh. _false_ hides the button. **default: true**
- `reloadButtonText` - Sets the text for the default reload button. **default: "Reload"**

```handlebars
<NewVersionNotifier
@updateMessage="A new version was released: {newVersion}"
@updateMessage='A new version was released: {newVersion}'
@showReload={{true}}
/>
```

### Custom Notification ###
### Custom Notification

By default the notification is styled as a Bootstrap Alert. If you want custom layouts or
to use a different framework, then you can define your own markup for the notification.

```hbs
<NewVersionNotifier as |version lastVersion reload close|>
<div class="custom-notification">
<div class='custom-notification'>
Reload to update to the new version ({{version}}) of this application
<button type="button" {{on "click" reload}}>Reload</button>
<button type="button" {{on "click" close}}>Close</button>
<button type='button' {{on 'click' reload}}>Reload</button>
<button type='button' {{on 'click' close}}>Close</button>
</div>
</NewVersionNotifier>
```

Contributing
------------------------------------------------------------------------------
## Contributing

See the [Contributing](CONTRIBUTING.md) guide for details.


License
------------------------------------------------------------------------------
## License

This project is licensed under the [MIT License](LICENSE.md).
Loading

0 comments on commit f12855a

Please sign in to comment.