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

-6
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

+9-8
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

+2-7
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

+2
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;
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

+7-13
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

+6-12
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

+6-9
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

+6-9
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

+4-1
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) {

app/services/legacy-module-mappings.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import fetch from 'fetch';
21
import Service from '@ember/service';
32
import { tracked } from '@glimmer/tracking';
43

4+
import legacyMappings from 'ember-rfc176-data/mappings.json';
5+
56
const LOCALNAME_CONVERSIONS = {
67
Object: 'EmberObject',
78
Array: 'EmberArray',
@@ -10,12 +11,11 @@ const LOCALNAME_CONVERSIONS = {
1011

1112
export default class LegacyModuleMappingsService extends Service {
1213
@tracked mappings;
14+
legacyMappings = legacyMappings;
1315

1416
async initMappings() {
1517
try {
16-
let response = await this.fetch();
17-
let mappings = await response.json();
18-
let newMappings = this.buildMappings(mappings);
18+
let newMappings = this.buildMappings(legacyMappings);
1919
this.mappings = newMappings;
2020
} catch (e) {
2121
this.mappings = [];
@@ -32,10 +32,6 @@ export default class LegacyModuleMappingsService extends Service {
3232
});
3333
}
3434

35-
fetch() {
36-
return fetch('/assets/mappings.json');
37-
}
38-
3935
getModule(name, documentedModule) {
4036
if (!this.mappings) {
4137
return '';

ember-cli-build.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
'use strict';
22

33
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
4-
const Funnel = require('broccoli-funnel');
5-
const mergeTrees = require('broccoli-merge-trees');
64
const envIsProduction = process.env.EMBER_ENV === 'production';
75
const premberUrls = require('./prember-urls');
86

@@ -38,12 +36,6 @@ module.exports = function (defaults) {
3836
},
3937
});
4038

41-
let mappingsTree = new Funnel('node_modules/ember-rfc176-data/', {
42-
srcDir: '/',
43-
include: ['mappings.json'],
44-
destDir: '/assets/',
45-
});
46-
4739
const { Webpack } = require('@embroider/webpack');
4840
const appTree = require('@embroider/compat').compatBuild(app, Webpack, {
4941
staticAddonTrees: true,
@@ -53,5 +45,5 @@ module.exports = function (defaults) {
5345
staticComponents: true,
5446
});
5547

56-
return mergeTrees([require('prember').prerender(app, appTree), mappingsTree]);
48+
return require('prember').prerender(app, appTree);
5749
};

package.json

+13-8
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,20 @@
5858
"babel-eslint": "^10.1.0",
5959
"broccoli-asset-rev": "^3.0.0",
6060
"broccoli-funnel": "^2.0.1",
61-
"broccoli-merge-trees": "^2.0.0",
62-
"ember-a11y-testing": "^0.5.4",
61+
"ember-a11y-testing": "^5.2.1",
6362
"ember-anchor": "^1.0.3",
6463
"ember-auto-import": "^2.7.2",
6564
"ember-cli": "~3.28.6",
6665
"ember-cli-app-version": "^5.0.0",
6766
"ember-cli-autoprefixer": "^1.0.0",
6867
"ember-cli-babel": "^7.26.10",
6968
"ember-cli-browserstack": "^1.0.1",
70-
"ember-cli-clipboard": "^0.8.1",
69+
"ember-cli-clipboard": "^1.1.0",
7170
"ember-cli-dependency-checker": "^3.2.0",
7271
"ember-cli-deploy": "^1.0.1",
7372
"ember-cli-deploy-build": "^1.1.0",
7473
"ember-cli-deploy-gzip": "^1.0.0",
75-
"ember-cli-deprecation-workflow": "^2.1.0",
74+
"ember-cli-deprecation-workflow": "^3.0.1",
7675
"ember-cli-document-title-northm": "^1.0.3",
7776
"ember-cli-fastboot": "^4.1.5",
7877
"ember-cli-htmlbars": "^6.1.1",
@@ -87,16 +86,16 @@
8786
"ember-decorators": "^6.1.1",
8887
"ember-export-application-global": "^2.0.1",
8988
"ember-fetch": "^8.1.1",
90-
"ember-inflector": "^3.0.0",
89+
"ember-inflector": "^4.0.3",
9190
"ember-load-initializers": "^2.1.2",
9291
"ember-maybe-import-regenerator": "^0.1.6",
9392
"ember-metrics": "^1.5.2",
9493
"ember-page-title": "^6.2.2",
95-
"ember-power-select": "^6.0.1",
94+
"ember-power-select": "^7.2.0",
9695
"ember-qunit": "^5.1.5",
9796
"ember-resolver": "^8.0.3",
9897
"ember-rfc176-data": "^0.3.17",
99-
"ember-route-action-helper": "^2.0.5",
98+
"ember-route-action-helper": "^2.0.8",
10099
"ember-showdown-shiki": "^1.2.1",
101100
"ember-sinon": "^4.1.1",
102101
"ember-source": "~3.28.8",
@@ -161,5 +160,11 @@
161160
"paths": [
162161
"lib/api-docs-data"
163162
]
164-
}
163+
},
164+
"pnpm": {
165+
"overrides": {
166+
"node-sass": "^9.0.0"
167+
}
168+
},
169+
"packageManager": "[email protected]"
165170
}

0 commit comments

Comments
 (0)