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 v3.17 #104

Merged
merged 8 commits into from
Mar 11, 2020
Merged
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:13.8
FROM node:13.10

RUN apt-get update && \
apt-get install -y lsof vim libgtk-3-0 libatk1.0-0 libx11-xcb1 libnss3 libxss1 libasound2
Expand Down
4 changes: 4 additions & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
TODO: add ember-test-helpers addon-test-helpers types to tsconfig



Adapter and Serializer in new ember + documentation expressions
only Serializer EmbeddedRecordsMixin solution is needed

Expand Down
23 changes: 11 additions & 12 deletions ember-app-boilerplate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,27 @@
"repository": "",
"main": "src/main.js",
"scripts": {
"build": "mber build",
"start": "mber server",
"test": "mber test"
"typecheck": "node_modules/.bin/tsc --project tsconfig.json --noEmit",
"build": "node_modules/.bin/mber build",
"start": "node_modules/.bin/mber start",
"test": "node_modules/.bin/mber test"
},
"engines": {
"node": "^13.*"
},
"devDependencies": {
"mber": "{{mberVersion}}",
"eslint": "^6.8.0",
"eslint-plugin-ember": "^7.7.2",
"qunit-dom": "1.0.0",
"eslint-plugin-ember": "^7.10.1",
"qunit-dom": "1.1.0",
"@types/ember": "^3.1.1",
"@types/ember-data": "^3.1.9",
"@types/ember-qunit": "^3.4.7",
"@types/ember__test-helpers": "^0.7.9",
"@types/qunit": "^2.9.0",
"@types/rsvp": "^4.0.3",
"@typescript-eslint/parser": "^2.19.2",
"typescript": "^3.7.5"
"@typescript-eslint/parser": "^2.23.0",
"typescript": "^3.8.3"
},
"fastbootDependencies": [
"crypto",
Expand All @@ -43,17 +44,15 @@
"memserver": "^2.0.10",
"abortcontroller-polyfill": "^1.4.0",
"ember-cli-fastboot": "^2.2.1",
"ember-data": "3.16.0",
"ember-devtools": "^6.0.0",
"ember-modifier": "^1.0.2",
"ember-data": "3.17.0",
"ember-modifier": "^1.0.3",
"fastboot": "^3.0.0",
"highlight.js": "^9.15.8",
"jquery": "^3.4.1",
"mber-head": "^0.1.0",
"node-fetch": "2.6.0"
},
"volta": {
"node": "13.8.0"
"node": "13.10.0"
},
"ember": {
"edition": "octane"
Expand Down
4 changes: 2 additions & 2 deletions ember-app-boilerplate/src/data/models/application/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export default class ApplicationAdapter extends RESTAdapter {
// return { Authorization: `Bearer ${this.session.authenticationToken}` };
// }
// }
handleResponse(status, headers, payload) {
handleResponse(status, headers, payload, requestData) {
if (this.isInvalid(status, headers, payload)) {
const errors = errorsHashToArray(payload.errors);

return new InvalidError(errors);
}

return super.handleResponse(...arguments);
return super.handleResponse(status, headers, payload, requestData);
}
}
13 changes: 13 additions & 0 deletions ember-app-boilerplate/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from '../config/environment';

declare global {
interface FreeObject {
[propName: string]: any;
}

interface Window {
runningTests: any;
Ember: any;
DISABLE_MEMSERVER?: boolean;
MemServer?: FreeObject;
}
}

export default class App extends Application {
modulePrefix = config.modulePrefix;
podModulePrefix = config.podModulePrefix;
Expand Down
1 change: 1 addition & 0 deletions ember-app-boilerplate/src/resolver.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import Resolver from 'ember-resolver/resolvers/fallback';
import buildResolverConfig from 'ember-resolver/ember-config';
import config from '../config/environment';
Expand Down
1 change: 1 addition & 0 deletions ember-app-boilerplate/src/router.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import EmberRouter from '@ember/routing/router';
import DocumentationRouter from 'mber-documentation';
import ENV from '../config/environment';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-nocheck
import { VERSION } from '@ember/version';
import Component from '@glimmer/component';

Expand Down
28 changes: 28 additions & 0 deletions ember-app-boilerplate/tests/test-helper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
declare module "ember-test-helpers" {
interface Element {
querySelector: (selectorText: string) => Element;
value: any;
textContent: any;
type: any;
required: any;
getAttribute: any;
autofocus: any;
previousElementSibling: any;
nextElementSibling: any;
placeholder: any;
[propName: string]: any;
}

interface TestContext {
[propName: string]: any;
element: Element;
}
}

declare global {
interface EventTarget {
parentElement: Element
}
}

import 'qunit-dom';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
import Application from '../src/main';
Expand Down
36 changes: 23 additions & 13 deletions ember-app-boilerplate/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
{
"compilerOptions": {
"target": "es2017",
"typeRoots" : ["./node_modules/@types"],
"allowJs": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"noImplicitAny": true,
"noImplicitThis": true,
"alwaysStrict": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noImplicitAny": false,
"noImplicitThis": false,
"alwaysStrict": false,
"strictNullChecks": false,
"strictPropertyInitialization": false,
"noFallthroughCasesInSwitch": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noImplicitReturns": false,
"noEmitOnError": false,
"noEmit": true,
"inlineSourceMap": true,
"inlineSources": true,
"noEmit": false,
"inlineSourceMap": false,
"inlineSources": false,
"baseUrl": ".",
"module": "es6",
"experimentalDecorators": true,
"skipLibCheck": true,
"paths": {
"{{applicationName}}/tests/*": [
"tests/*"
],
"{{applicationName}}/config/*": [
"config/*"
],
"{{applicationName}}/*": [
"{{applicationName}}/src/*": [
"src/*"
],
"{{applicationName}}/memserver/*": [
"memserver/*"
],
"{{applicationName}}/documentation/*": [
"documentation/*"
],
"@glimmer": ["node_modules/@glimmer/component/dist/types/src/*"],
"*": [
"types/*"
]
Expand All @@ -38,6 +47,7 @@
"include": [
"src/**/*",
"tests/**/*",
"documentation/**/*",
"types/**/*"
],
"exclude": [
Expand Down
2 changes: 0 additions & 2 deletions lib/addons/memserver/instance-initializers/memserver.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import require from 'require';
import { classify} from '@ember/string';
import { singularize } from 'ember-inflector';
import Memserver from 'memserver/server';

export default {
Expand Down
Loading