Skip to content

Update to 4.12 using ember-cli-update #950

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

Open
wants to merge 10 commits into
base: website-redesign
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": false
}
9 changes: 6 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
.*/
.eslintcache

# data git checkout
/ember-api-docs-data/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try

# data git checkout
/ember-api-docs-data/
/package-lock.json.ember-try
/yarn.lock.ember-try
22 changes: 10 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
},
plugins: ['ember'],
Expand Down Expand Up @@ -35,6 +38,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
Expand All @@ -55,16 +59,10 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off',
},
extends: ['plugin:n/recommended'],
},
{
// Test files:
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
Expand Down
51 changes: 22 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,52 @@ name: CI
on:
push:
branches:
- main
- master
pull_request:
pull_request: {}

env:
NODE_VERSION: 20
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
PERCY_PARALLEL_TOTAL: 1

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint files
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
cache: pnpm
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Install Dependencies
run: pnpm install
- name: Lint
run: pnpm run lint


test-app:
name: Test app
test:
name: "Test"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out a copy of the repo
uses: actions/checkout@v4

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
cache: pnpm
node-version: ${{ env.NODE_VERSION }}

- run: pnpm install --frozen-lockfile

- run: pnpm install
- run: pnpm run clone

- name: Test
- name: Run Tests
env:
PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }}
PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }}
Expand Down
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ browserstack-local.pid
local.log
.vscode/

# ember-api-docs-data checkout
/ember-api-docs-data/
/ember-api-docs-data

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

/ember-api-docs-data/
/ember-api-docs-data
# broccoli-debug
/DEBUG/
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
/coverage/
!.*
.eslintcache
.lint-todo/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
9 changes: 8 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
'use strict';

module.exports = {
singleQuote: true,
overrides: [
{
files: '*.{js,ts}',
options: {
singleQuote: true,
},
},
],
};
8 changes: 8 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

# addons
/.node_modules.ember-try/
5 changes: 5 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
3 changes: 2 additions & 1 deletion app/components/class-field-description.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{! template-lint-disable no-invalid-interactive }}
<section class='{{@type}}'>
<h3 data-anchor='{{@field.name}}'>
<span class='{{@type}}-name'>{{@field.name}}</span>
Expand All @@ -16,7 +17,7 @@
<span class='access'>deprecated</span>
{{/if}}
{{!-- TODO: Fix this link for a11y --}}
<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 --}}>
<a class='class-field-description--link' data-test-anchor="{{@field.name}}" {{on 'click' (fn this.updateAnchor @field.name)}} {{!-- template-lint-disable link-href-attributes --}}>
{{svg-jar 'link' width='20px' height='20px'}}
</a>
</h3>
Expand Down
7 changes: 7 additions & 0 deletions app/deprecation-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,12 @@ setupDeprecationWorkflow({
handler: 'throw',
matchId: 'deprecated-run-loop-and-computed-dot-access',
},
{
handler: 'silence',
matchId: 'ember-data:deprecate-non-strict-relationships',
},
{ handler: 'silence', matchId: 'ember-data:deprecate-store-find' },
{ handler: 'silence', matchId: 'remove-owner-inject' },
{ handler: 'silence', matchId: 'ember-polyfills.deprecate-assign' },
],
});
10 changes: 8 additions & 2 deletions app/routes/project-version/namespaces/namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@ export default class NamespaceRoute extends ClassRoute.extend(ScrollTracker) {
const { project, project_version: compactVersion } =
this.paramsFor('project-version');

let projectRecord = await this.store.findRecord('project', project);
let projectRecord = await this.store.findRecord(
'project',
project.toLowerCase()
);
let projectVersion = getFullVersion(
compactVersion,
project,
projectRecord,
this.metaStore
);
const klass = params['namespace'];
return this.find('namespace', `${project}-${projectVersion}-${klass}`);
return this.find(
'namespace',
`${project}-${projectVersion}-${klass}`.toLowerCase()
);
}

serialize(model) {
Expand Down
32 changes: 19 additions & 13 deletions app/styles/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* stylelint-disable no-descending-specificity, selector-class-pattern */
.article-title-wrapper {
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -56,22 +57,23 @@ main a.edit-icon {
background: none;
}

.sub-table-of-contents .toc-item a {
.sub-table-of-contents .toc-item a {
display: block;
padding: var(--spacing-1);
border-radius: var(--radius);
line-height: var(--line-height-xs);
color: var(--color-gray-700);
border-left: 0 solid transparent;
transition: border-width .3s;
transition: border-width 0.3s;
}

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

.sub-table-of-contents .toc-item.selected > a, .sub-table-of-contents .toc-item > a.active {
.sub-table-of-contents .toc-item.selected > a,
.sub-table-of-contents .toc-item > a.active {
border-left: 4px solid var(--color-brand-hc-dark);
border-radius: 0;
}
Expand Down Expand Up @@ -109,19 +111,23 @@ a.class-field-description--link:hover svg {
fill: var(--color-brand);
}



.parameter, .return {
.parameter,
.return {
display: flex;
gap: var(--spacing-1);
}
.parameter dt, .return dt {

.parameter dt,
.return dt {
font-weight: bold;
}

dd {
margin: 0;
}
.parameter-type, .return .return-type {

.parameter-type,
.return .return-type {
font-style: italic;
color: var(--color-gray-600);
}
Expand All @@ -130,15 +136,15 @@ dd {
display: flex;
justify-content: center;
align-items: center;
padding: var(--spacing-6)
padding: var(--spacing-6);
}

.whoops img {
width: 240px;
margin: var(--spacing-2);
width: 240px;
margin: var(--spacing-2);
}

@media (min-width: 845px) {
@media (width >= 845px) {
.es-header {
padding: 0 var(--spacing-4);
justify-content: start;
Expand All @@ -154,7 +160,7 @@ dd {
}
}

@media (max-width: 450px) {
@media (width <= 450px) {
.whoops {
flex-direction: column;
padding: var(--spacing-3);
Expand Down
1 change: 1 addition & 0 deletions app/templates/project-version/modules/module.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{! template-lint-disable no-invalid-link-text }}
<article class="chapter">
<div class="article-title-wrapper">
{{#if (eq this.model.name 'ember-data-overview')}}
Expand Down
2 changes: 1 addition & 1 deletion config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "3.28.6",
"version": "4.12.3",
"blueprints": [
{
"name": "app",
Expand Down
4 changes: 2 additions & 2 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ module.exports = function (environment) {
let ALGOLIA_API_KEY =
process.env.ALGOLIA_API_KEY || 'c35425b69b31be1bb4786f0a72146306';

let ENV = {
const ENV = {
modulePrefix: 'ember-api-docs',
environment,
rootURL: '/',
routerRootURL: '/',
locationType: 'auto',
locationType: 'history',
API_HOST: process.env.API_HOST || 'https://api-store.emberjs.com',
EmberENV: {
EXTEND_PROTOTYPES: false,
Expand Down
Loading