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

Ember Upgrade to 3.24 #13443

Merged
merged 53 commits into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
97a32b9
Update browserslist
hashishaw Nov 22, 2021
552234c
Add browserslistrc
hashishaw Nov 23, 2021
ce3577e
ember-cli-update --to 3.26, fix conflicts
hashishaw Nov 23, 2021
e225b1b
Run codemodes that start with ember-*
hashishaw Nov 23, 2021
9425a82
More codemods - before cp*
hashishaw Nov 23, 2021
12d0bc2
More codemods (curly data-test-*)
hashishaw Dec 3, 2021
8454ce5
WIP ember-basic-dropdown template errors
hashishaw Dec 3, 2021
eb35049
updates ember-basic-dropdown and related deps to fix build issues
zofskeez Dec 7, 2021
04568b8
updates basic dropdown instances to new version API
zofskeez Dec 7, 2021
0bb526a
updates more deps -- ember-template-lint is working again
zofskeez Dec 8, 2021
68f15d1
runs no-implicit-this codemod
zofskeez Dec 8, 2021
c6e6d09
creates and runs no-quoteless-attributes codemod
zofskeez Dec 9, 2021
13d2f95
runs angle brackets codemod
zofskeez Dec 9, 2021
5d36622
updates lint:hbs globs to only touch hbs files
zofskeez Dec 9, 2021
1badccb
removes yield only templates
zofskeez Dec 9, 2021
4f5b79d
creates and runs deprecated args transform
zofskeez Dec 9, 2021
883c52a
supresses lint error for invokeAction on LinkTo component
zofskeez Dec 9, 2021
0891c2f
resolves remaining ambiguous path lint errors
zofskeez Dec 10, 2021
9f8121a
resolves simple-unless lint errors
zofskeez Dec 10, 2021
352125c
adds warnings for deprecated tagName arg on LinkTo components
zofskeez Dec 10, 2021
1939cb2
adds warnings for remaining curly component invocation
zofskeez Dec 10, 2021
681cf5f
updates global template lint rules
zofskeez Dec 10, 2021
687edaf
resolves remaining template lint errors
zofskeez Dec 10, 2021
6e9dbe3
disables some ember specfic lint rules that target pre octane patterns
zofskeez Dec 10, 2021
8845ab4
js lint fix run
zofskeez Dec 10, 2021
bb02e53
resolves remaining js lint errors
zofskeez Dec 10, 2021
5f5578b
fixes test run
zofskeez Dec 10, 2021
4df7c5f
adds npm-run-all dep
zofskeez Dec 10, 2021
f47f719
fixes test attribute issues
zofskeez Dec 10, 2021
2aa178b
fixes console acceptance tests
zofskeez Dec 10, 2021
46960b9
fixes tests
zofskeez Dec 14, 2021
da41ef5
adds yield only wizard/tutorial-active template
zofskeez Dec 14, 2021
4922d7e
fixes more tests
zofskeez Dec 14, 2021
b2552bb
attempts to fix more flaky tests
zofskeez Dec 14, 2021
bfec6ee
removes commented out settled in transit test
zofskeez Dec 14, 2021
2261e0b
updates deprecations workflow and adds initializer to filter by version
zofskeez Dec 14, 2021
4354244
updates flaky policies acl old test
zofskeez Dec 14, 2021
d13f9a5
updates to flaky transit test
zofskeez Dec 14, 2021
5252344
merges main and fixes conflicts
zofskeez Dec 14, 2021
e460cc2
bumps ember deps down to LTS version
zofskeez Dec 15, 2021
93b552f
runs linters after main merge
zofskeez Dec 15, 2021
d84037c
fixes client count tests after bad merge conflict fixes
zofskeez Dec 15, 2021
42e4871
fixes client count history test
zofskeez Dec 15, 2021
0f529e9
more updates to lint config
zofskeez Dec 15, 2021
e7c16df
another round of hbs lint fixes after extending stylistic rule
zofskeez Dec 16, 2021
8f58b7b
updates lint-staged commands
zofskeez Dec 16, 2021
9de49a2
removes indent eslint rule since it seems to break things
zofskeez Dec 16, 2021
3108d3f
fixes bad attribute in transform-edit-form template
zofskeez Dec 16, 2021
29023fc
test fixes
zofskeez Dec 16, 2021
6f28e78
fixes enterprise tests
zofskeez Dec 16, 2021
fe89c4e
adds changelog
zofskeez Dec 16, 2021
f4f56d5
removes deprecated ember-concurrency-test-waiters dep and adds @ember…
zofskeez Dec 17, 2021
a41bbb9
flaky test fix
zofskeez Dec 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions ui/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
defaults
not IE 11
maintained node versions
2 changes: 2 additions & 0 deletions ui/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
Expand Down
21 changes: 14 additions & 7 deletions ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,39 @@ module.exports = {
legacyDecorators: true,
},
},
plugins: ['ember', 'prettier'],
extends: ['eslint:recommended', 'plugin:ember/recommended', 'prettier'],
plugins: ['ember'],
extends: ['eslint:recommended', 'plugin:ember/recommended', 'plugin:prettier/recommended'],
env: {
browser: true,
es6: true,
},
rules: {
// TODO revisit once figure out how to replace, added during upgrade to 3.20
'ember/no-new-mixins': 'off',
'ember/no-mixins': 'off',
'no-console': 'warn',
'ember/no-mixins': 'warn',
'ember/no-new-mixins': 'off', // should be warn but then every line of the mixin is green
// need to be fully glimmerized before these rules can be turned on
'ember/no-classic-classes': 'off',
'ember/no-classic-components': 'off',
'ember/no-actions-hash': 'off',
'ember/require-tagless-components': 'off',
'ember/no-component-lifecycle-hooks': 'off',
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.prettierrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'lib/*/index.js',
'scripts/start-vault.js',
'server/**/*.js',
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2018,
},
env: {
browser: false,
Expand Down
1 change: 1 addition & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

# misc
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
Expand Down
21 changes: 21 additions & 0 deletions ui/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
5 changes: 0 additions & 5 deletions ui/.prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions ui/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

module.exports = {
singleQuote: true,
trailingComma: 'es5',
printWidth: 110,
};
6 changes: 3 additions & 3 deletions ui/.storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ function loadStories() {
// automatically import all files ending in *.stories.js
const appStories = require.context('../stories', true, /.stories.js$/);
const addonAndRepoStories = require.context('../lib', true, /.stories.js$/);
appStories.keys().forEach(filename => appStories(filename));
addonAndRepoStories.keys().forEach(filename => addonAndRepoStories(filename));
appStories.keys().forEach((filename) => appStories(filename));
addonAndRepoStories.keys().forEach((filename) => addonAndRepoStories(filename));
}

addParameters({
viewport: { viewports: INITIAL_VIEWPORTS },
options: { theme },
});

addDecorator(storyFn => {
addDecorator((storyFn) => {
const { template, context } = storyFn();

// flight icon sprite must be inserted into dom for icon lookup via use element
Expand Down
31 changes: 10 additions & 21 deletions ui/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
'use strict';

module.exports = {
extends: 'recommended',
extends: 'octane',
rules: {
// should definitely move to template only
// glimmer components for this one
'no-partial': false,

// these need to be looked into, but
// may be a bigger change
'no-invalid-interactive': false,
'simple-unless': false,

'self-closing-void-elements': false,
'no-unnecessary-concat': false,
'no-quoteless-attributes': false,
'no-nested-interactive': false,

// not sure we'll ever want these on,
// would be nice but if prettier isn't doing
// it for us, then not sure it's worth it
'attribute-indentation': false,
'block-indentation': false,
quotes: false,
'no-bare-strings': 'off',
'no-action': 'off',
'no-duplicate-landmark-elements': 'warn',
'no-implicit-this': {
allow: ['supported-auth-backends'],
},
'require-input-label': 'off',
'no-down-event-binding': 'warn',
},
ignore: ['lib/story-md'],
};
128 changes: 85 additions & 43 deletions ui/MODULE_REPORT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,90 @@
## Module Report
### Unknown Global

**Global**: `Ember.testing`

**Location**: `app/components/auth-jwt.js` at line 9

```js

/* eslint-disable ember/no-ember-testing-in-module-scope */
const WAIT_TIME = Ember.testing ? 0 : 500;
const ERROR_WINDOW_CLOSED =
'The provider window was closed before authentication was complete. Please click Sign In to try again.';
```

### Unknown Global

**Global**: `Ember.testing`

**Location**: `app/components/auth-form.js` at line 252

```js

delayAuthMessageReminder: task(function*() {
if (Ember.testing) {
this.showLoading = true;
yield timeout(0);
```

### Unknown Global

**Global**: `Ember.testing`

**Location**: `app/routes/vault/cluster/logout.js` at line 30

```js
this.flashMessages.clearMessages();
this.permissions.reset();
if (Ember.testing) {
// Don't redirect on the test
this.replaceWith('vault.cluster.auth', { queryParams: { with: authType } });
```

### Unknown Global

**Global**: `Ember.testing`

**Location**: `app/components/mount-backend-form.js` at line 100

```js
capabilities = yield this.store.findRecord('capabilities', `${path}/config`);
} catch (err) {
if (Ember.testing) {
//captures mount-backend-form component test
yield mountModel.save();
```

### Unknown Global

**Global**: `Ember.testing`

**Location**: `app/components/oidc-consent-block.js` at line 47

```js
let { redirect, ...params } = this.args;
let redirectUrl = this.buildUrl(redirect, params);
if (Ember.testing) {
this.args.testRedirect(redirectUrl.toString());
} else {
```

### Unknown Global

**Global**: `Ember.testing`

**Location**: `lib/core/addon/components/ttl-form.js` at line 82

```js
this.set('time', parsedTime);
this.handleChange();
if (Ember.testing) {
return;
}
```

### Unknown Global

**Global**: `Ember.onerror`

**Location**: `tests/helpers/wait-for-error.js` at line 5
Expand Down Expand Up @@ -143,34 +227,6 @@ export default function waitForError(opts) {

**Global**: `Ember.testing`

**Location**: `app/components/auth-jwt.js` at line 9

```js

/* eslint-disable ember/no-ember-testing-in-module-scope */
const WAIT_TIME = Ember.testing ? 0 : 500;
const ERROR_WINDOW_CLOSED =
'The provider window was closed before authentication was complete. Please click Sign In to try again.';
```

### Unknown Global

**Global**: `Ember.testing`

**Location**: `app/components/auth-jwt.js` at line 119

```js
exchangeOIDC: task(function*(event, oidcWindow) {
// in non-incognito mode we need to use a timeout because it takes time before oidcState is written to local storage.
let oidcState = Ember.testing
? event.storageArea.getItem('oidcState')
: yield timeout(1000).then(() => event.storageArea.getItem('oidcState'));
```

### Unknown Global

**Global**: `Ember.testing`

**Location**: `app/routes/vault.js` at line 7

```js
Expand All @@ -185,7 +241,7 @@ export default Route.extend({

**Global**: `Ember.testing`

**Location**: `app/services/auth.js` at line 267
**Location**: `app/services/auth.js` at line 268

```js
checkShouldRenew: task(function*() {
Expand All @@ -194,17 +250,3 @@ export default Route.extend({
return;
}
```

### Unknown Global

**Global**: `Ember.testing`

**Location**: `lib/core/addon/components/ttl-form.js` at line 82

```js
this.set('time', parsedTime);
this.handleChange();
if (Ember.testing) {
return;
}
```
5 changes: 2 additions & 3 deletions ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ To run the tests locally in a browser other than IE11, swap out `launch_in_ci: [

### Linting

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

### Building Vault UI into a Vault Binary

Expand Down
8 changes: 4 additions & 4 deletions ui/app/adapters/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ export default RESTAdapter.extend({
headers['X-Vault-Wrap-TTL'] = options.wrapTTL;
}
let namespace = typeof options.namespace === 'undefined' ? this.namespaceService.path : options.namespace;
if (namespace && !NAMESPACE_ROOT_URLS.some(str => url.includes(str))) {
if (namespace && !NAMESPACE_ROOT_URLS.some((str) => url.includes(str))) {
headers['X-Vault-Namespace'] = namespace;
}
options.headers = assign(options.headers || {}, headers);
},

_preRequest(url, options) {
this.addHeaders(url, options);
const isPolling = POLLING_URLS.some(str => url.includes(str));
const isPolling = POLLING_URLS.some((str) => url.includes(str));
if (!isPolling) {
this.auth.setLastFetch(Date.now());
}
Expand Down Expand Up @@ -86,7 +86,7 @@ export default RESTAdapter.extend({
const [resp] = args;
if (resp && resp.warnings) {
let flash = this.flashMessages;
resp.warnings.forEach(message => {
resp.warnings.forEach((message) => {
flash.info(message);
});
}
Expand All @@ -102,7 +102,7 @@ export default RESTAdapter.extend({
headers: opts.headers || {},
body: opts.body,
signal: opts.signal,
}).then(response => {
}).then((response) => {
if (response.status >= 200 && response.status < 300) {
return RSVP.resolve(response);
} else {
Expand Down
4 changes: 2 additions & 2 deletions ui/app/adapters/auth-method.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default ApplicationAdapter.extend({
return this.ajax(url, 'GET', {
unauthenticated: true,
})
.then(result => {
.then((result) => {
return {
data: result.data.auth,
};
Expand All @@ -33,7 +33,7 @@ export default ApplicationAdapter.extend({
};
});
}
return this.ajax(this.url(), 'GET').catch(e => {
return this.ajax(this.url(), 'GET').catch((e) => {
if (e instanceof AdapterError) {
set(e, 'policyPath', 'sys/auth');
}
Expand Down
2 changes: 1 addition & 1 deletion ui/app/adapters/aws-credential.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default ApplicationAdapter.extend({
let role = snapshot.attr('role');
let url = `/v1/${role.backend}/creds/${role.name}`;

return this.ajax(url, method, options).then(response => {
return this.ajax(url, method, options).then((response) => {
response.id = snapshot.id;
response.modelName = type.modelName;
store.pushPayload(type.modelName, response);
Expand Down
Loading