Skip to content

Commit a6cad9a

Browse files
authored
Merge pull request #950 from ember-learn/update-4
Update to 4.12 using ember-cli-update
2 parents 9960a2f + aba16b7 commit a6cad9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1836
-2424
lines changed

.ember-cli

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@
55

66
Setting `disableAnalytics` to true will prevent any data from being sent.
77
*/
8-
"disableAnalytics": false
8+
"disableAnalytics": false,
9+
10+
/**
11+
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
12+
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
13+
*/
14+
"isTypeScriptProject": false
915
}

.eslintignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@
1616
.*/
1717
.eslintcache
1818

19+
# data git checkout
20+
/ember-api-docs-data/
21+
1922
# ember-try
2023
/.node_modules.ember-try/
2124
/bower.json.ember-try
25+
/npm-shrinkwrap.json.ember-try
2226
/package.json.ember-try
23-
24-
# data git checkout
25-
/ember-api-docs-data/
27+
/package-lock.json.ember-try
28+
/yarn.lock.ember-try

.eslintrc.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
module.exports = {
44
root: true,
5-
parser: 'babel-eslint',
5+
parser: '@babel/eslint-parser',
66
parserOptions: {
7-
ecmaVersion: 2018,
7+
ecmaVersion: 'latest',
88
sourceType: 'module',
9-
ecmaFeatures: {
10-
legacyDecorators: true,
9+
requireConfigFile: false,
10+
babelOptions: {
11+
plugins: [
12+
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
13+
],
1114
},
1215
},
1316
plugins: ['ember'],
@@ -35,6 +38,7 @@ module.exports = {
3538
files: [
3639
'./.eslintrc.js',
3740
'./.prettierrc.js',
41+
'./.stylelintrc.js',
3842
'./.template-lintrc.js',
3943
'./ember-cli-build.js',
4044
'./testem.js',
@@ -55,16 +59,10 @@ module.exports = {
5559
browser: false,
5660
node: true,
5761
},
58-
plugins: ['node'],
59-
extends: ['plugin:node/recommended'],
60-
rules: {
61-
// this can be removed once the following is fixed
62-
// https://github.com/mysticatea/eslint-plugin-node/issues/77
63-
'node/no-unpublished-require': 'off',
64-
},
62+
extends: ['plugin:n/recommended'],
6563
},
6664
{
67-
// Test files:
65+
// test files
6866
files: ['tests/**/*-test.{js,ts}'],
6967
extends: ['plugin:qunit/recommended'],
7068
},

.github/workflows/ci.yml

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,52 @@ name: CI
33
on:
44
push:
55
branches:
6+
- main
67
- master
7-
pull_request:
8+
pull_request: {}
89

910
env:
1011
NODE_VERSION: 20
1112
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
1213
PERCY_PARALLEL_TOTAL: 1
1314

15+
concurrency:
16+
group: ci-${{ github.head_ref || github.ref }}
17+
cancel-in-progress: true
18+
1419
jobs:
1520
lint:
16-
name: Lint files
21+
name: "Lint"
1722
runs-on: ubuntu-latest
18-
timeout-minutes: 5
19-
steps:
20-
- name: Check out a copy of the repo
21-
uses: actions/checkout@v4
23+
timeout-minutes: 10
2224

25+
steps:
26+
- uses: actions/checkout@v4
2327
- uses: pnpm/action-setup@v4
24-
25-
- name: Use Node.js ${{ env.NODE_VERSION }}
26-
uses: actions/setup-node@v4
28+
- uses: actions/setup-node@v4
2729
with:
28-
cache: 'pnpm'
30+
cache: pnpm
2931
node-version: ${{ env.NODE_VERSION }}
30-
31-
- name: Install dependencies
32-
run: pnpm i --frozen-lockfile
33-
32+
- name: Install Dependencies
33+
run: pnpm install
3434
- name: Lint
3535
run: pnpm run lint
3636

37-
38-
test-app:
39-
name: Test app
37+
test:
38+
name: "Test"
4039
runs-on: ubuntu-latest
4140
timeout-minutes: 10
42-
steps:
43-
- name: Check out a copy of the repo
44-
uses: actions/checkout@v4
4541

42+
steps:
43+
- uses: actions/checkout@v4
4644
- uses: pnpm/action-setup@v4
47-
48-
- name: Use Node.js ${{ env.NODE_VERSION }}
49-
uses: actions/setup-node@v4
45+
- uses: actions/setup-node@v4
5046
with:
51-
cache: 'pnpm'
47+
cache: pnpm
5248
node-version: ${{ env.NODE_VERSION }}
53-
54-
- run: pnpm install --frozen-lockfile
55-
49+
- run: pnpm install
5650
- run: pnpm run clone
57-
58-
- name: Test
51+
- name: Run Tests
5952
env:
6053
PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }}
6154
PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }}

