Skip to content

Commit bf3d38d

Browse files
committed
Merge branch 'master' into blueprint_add_ember-data_modules_types
2 parents bd607b7 + 5752265 commit bf3d38d

File tree

9 files changed

+64
-1146
lines changed

9 files changed

+64
-1146
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
<!-- Thanks for submitting a pull request! 🎉 -->
1+
<!--
22
3-
<!-- Please note that commit messages need to follow the [Conventional Commits](https://www.conventionalcommits.org) format.
3+
Thanks for submitting a pull request! 🎉
44
5-
For example:
6-
test: fix node tests when run locally with ts-node
5+
Please include a link to a GitHub issue if one exists.
76
8-
-->
7+
If you don't hear from a maintainer within a few days, please feel free to ping us here or in #e-typescript on Discord!
98
10-
<!-- Also, please include a link to a github issue if one exists. -->
9+
-->

.github/workflows/ci.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,6 @@ env:
2020
CI: true
2121

2222
jobs:
23-
commitlint:
24-
name: Lint Commits
25-
runs-on: ubuntu-latest
26-
env:
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
steps:
29-
- name: Checkout Code
30-
uses: actions/checkout@v2
31-
# We need the `with` argument here so that force pushes (e.g. from
32-
# Renovate rebasing) work correctly.
33-
# https://github.com/wagoid/commitlint-github-action/tree/d6a383492a776126bbeba8c1d797ead4baedaaae#usage
34-
with:
35-
fetch-depth: 0
36-
- name: Commitlint
37-
uses: wagoid/commitlint-github-action@v2.1.1
38-
3923
test-locked-deps:
4024
name: Test (linux, locked dependencies)
4125
runs-on: ubuntu-latest

.vscode/launch.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
1212
"args": [
1313
"-r", "register-ts-node",
14-
"-f", "generates .d.ts files when addon and package names do not match",
14+
"-f", "Acceptance: ember-cli-typescript generator",
15+
"-f", "basic app",
16+
"-t", "1000000",
1517
"ts/tests/**/*.{ts,js}"
1618
],
1719
"internalConsoleOptions": "openOnSessionStart"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ We have a channel (**`#e-typescript`**) on the [Ember Community Discord server](
182182
183183
### 📚 Issues With Ember Type Definitions
184184
185-
If you've found that some of the Ember type information is missing things, or is incorrect in some way, please first ensure you're using the latest version of the [packages this addon installs](https://ember-cli-typescript.com/docs#other-packages-this-addon-installs). Although [StackOverflow](https://stackoverflow.com/questions/tagged/ember.js+typescript) and [Discuss](https://discuss.emberjs.com/search?q=typescript) are not the advised places to report problems, you may find an answer there.
185+
If you've found that some of the Ember type information is missing things, or is incorrect in some way, please first ensure you're using the latest version of the [packages this addon installs](https://docs.ember-cli-typescript.com/installation#other-packages-this-addon-installs). Although [StackOverflow](https://stackoverflow.com/questions/tagged/ember.js+typescript) and [Discuss](https://discuss.emberjs.com/search?q=typescript) are not the advised places to report problems, you may find an answer there.
186186
187187
If you don't find an answer, please [open an enhancement request or bug report in this project](https://github.com/typed-ember/ember-cli-typescript/issues/new/choose).
188188

docs/ember-data/models.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The type returned by the `@attr` decorator is whatever [Transform](https://api.e
1919
So, for example, you might write a class like this:
2020

2121
```typescript
22-
import Model, { attr } from '@ember-data/object';
22+
import Model, { attr } from '@ember-data/model';
2323
import CustomType from '../transforms/custom-transform';
2424

2525
export default class User extends Model {
@@ -44,7 +44,7 @@ The _safest_ type you can write for an Ember Data model, therefore, leaves every
4444
One way to make this safer is to supply a default value using the `defaultValue` on the options hash for the attribute:
4545

4646
```typescript
47-
import Model, { attr } from '@ember-data/object';
47+
import Model, { attr } from '@ember-data/model';
4848

4949
export default class User extends Model {
5050
@attr()

docs/ember/routes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default class MyRoute extends Route {
1818
}
1919
```
2020

21-
This inconsistency will be solved in the future. For now, this workaround gets the job done, and also shows the way to using this information to provide the type of the route's model to other consumers: see [Working with Route Models](routes.md) for details!
21+
This inconsistency will be solved in the future. For now, this workaround gets the job done, and also shows the way to using this information to provide the type of the route's model to other consumers: see [Working with Route Models](../cookbook/working-with-route-models.md) for details!
2222

2323
```typescript
2424
import Route from '@ember/routing/route';

docs/ember/services.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default class CartContentsComponent extends Component {
127127
Here we need to cast the lookup result to `ShoppingCartService` in order to get any type-safety because the lookup return type is `any` \(see caution below\).
128128

129129
{% hint style="danger" %}
130-
This type-cast provides no guarantees that what is returned by the lookup is actually the service you are expecting. Because TypeScript cannot resolve the lookup micro-syntax \(`service:<name>`\) to the service class, a typo would result in returning something other than the specified type. It only gurantees that _if_ the expected serbice is returned that you are using it correctly.
130+
This type-cast provides no guarantees that what is returned by the lookup is actually the service you are expecting. Because TypeScript cannot resolve the lookup micro-syntax \(`service:<name>`\) to the service class, a typo would result in returning something other than the specified type. It only gurantees that _if_ the expected service is returned that you are using it correctly.
131131

132132
There is a merged \(but not yet implemented\) [RFC](https://emberjs.github.io/rfcs/0585-improved-ember-registry-apis.html) which improves this design and makes it straightforward to type-check. Additionally, TypeScript 4.1's introduction of [template types](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#template-literal-types) may allow us to supply types that work with the microsyntax.
133133

package.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
"ci:test:app": "ember test",
3636
"ci:test:node": "mocha --recursive js/tests",
3737
"prepublishOnly": "yarn tsc --noEmit false --project ts",
38-
"postpublish": "rimraf js",
39-
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -u"
38+
"postpublish": "rimraf js"
4039
},
4140
"dependencies": {
4241
"ansi-to-html": "^0.6.6",
@@ -51,8 +50,6 @@
5150
"walk-sync": "^2.2.0"
5251
},
5352
"devDependencies": {
54-
"@commitlint/cli": "11.0.0",
55-
"@commitlint/config-conventional": "11.0.0",
5653
"@ember/optional-features": "2.0.0",
5754
"@glimmer/component": "^1.0.0-beta.3",
5855
"@glimmer/tracking": "^1.0.0-beta.3",
@@ -82,8 +79,6 @@
8279
"broccoli-plugin": "4.0.3",
8380
"capture-console": "1.0.1",
8481
"co": "4.6.0",
85-
"commitlint-azure-pipelines-cli": "1.0.3",
86-
"conventional-changelog-cli": "2.1.1",
8782
"ember-cli": "3.22.0",
8883
"ember-cli-app-version": "4.0.0",
8984
"ember-cli-babel": "7.23.0",
@@ -111,8 +106,7 @@
111106
"esprima": "4.0.1",
112107
"fixturify": "2.1.0",
113108
"got": "11.8.0",
114-
"handlebars": "4.7.6",
115-
"husky": "4.3.0",
109+
"handlebars": "4.7.7",
116110
"in-repo-a": "link:tests/dummy/lib/in-repo-a",
117111
"in-repo-b": "link:tests/dummy/lib/in-repo-b",
118112
"loader.js": "4.7.0",
@@ -139,11 +133,6 @@
139133
"broccoli-watcher"
140134
]
141135
},
142-
"husky": {
143-
"hooks": {
144-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
145-
}
146-
},
147136
"prettier": {
148137
"printWidth": 100,
149138
"semi": true,

0 commit comments

Comments
 (0)