Skip to content

Commit a72e35e

Browse files
committed
Merge remote-tracking branch 'origin/master' into merge-master
# Conflicts: # app/styles/base/_forms.scss # app/styles/base/_lists.scss # app/styles/base/_tables.scss # app/styles/base/_typography.scss # app/styles/base/_variables.scss # app/styles/components/_article.scss # app/styles/components/_class-field-desc.scss # app/styles/components/_highlight.scss # app/styles/components/_sidebar.scss # ember-cli-build.js # package-lock.json # package.json
2 parents 0f9c749 + 1af9e9a commit a72e35e

14 files changed

+17261
-65699
lines changed

Diff for: .github/workflows/ci.yml

+21-19
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
pull_request:
88

99
env:
10-
NODE_VERSION: 14
10+
NODE_VERSION: 20
1111
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
1212
PERCY_PARALLEL_TOTAL: 1
1313

@@ -18,24 +18,24 @@ jobs:
1818
timeout-minutes: 5
1919
steps:
2020
- name: Check out a copy of the repo
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

23-
- name: Check lockfile version
24-
uses: mansona/npm-lockfile-version@v1
23+
- uses: pnpm/action-setup@v4
24+
name: Install pnpm
25+
with:
26+
version: 8
2527

2628
- name: Use Node.js ${{ env.NODE_VERSION }}
27-
uses: actions/setup-node@v3
29+
uses: actions/setup-node@v4
2830
with:
29-
cache: 'npm'
31+
cache: 'pnpm'
3032
node-version: ${{ env.NODE_VERSION }}
3133

32-
- run: npm i -g npm@9
33-
3434
- name: Install dependencies
35-
run: npm ci
35+
run: pnpm i --frozen-lockfile
3636

3737
- name: Lint
38-
run: npm run lint
38+
run: pnpm run lint
3939

4040

4141
test-app:
@@ -44,24 +44,26 @@ jobs:
4444
timeout-minutes: 10
4545
steps:
4646
- name: Check out a copy of the repo
47-
uses: actions/checkout@v3
47+
uses: actions/checkout@v4
48+
49+
- uses: pnpm/action-setup@v4
50+
name: Install pnpm
51+
with:
52+
version: 8
4853

4954
- name: Use Node.js ${{ env.NODE_VERSION }}
50-
uses: actions/setup-node@v3
55+
uses: actions/setup-node@v4
5156
with:
52-
cache: 'npm'
57+
cache: 'pnpm'
5358
node-version: ${{ env.NODE_VERSION }}
5459

55-
- run: npm i -g npm@9
56-
57-
- name: Install dependencies
58-
run: npm ci
60+
- run: pnpm install --frozen-lockfile
5961

60-
- run: npm run clone
62+
- run: pnpm run clone
6163

6264
- name: Test
6365
env:
6466
PERCY_PARALLEL_NONCE: ${{ env.PERCY_PARALLEL_NONCE }}
6567
PERCY_PARALLEL_TOTAL: ${{ env.PERCY_PARALLEL_TOTAL }}
6668
PERCY_TOKEN: 5ad6687f6b1ad3dec2b964f94d3d59ff3880baccf1492c0663e85c1ce79c1a52
67-
run: npx percy exec -- npm run test:ember
69+
run: pnpm percy exec -- pnpm run test:ember

Diff for: .npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use-node-version=20.14.0

Diff for: README.md

+25-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ Some tips for working with git/GitHub can be found in
3333

3434
Please also see [CONTRIBUTING.md](CONTRIBUTING.md).
3535

36-
## Quickstart to run semi-locally
36+
## Running in your local environment
37+
38+
ember-api-docs expects a folder in its root that links to the `ember-api-docs-data` folder, so you can either use the `npm run clone` script to clone the `ember-api-docs-data` repo into `ember-api-docs`, OR you can create a symbolic link to `ember-api-docs-data` from `ember-api-docs`. You might want to sym-link `ember-api-docs-data` if you are generating new versions of the docs files with `ember-jsonapi-docs`, otherwise you can probably use the clone script.
39+
40+
### Quickstart to run locally
3741

3842
Follow these instructions to run the app using publically available online data.
3943
You do not need to run [ember-jsonapi-docs](https://github.com/ember-learn/ember-jsonapi-docs)
@@ -43,10 +47,29 @@ locally yourself.
4347
git clone https://github.com/ember-learn/ember-api-docs.git
4448
cd ember-api-docs
4549
npm install
46-
ember serve
50+
npm run clone
51+
npm run start
4752
```
4853
View at http://localhost:4200
4954

55+
### Run locally with a sym-link
56+
57+
Clone all of the following repositories into the same directory so they are "siblings" on the file system:
58+
59+
- This repository, `ember-api-docs`
60+
- [ember-api-docs-data](https://github.com/ember-learn/ember-api-docs-data)
61+
62+
```sh
63+
git clone https://github.com/ember-learn/ember-api-docs-data
64+
git clone https://github.com/ember-learn/ember-api-docs
65+
cd ember-api-docs
66+
ln -s ../ember-api-docs-data
67+
npm install
68+
npm start
69+
```
70+
71+
Visit the app in your browser at [http://localhost:4200](http://localhost:4200)
72+
5073
## a11y testing
5174

5275
To run a11y tests, run `test_a11y=yes ember serve`
File renamed without changes.
File renamed without changes.

Diff for: app/components/ember-data-landing-page.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<<article class="chapter">
1+
<article class="chapter">
22
<h1>
33
Ember Data API Documentation
44
</h1>

Diff for: app/services/algolia.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
import Service from '@ember/service';
22
import algoliasearch from 'algoliasearch';
33
import config from 'ember-api-docs/config/environment';
4-
import { denodeify } from 'rsvp';
54

65
export default class AlgoliaService extends Service {
7-
_search(query, params, callback) {
8-
if (!callback) {
9-
callback = params;
10-
params = undefined;
11-
}
6+
async search(query, params) {
127
if (query) {
138
if (Array.isArray(query) && !params) {
149
// if multiple indices
15-
this._client.search(query, callback);
10+
return this._client.search(query);
1611
} else if (!params) {
1712
// if no params
18-
this.accessIndex(query.indexName).search(query.query, callback);
13+
return this.accessIndex(query.indexName).search(query.query);
1914
} else {
2015
// if params and callback
21-
this.accessIndex(query.indexName).search(query.query, params, callback);
16+
return this.accessIndex(query.indexName).search(query.query, params);
2217
}
23-
} else {
24-
callback(new Error(`Could not search algolia for query "${query}"`));
2518
}
2619
}
2720

@@ -39,6 +32,5 @@ export default class AlgoliaService extends Service {
3932
config.algolia.algoliaKey
4033
);
4134
this._indices = {};
42-
this.search = denodeify(this._search.bind(this));
4335
}
4436
}

Diff for: config/ember-cli-update.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"codemodsSource": "ember-app-codemods-manifest@1",
1212
"isBaseBlueprint": true,
1313
"options": [
14-
"--no-welcome"
14+
"--no-welcome",
15+
"--pnpm"
1516
]
1617
}
1718
]

Diff for: ember-cli-build.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const Funnel = require('broccoli-funnel');
55
const mergeTrees = require('broccoli-merge-trees');
66
const envIsProduction = process.env.EMBER_ENV === 'production';
77
const premberUrls = require('./prember-urls');
8+
const nodeSass = require('node-sass');
89

910
module.exports = function (defaults) {
1011
let app = new EmberApp(defaults, {

0 commit comments

Comments
 (0)