Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ui/packages/consul-ui/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ app/utils/dom/event-target/event-target-shim/event.js
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
2 changes: 1 addition & 1 deletion ui/packages/consul-ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module.exports = {
}),
},
{
// Test files:
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
Expand Down
45 changes: 45 additions & 0 deletions ui/packages/consul-ui/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: npm
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint

test:
name: "Test"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: npm
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: npm test
3 changes: 3 additions & 0 deletions ui/packages/consul-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@
# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
4 changes: 4 additions & 0 deletions ui/packages/consul-ui/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
/coverage/
!.*
.eslintcache
.lint-todo/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
4 changes: 2 additions & 2 deletions ui/packages/consul-ui/app/instance-initializers/href-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: BUSL-1.1
*/

import LinkComponent from '@ember/routing/link-component';
import { LinkComponent as LegacyLinkComponent } from '@ember/legacy-built-in-components';

export class HrefTo {
constructor(container, target) {
Expand Down Expand Up @@ -57,7 +57,7 @@ export class HrefTo {
const id = $el.id;
if (id) {
const componentInstance = this.applicationInstance.lookup('-view-registry:main')[id];
isLinkComponent = componentInstance && componentInstance instanceof LinkComponent;
isLinkComponent = componentInstance && componentInstance instanceof LegacyLinkComponent;
}
return isLinkComponent;
}
Expand Down
3 changes: 2 additions & 1 deletion ui/packages/consul-ui/app/locations/fsm-with-optional.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ export default class FSMWithOptionalLocation {
}

constructor(owner, doc, env) {
this.container = Object.entries(owner)[0][1];
const ownerSymbol = Object.getOwnPropertySymbols(owner);
this.container = owner[ownerSymbol[0]];

// add the route/state change handler
this.route = route.bind(this);
Expand Down
2 changes: 1 addition & 1 deletion ui/packages/consul-ui/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "3.28.6",
"version": "4.0.0",
"blueprints": [
{
"name": "app",
Expand Down
19 changes: 0 additions & 19 deletions ui/packages/consul-ui/config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,6 @@
// therefore used by humans also. Therefore please feel free to be liberal
// with comments.

// We are moving to a rough ~2 years back support rather than a 2 versions
// back support. This strikes a balance between folks who need to get a job
// done in the Consul UI and keeping the codebase modern and being able to use
// modern Web Platform features. This is not set in stone but please consult
// with the rest of the team before bumping forwards (or backwards)
// We pin specific versions rather than use a relative value so we can choose
// to bump and it's clear what is supported.

///

// async/await support came before the below specified versions for Chrome,
// Firefox and Edge. Async/await is is the newest ES6 feature we are not
// transpiling. Safari's template literal support is a little problematic during
// v12 in that it has a GC bug for tagged template literals. We don't currently
// rely on this functionality so the bug wouldn't effect us, but in order to use
// browser versions as a measure for ES6 features we need to specify Safari 13
// for native, non-transpiled template literals. In reality template literals
// came in Safari 9.1. Safari's async/await support came in Safari 10.

module.exports = {
browsers: ['Chrome 79', 'Firefox 72', 'Safari 13', 'Edge 79'],
};
20 changes: 10 additions & 10 deletions ui/packages/consul-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@docfy/ember": "^0.4.1",
"@ember/legacy-built-in-components": "^0.5.0",
"@ember/optional-features": "^2.0.0",
"@ember/render-modifiers": "^1.0.2",
"@ember/test-helpers": "^2.9.6",
Expand Down Expand Up @@ -105,14 +106,14 @@
"ember-basic-dropdown": "^8.6.2",
"ember-can": "^4.2.0",
"ember-changeset-validations": "~3.15.2",
"ember-cli": "3.28.6",
"ember-cli": "4.0.0",
"ember-cli-app-version": "^5.0.0",
"ember-cli-babel": "^7.26.10",
"ember-cli-code-coverage": "^1.0.0-beta.4",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-deprecation-workflow": "^2.1.0",
"ember-cli-flash": "^2.1.1",
"ember-cli-htmlbars": "^5.7.2",
"ember-cli-htmlbars": "^6.0.1",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-page-object": "^1.17.11",
"ember-cli-sass": "^11.0.1",
Expand All @@ -123,7 +124,7 @@
"ember-collection": "^3.0.0",
"ember-compatibility-helpers": "^1.2.5",
"ember-composable-helpers": "^5.0.0",
"ember-data": "~3.28.6",
"ember-data": "~4.0.2",
"ember-data-model-fragments": "5.0.0-beta.8",
"ember-decorators": "^6.1.1",
"ember-element-helper": "^0.8.8",
Expand All @@ -133,12 +134,11 @@
"ember-intl": "^5.7.0",
"ember-load-initializers": "^2.1.2",
"ember-math-helpers": "^2.4.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-modifier": "^4.1.0",
"ember-named-blocks-polyfill": "^0.2.5",
"ember-on-helper": "^0.1.0",
"ember-on-resize-modifier": "^2.0.2",
"ember-page-title": "^6.2.2",
"ember-page-title": "^7.0.0",
"ember-power-select": "^8.8.0",
"ember-power-select-with-create": "^3.0.1",
"ember-qunit": "^5.1.5",
Expand All @@ -149,18 +149,18 @@
"ember-router-helpers": "^0.4.0",
"ember-set-helper": "^2.0.0",
"ember-sinon-qunit": "5.0.0",
"ember-source": "3.28.8",
"ember-source": "4.0.1",
"ember-stargate": "^0.2.0",
"ember-string-fns": "^1.4.0",
"ember-template-lint": "^2.21.0",
"ember-test-selectors": "^5.0.0",
"ember-test-selectors": "^7.0.0",
"ember-truth-helpers": "^3.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^10.5.8",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-qunit": "^6.2.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.2.0",
"express": "^5.1.0",
"faker": "^5.5.3",
"flat": "^5.0.0",
Expand All @@ -176,7 +176,7 @@
"prettier": "^2.5.1",
"pretty-ms": "^7.0.1",
"qunit": "^2.17.2",
"qunit-dom": "^1.6.0",
"qunit-dom": "^2.0.0",
"react-is": "^17.0.1",
"refractor": "^3.5.0",
"remark-autolink-headings": "^6.0.1",
Expand Down
Loading
Loading