.gitignore

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,17 @@ browserstack-local.pid
3636
local.log
3737
.vscode/
3838

39+
# ember-api-docs-data checkout
40+
/ember-api-docs-data/
41+
/ember-api-docs-data
42+
3943
# ember-try
4044
/.node_modules.ember-try/
4145
/bower.json.ember-try
46+
/npm-shrinkwrap.json.ember-try
4247
/package.json.ember-try
48+
/package-lock.json.ember-try
49+
/yarn.lock.ember-try
4350

44-
/ember-api-docs-data/
45-
/ember-api-docs-data
51+
# broccoli-debug
52+
/DEBUG/

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
/coverage/
1515
!.*
1616
.eslintcache
17+
.lint-todo/
1718

1819
# ember-try
1920
/.node_modules.ember-try/
2021
/bower.json.ember-try
22+
/npm-shrinkwrap.json.ember-try
2123
/package.json.ember-try
24+
/package-lock.json.ember-try
25+
/yarn.lock.ember-try

.prettierrc.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
'use strict';
22

33
module.exports = {
4-
singleQuote: true,
4+
overrides: [
5+
{
6+
files: '*.{js,ts}',
7+
options: {
8+
singleQuote: true,
9+
},
10+
},
11+
],
512
};

.stylelintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# unconventional files
2+
/blueprints/*/files/
3+
4+
# compiled output
5+
/dist/
6+
7+
# addons
8+
/.node_modules.ember-try/

.stylelintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
5+
};

app/components/class-field-description.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{! template-lint-disable no-invalid-interactive }}
12
<section class='{{@type}}'>
23
<h3 data-anchor='{{@field.name}}'>
34
<span class='{{@type}}-name'>{{@field.name}}</span>
@@ -16,7 +17,7 @@
1617
<span class='access'>deprecated</span>
1718
{{/if}}
1819
{{!-- TODO: Fix this link for a11y --}}
19-
<a class='class-field-description--link' data-test-anchor="{{@field.name}}" role='link' {{on 'click' (fn this.updateAnchor @field.name)}} {{!-- template-lint-disable link-href-attributes --}}>
20+
<a class='class-field-description--link' data-test-anchor="{{@field.name}}" {{on 'click' (fn this.updateAnchor @field.name)}} {{!-- template-lint-disable link-href-attributes --}}>
2021
{{svg-jar 'link' width='20px' height='20px'}}
2122
</a>
2223
</h3>

app/deprecation-workflow.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ setupDeprecationWorkflow({
1111
handler: 'throw',
1212
matchId: 'deprecated-run-loop-and-computed-dot-access',
1313
},
14+
{
15+
handler: 'silence',
16+
matchId: 'ember-data:deprecate-non-strict-relationships',
17+
},
18+
{ handler: 'silence', matchId: 'ember-data:deprecate-store-find' },
19+
{ handler: 'silence', matchId: 'remove-owner-inject' },
20+
{ handler: 'silence', matchId: 'ember-polyfills.deprecate-assign' },
1421
],
1522
});

app/routes/project-version/namespaces/namespace.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,21 @@ export default class NamespaceRoute extends ClassRoute.extend(ScrollTracker) {
1212
const { project, project_version: compactVersion } =
1313
this.paramsFor('project-version');
1414

15-
let projectRecord = await this.store.findRecord('project', project);
15+
let projectRecord = await this.store.findRecord(
16+
'project',
17+
project.toLowerCase()
18+
);
1619
let projectVersion = getFullVersion(
1720
compactVersion,
1821
project,
1922
projectRecord,
2023
this.metaStore
2124
);
2225
const klass = params['namespace'];
23-
return this.find('namespace', `${project}-${projectVersion}-${klass}`);
26+
return this.find(
27+
'namespace',
28+
`${project}-${projectVersion}-${klass}`.toLowerCase()
29+
);
2430
}
2531

2632
serialize(model) {

app/styles/app.css

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* stylelint-disable no-descending-specificity, selector-class-pattern */
12
.article-title-wrapper {
23
display: flex;
34
justify-content: space-between;
@@ -56,22 +57,23 @@ main a.edit-icon {
5657
background: none;
5758
}
5859

59-
.sub-table-of-contents .toc-item a {
60+
.sub-table-of-contents .toc-item a {
6061
display: block;
6162
padding: var(--spacing-1);
6263
border-radius: var(--radius);
6364
line-height: var(--line-height-xs);
6465
color: var(--color-gray-700);
6566
border-left: 0 solid transparent;
66-
transition: border-width .3s;
67+
transition: border-width 0.3s;
6768
}
6869

6970
.sub-table-of-contents .toc-item a:hover {
7071
border-left: 4px solid var(--color-gray-400);
7172
border-radius: 0;
7273
}
7374

74-
.sub-table-of-contents .toc-item.selected > a, .sub-table-of-contents .toc-item > a.active {
75+
.sub-table-of-contents .toc-item.selected > a,
76+
.sub-table-of-contents .toc-item > a.active {
7577
border-left: 4px solid var(--color-brand-hc-dark);
7678
border-radius: 0;
7779
}
@@ -109,19 +111,23 @@ a.class-field-description--link:hover svg {
109111
fill: var(--color-brand);
110112
}
111113

112-
113-
114-
.parameter, .return {
114+
.parameter,
115+
.return {
115116
display: flex;
116117
gap: var(--spacing-1);
117118
}
118-
.parameter dt, .return dt {
119+
120+
.parameter dt,
121+
.return dt {
119122
font-weight: bold;
120123
}
124+
121125
dd {
122126
margin: 0;
123127
}
124-
.parameter-type, .return .return-type {
128+
129+
.parameter-type,
130+
.return .return-type {
125131
font-style: italic;
126132
color: var(--color-gray-600);
127133
}
@@ -130,15 +136,15 @@ dd {
130136
display: flex;
131137
justify-content: center;
132138
align-items: center;
133-
padding: var(--spacing-6)
139+
padding: var(--spacing-6);
134140
}
135141

136142
.whoops img {
137-
width: 240px;
138-
margin: var(--spacing-2);
143+
width: 240px;
144+
margin: var(--spacing-2);
139145
}
140146

141-
@media (min-width: 845px) {
147+
@media (width >= 845px) {
142148
.es-header {
143149
padding: 0 var(--spacing-4);
144150
justify-content: start;
@@ -154,7 +160,7 @@ dd {
154160
}
155161
}
156162

157-
@media (max-width: 450px) {
163+
@media (width <= 450px) {
158164
.whoops {
159165
flex-direction: column;
160166
padding: var(--spacing-3);

app/templates/project-version/modules/module.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{! template-lint-disable no-invalid-link-text }}
12
<article class="chapter">
23
<div class="article-title-wrapper">
34
{{#if (eq this.model.name 'ember-data-overview')}}

config/ember-cli-update.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"packages": [
44
{
55
"name": "ember-cli",
6-
"version": "3.28.6",
6+
"version": "4.12.3",
77
"blueprints": [
88
{
99
"name": "app",

config/environment.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ module.exports = function (environment) {
66
let ALGOLIA_API_KEY =
77
process.env.ALGOLIA_API_KEY || 'c35425b69b31be1bb4786f0a72146306';
88

9-
let ENV = {
9+
const ENV = {
1010
modulePrefix: 'ember-api-docs',
1111
environment,
1212
rootURL: '/',
1313
routerRootURL: '/',
14-
locationType: 'auto',
14+
locationType: 'history',
1515
API_HOST: process.env.API_HOST || 'https://api-store.emberjs.com',
1616
EmberENV: {
1717
EXTEND_PROTOTYPES: false,

0 commit comments

Comments
 (0)