Skip to content

Commit 4ae19a8

Browse files
authored
Merge pull request #926 from ember-learn/merge-main
Merge main into website redesign
2 parents 2acdbee + e515a84 commit 4ae19a8

File tree

15 files changed

+11022
-8934
lines changed

15 files changed

+11022
-8934
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ jobs:
2121
uses: actions/checkout@v4
2222

2323
- uses: pnpm/action-setup@v4
24-
name: Install pnpm
25-
with:
26-
version: 8
2724

2825
- name: Use Node.js ${{ env.NODE_VERSION }}
2926
uses: actions/setup-node@v4
@@ -47,9 +44,6 @@ jobs:
4744
uses: actions/checkout@v4
4845

4946
- uses: pnpm/action-setup@v4
50-
name: Install pnpm
51-
with:
52-
version: 8
5347

5448
- name: Use Node.js ${{ env.NODE_VERSION }}
5549
uses: actions/setup-node@v4

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ locally yourself.
4646
```
4747
git clone https://github.com/ember-learn/ember-api-docs.git
4848
cd ember-api-docs
49-
npm install
50-
npm run clone
51-
npm run start
49+
pnpm install
50+
pnpm run clone
51+
pnpm run start
5252
```
53+
5354
View at http://localhost:4200
5455

5556
### Run locally with a sym-link
@@ -64,8 +65,8 @@ git clone https://github.com/ember-learn/ember-api-docs-data
6465
git clone https://github.com/ember-learn/ember-api-docs
6566
cd ember-api-docs
6667
ln -s ../ember-api-docs-data
67-
npm install
68-
npm start
68+
pnpm install
69+
pnpm start
6970
```
7071

7172
Visit the app in your browser at [http://localhost:4200](http://localhost:4200)
@@ -76,9 +77,9 @@ To run a11y tests, run `test_a11y=yes ember serve`
7677

7778
## Linting
7879

79-
* `npm run lint:hbs`
80-
* `npm run lint:js`
81-
* `npm run lint:js -- --fix`
80+
* `pnpm run lint:hbs`
81+
* `pnpm run lint:js`
82+
* `pnpm run lint:js -- --fix`
8283

8384
## Staging and Deployment
8485

app/adapters/application.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,8 @@ export default class Application extends JSONAPIAdapter {
2929
return false;
3030
}
3131

32-
shouldBackgroundReloadRecord(store, { modelName, id }) {
33-
let key = `${modelName}-${id}`;
34-
let hasId = this.ids[key];
35-
if (!hasId) {
36-
this.ids[key] = true;
37-
}
38-
return !hasId;
32+
shouldBackgroundReloadRecord() {
33+
return false;
3934
}
4035

4136
constructor() {

app/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import Resolver from 'ember-resolver';
33
import loadInitializers from 'ember-load-initializers';
44
import config from 'ember-api-docs/config/environment';
55

6+
import './deprecation-workflow';
7+
68
export default class App extends Application {
79
modulePrefix = config.modulePrefix;
810
podModulePrefix = config.podModulePrefix;
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
self.deprecationWorkflow = self.deprecationWorkflow || {};
2-
self.deprecationWorkflow.config = {
1+
import setupDeprecationWorkflow from 'ember-cli-deprecation-workflow';
2+
3+
setupDeprecationWorkflow({
34
workflow: [
4-
{ handler: 'silence', matchId: 'ember-global' },
55
{ handler: 'silence', matchId: 'ember.component.reopen' },
66
{ handler: 'silence', matchId: 'implicit-injections' },
7-
{ handler: 'silence', matchId: 'manager-capabilities.modifiers-3-13' },
87
{ handler: 'silence', matchId: 'this-property-fallback' },
98
{ handler: 'silence', matchId: 'ember-component.is-visible' },
109
{
1110
handler: 'silence',
1211
matchId: 'deprecated-run-loop-and-computed-dot-access',
1312
},
1413
],
15-
};
14+
});

app/routes/class.js

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,13 @@ export default class ClassRoute extends Route {
1010
legacyModuleMappings;
1111

1212
model(params) {
13-
return this.legacyModuleMappings
14-
.fetch()
15-
.then((response) => response.json())
16-
.then((mappings) => {
17-
let ret = {
18-
mappings: this.legacyModuleMappings.buildMappings(mappings),
19-
className: params['class'].substr(
20-
0,
21-
params['class'].lastIndexOf('.')
22-
),
23-
};
24-
return ret;
25-
});
13+
let ret = {
14+
mappings: this.legacyModuleMappings.buildMappings(
15+
this.legacyModuleMappings.legacyMappings
16+
),
17+
className: params['class'].substr(0, params['class'].lastIndexOf('.')),
18+
};
19+
return ret;
2620
}
2721

2822
redirect(model) {

app/routes/data-class.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,12 @@ export default class DataClassRoute extends Route {
1010
legacyModuleMappings;
1111

1212
model(params) {
13-
return this.legacyModuleMappings
14-
.fetch()
15-
.then((response) => response.json())
16-
.then((mappings) => {
17-
return {
18-
mappings: this.legacyModuleMappings.buildMappings(mappings),
19-
className: params['class'].substr(
20-
0,
21-
params['class'].lastIndexOf('.')
22-
),
23-
};
24-
});
13+
return {
14+
mappings: this.legacyModuleMappings.buildMappings(
15+
this.legacyModuleMappings.legacyMappings
16+
),
17+
className: params['class'].substr(0, params['class'].lastIndexOf('.')),
18+
};
2519
}
2620

2721
redirect(model) {

app/routes/data-module.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@ export default class DataModuleRoute extends Route {
1010
legacyModuleMappings;
1111

1212
model(params) {
13-
return this.legacyModuleMappings
14-
.fetch()
15-
.then((response) => response.json())
16-
.then((mappings) => {
17-
return {
18-
moduleName: params.module.substr(0, params.module.lastIndexOf('.')),
19-
mappings: this.legacyModuleMappings.buildMappings(mappings),
20-
};
21-
});
13+
return {
14+
moduleName: params.module.substr(0, params.module.lastIndexOf('.')),
15+
mappings: this.legacyModuleMappings.buildMappings(
16+
this.legacyModuleMappings.legacyMappings
17+
),
18+
};
2219
}
2320

2421
redirect(model) {

app/routes/module.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@ export default class ModuleRoute extends Route {
1010
legacyModuleMappings;
1111

1212
model(params) {
13-
return this.legacyModuleMappings
14-
.fetch()
15-
.then((response) => response.json())
16-
.then((mappings) => {
17-
return {
18-
moduleName: params.module.substr(0, params.module.lastIndexOf('.')),
19-
mappings: this.legacyModuleMappings.buildMappings(mappings),
20-
};
21-
});
13+
return {
14+
moduleName: params.module.substr(0, params.module.lastIndexOf('.')),
15+
mappings: this.legacyModuleMappings.buildMappings(
16+
this.legacyModuleMappings.legacyMappings
17+
),
18+
};
2219
}
2320

2421
redirect(model) {

app/routes/project-version/classes/class.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ export default class ClassRoute extends Route.extend(ScrollTracker) {
3333
this.metaStore
3434
);
3535
const klass = params['class'];
36-
return this.find('class', `${project}-${projectVersion}-${klass}`);
36+
return this.find(
37+
'class',
38+
`${project}-${projectVersion}-${klass}`.toLowerCase()
39+
);
3740
}
3841

3942
find(typeName, param) {

0 commit comments

Comments
 (0)