Skip to content

Commit 9e1e456

Browse files
committed
all the fixes needed to get it running
1 parent 276ca16 commit 9e1e456

File tree

12 files changed

+380
-165
lines changed

12 files changed

+380
-165
lines changed

app/adapters/application.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { inject as service } from '@ember/service';
22
import JSONAPIAdapter from '@ember-data/adapter/json-api';
3-
import fetch from 'fetch';
43
import { pluralize } from 'ember-inflector';
54
import { isBlank } from '@ember/utils';
65

app/instance-initializers/ember-meta-store.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { isPresent } from '@ember/utils';
22

33
export function initialize(appInstance) {
4+
return;
45
const metaStore = appInstance.lookup('service:meta-store');
56
const fastBootService = appInstance.lookup('service:fastboot');
67

app/services/fastboot.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import Service from '@ember/service';
2+
3+
export default class FakeFastbootService extends Service {
4+
}

app/utils/create-excerpt.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import sanitizeHtml from 'sanitize-html';
1+
import HtmlSanitizer from '@jitbit/htmlsanitizer';
22

33
export default function createExcerpt(string, maxLength = 300) {
44
// Stop at first code example
55
string = string.split('<table')[0];
66

7-
let excerpt = sanitizeHtml(string, { allowedTags: [] })
7+
let excerpt = HtmlSanitizer.SanitizeHtml(string, { allowedTags: [] })
88
// Remove tabs and line breaks
99
.replace(/\t/g, '')
1010
.replace(/\n/g, ' ')

ember-cli-build.js

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ const { maybeEmbroider } = require('@embroider/test-setup');
88

99
module.exports = function (defaults) {
1010
let app = new EmberApp(defaults, {
11-
prember: {
12-
urls: premberUrls(),
13-
},
1411
fingerprint: {
1512
extensions: [
1613
'js',

package.json

+34-21
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,23 @@
1111
"test": "tests"
1212
},
1313
"scripts": {
14+
"clone": "rm -rf ember-api-docs-data && git clone --depth=1 https://github.com/ember-learn/ember-api-docs-data.git",
1415
"build": "vite build",
15-
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
16-
"lint:css": "stylelint \"**/*.css\"",
17-
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
18-
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
16+
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
17+
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
1918
"lint:hbs": "ember-template-lint .",
2019
"lint:hbs:fix": "ember-template-lint . --fix",
2120
"lint:js": "eslint . --cache",
2221
"lint:js:fix": "eslint . --fix",
2322
"start": "vite",
24-
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
25-
"test:ember": "vite build --mode test && ember test --path dist"
23+
"test:browserstack": "node run-tests.js",
24+
"test:ember": "ember test"
2625
},
2726
"devDependencies": {
27+
"@ember-data/adapter": "~3.28.0",
28+
"@ember-data/model": "~3.28.0",
29+
"@ember-data/serializer": "~3.28.0",
30+
"@ember-decorators/component": "^6.1.1",
2831
"@ember/optional-features": "^2.0.0",
2932
"@ember/test-helpers": "^2.6.0",
3033
"@embroider/compat": "3.6.2-unstable.a691d39",
@@ -37,8 +40,10 @@
3740
"@glimmer/tracking": "^1.1.2",
3841
"@glint/core": "^0.9.7",
3942
"@glint/environment-ember-loose": "^0.9.7",
43+
"@jitbit/htmlsanitizer": "^2.0.2",
4044
"@percy/cli": "^1.28.7",
4145
"@percy/ember": "^4.2.0",
46+
"@percy/sdk-utils": "1.28.7",
4247
"@rollup/plugin-babel": "^6.0.4",
4348
"@tsconfig/ember": "^1.0.1",
4449
"@types/ember": "^4.0.2",
@@ -75,7 +80,6 @@
7580
"ember-cli-deploy-build": "^1.1.0",
7681
"ember-cli-deploy-gzip": "^1.0.0",
7782
"ember-cli-deprecation-workflow": "^3.0.1",
78-
"ember-cli-document-title-northm": "^1.0.3",
7983
"ember-cli-htmlbars": "^6.1.1",
8084
"ember-cli-inject-live-reload": "^2.1.0",
8185
"ember-cli-meta-tags": "^7.0.0",
@@ -89,7 +93,7 @@
8993
"ember-load-initializers": "^2.1.2",
9094
"ember-maybe-import-regenerator": "^0.1.6",
9195
"ember-metrics": "^1.5.2",
92-
"ember-page-title": "^6.2.2",
96+
"ember-page-title": "^8.2.3",
9397
"ember-power-select": "^7.2.0",
9498
"ember-qunit": "^5.1.5",
9599
"ember-resolver": "^8.0.3",
@@ -133,25 +137,35 @@
133137
"sanitize-html": "^2.3.2",
134138
"semver": "^7.5.4",
135139
"semver-compare": "^1.0.0",
140+
"showdown": "^2.1.0",
141+
"sinon": "7.5.0",
136142
"spawndamnit": "2.0.0",
137143
"testem": "^3.10.0",
138144
"typescript": "^4.9.3",
139145
"vite": "^5.4.3",
140146
"webpack": "^5.90.0"
141147
},
148+
"packageManager": "[email protected]",
142149
"engines": {
143150
"node": "16.* || 18.* || 20.*",
144151
"npm": "7 || 8 || >= 9"
145152
},
153+
"pnpm": {
154+
"overrides": {
155+
"ember-get-config": "github:mansona/ember-get-config#config-meta-loader",
156+
"ember-truth-helpers": "^4.0.0",
157+
"node-sass": "^9.0.0"
158+
},
159+
"patchedDependencies": {
160+
"@ember-data/[email protected]": "patches/@[email protected]",
161+
162+
163+
"@jitbit/[email protected]": "patches/@[email protected]"
164+
}
165+
},
146166
"ember": {
147167
"edition": "octane"
148168
},
149-
"fastbootDependencies": [
150-
"algoliasearch",
151-
"node-fetch",
152-
"abortcontroller-polyfill",
153-
"abortcontroller-polyfill/dist/cjs-ponyfill"
154-
],
155169
"ember-addon": {
156170
"paths": [
157171
"lib/api-docs-data"
@@ -163,11 +177,10 @@
163177
"./tests/*": "./tests/*",
164178
"./*": "./app/*"
165179
},
166-
"pnpm": {
167-
"overrides": {
168-
"node-sass": "^9.0.0",
169-
"ember-truth-helpers": "^4.0.0"
170-
}
171-
},
172-
"packageManager": "[email protected]"
180+
"fastbootDependencies": [
181+
"algoliasearch",
182+
"node-fetch",
183+
"abortcontroller-polyfill",
184+
"abortcontroller-polyfill/dist/cjs-ponyfill"
185+
]
173186
}

patches/@[email protected]

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
diff --git a/addon/-private/system/backburner.js b/addon/-private/system/backburner.js
2+
index 6aa30ddf1a6c5151f68ec7a1e2b30e34fae64716..28cc2bad6367c2a41a0b589c7e788bf6bcb19ec5 100644
3+
--- a/addon/-private/system/backburner.js
4+
+++ b/addon/-private/system/backburner.js
5+
@@ -2,7 +2,6 @@
6+
@module @ember-data/store
7+
*/
8+
9+
-import { registerWaiter } from '@ember/test';
10+
import { DEBUG } from '@glimmer/env';
11+
import Ember from 'ember';
12+
13+
@@ -17,9 +16,7 @@ import Ember from 'ember';
14+
const backburner = new Ember._Backburner(['coalesce', 'sync', 'notify']);
15+
16+
if (DEBUG) {
17+
- registerWaiter(() => {
18+
- return !backburner.currentInstance && !backburner.hasTimers();
19+
- });
20+
+
21+
}
22+
23+
export default backburner;
24+
diff --git a/addon/-private/system/core-store.ts b/addon/-private/system/core-store.ts
25+
index f7eb8b96bd70abb8b8ebf5beb8a755853e38adc6..319c72e5beb6474a3111b1c5be9b4537797d5b27 100644
26+
--- a/addon/-private/system/core-store.ts
27+
+++ b/addon/-private/system/core-store.ts
28+
@@ -8,7 +8,6 @@ import { computed, defineProperty, get, set } from '@ember/object';
29+
import { assign } from '@ember/polyfills';
30+
import { _backburner as emberBackburner } from '@ember/runloop';
31+
import Service from '@ember/service';
32+
-import { registerWaiter, unregisterWaiter } from '@ember/test';
33+
import { isNone, isPresent, typeOf } from '@ember/utils';
34+
import { DEBUG } from '@glimmer/env';
35+
import Ember from 'ember';
36+
@@ -414,8 +413,6 @@ abstract class CoreStore extends Service {
37+
38+
return shouldTrack !== true || isSettled;
39+
};
40+
-
41+
- registerWaiter(this.__asyncWaiter);
42+
}
43+
}
44+
45+
@@ -3690,7 +3687,6 @@ abstract class CoreStore extends Service {
46+
this.unloadAll();
47+
48+
if (DEBUG) {
49+
- unregisterWaiter(this.__asyncWaiter);
50+
let shouldTrack = this.shouldTrackAsyncRequests;
51+
let tracked = this._trackedAsyncRequests;
52+
let isSettled = tracked.length === 0;

patches/@[email protected]

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/HtmlSanitizer.js b/HtmlSanitizer.js
2+
index 1dde0ed2effaf438946fd07f550ba502dd0371f4..d40db1d18ee3a5880054afd8611adbbda7488d67 100644
3+
--- a/HtmlSanitizer.js
4+
+++ b/HtmlSanitizer.js
5+
@@ -110,3 +110,5 @@ const HtmlSanitizer = new (function () {
6+
this.AllowedCssStyles = _cssWhitelist;
7+
this.AllowedSchemas = _schemaWhiteList;
8+
});
9+
+
10+
+module.exports = HtmlSanitizer;

patches/[email protected]

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
diff --git a/CHANGELOG.md b/CHANGELOG.md
2+
deleted file mode 100644
3+
index 7ab6fbae31241ccf49da5f1dcea7690738e659d9..0000000000000000000000000000000000000000
4+
diff --git a/dist/packages/@ember/-internals/runtime/.gitignore b/dist/packages/@ember/-internals/runtime/.gitignore
5+
deleted file mode 100644
6+
index a1136368651e6eb6d0d93a09c478f4978f4196fa..0000000000000000000000000000000000000000
7+
diff --git a/dist/packages/@ember/debug/index.js b/dist/packages/@ember/debug/index.js
8+
index 6e9b00d5c858be042cd530bcb647fc87d2a00e83..393bdc04dbf1ecc6a091b4696303affa0d94c4a2 100644
9+
--- a/dist/packages/@ember/debug/index.js
10+
+++ b/dist/packages/@ember/debug/index.js
11+
@@ -1,7 +1,7 @@
12+
import { isChrome, isFirefox } from '@ember/-internals/browser-environment';
13+
import EmberError from '@ember/error';
14+
import { DEBUG } from '@glimmer/env';
15+
-import _deprecate from './lib/deprecate';
16+
+import defaultDeprecate from './lib/deprecate';
17+
import { isTesting } from './lib/testing';
18+
import _warn from './lib/warn';
19+
export { inspect } from '@ember/-internals/utils';
20+
@@ -16,7 +16,7 @@ let assert = noop;
21+
let info = noop;
22+
let warn = noop;
23+
let debug = noop;
24+
-let deprecate = noop;
25+
+let currentDeprecate;
26+
let debugSeal = noop;
27+
let debugFreeze = noop;
28+
let runInDebug = noop;
29+
@@ -27,6 +27,14 @@ let deprecateFunc = function () {
30+
return arguments[arguments.length - 1];
31+
};
32+
33+
+export function deprecate() {
34+
+ if (currentDeprecate) {
35+
+ return currentDeprecate(...arguments);
36+
+ }
37+
+
38+
+ return defaultDeprecate(...arguments);
39+
+}
40+
+
41+
if (DEBUG) {
42+
setDebugFunction = function (type, callback) {
43+
switch (type) {
44+
@@ -43,7 +51,7 @@ if (DEBUG) {
45+
return debug = callback;
46+
47+
case 'deprecate':
48+
- return deprecate = callback;
49+
+ return currentDeprecate = callback;
50+
51+
case 'debugSeal':
52+
return debugSeal = callback;
53+
@@ -251,7 +259,6 @@ if (DEBUG) {
54+
Object.freeze(obj);
55+
}
56+
});
57+
- setDebugFunction('deprecate', _deprecate);
58+
setDebugFunction('warn', _warn);
59+
}
60+
61+
@@ -275,4 +282,4 @@ if (DEBUG && !isTesting()) {
62+
}
63+
}
64+
65+
-export { assert, info, warn, debug, deprecate, debugSeal, debugFreeze, runInDebug, deprecateFunc, setDebugFunction, getDebugFunction, _warnIfUsingStrippedFeatureFlags };
66+
\ No newline at end of file
67+
+export { assert, info, warn, debug, debugSeal, debugFreeze, runInDebug, deprecateFunc, setDebugFunction, getDebugFunction, _warnIfUsingStrippedFeatureFlags };

patches/[email protected]

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
diff --git a/lib/css-syntax-error.js b/lib/css-syntax-error.js
2+
index 275a4f64c2f8df215341a74d61e2aa2d05d61f78..6fa64a9ea9119fb194cfe28c9a02748d9d736672 100644
3+
--- a/lib/css-syntax-error.js
4+
+++ b/lib/css-syntax-error.js
5+
@@ -2,7 +2,7 @@
6+
7+
let pico = require('picocolors')
8+
9+
-let terminalHighlight = require('./terminal-highlight')
10+
+let terminalHighlight = require('./terminal-highlight.js')
11+
12+
class CssSyntaxError extends Error {
13+
constructor(message, line, column, source, file, plugin) {
14+
diff --git a/lib/input.js b/lib/input.js
15+
index 685bce74b22af19d28e19aacea26f5f35e37cacc..205653ea088484495ad756ee8cd0a5c5b84d6e17 100644
16+
--- a/lib/input.js
17+
+++ b/lib/input.js
18+
@@ -5,9 +5,9 @@ let { isAbsolute, resolve } = require('path')
19+
let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
20+
let { fileURLToPath, pathToFileURL } = require('url')
21+
22+
-let CssSyntaxError = require('./css-syntax-error')
23+
-let PreviousMap = require('./previous-map')
24+
-let terminalHighlight = require('./terminal-highlight')
25+
+let CssSyntaxError = require('./css-syntax-error.js')
26+
+let PreviousMap = require('./previous-map.js')
27+
+let terminalHighlight = require('./terminal-highlight.js')
28+
29+
let fromOffsetCache = Symbol('fromOffsetCache')
30+

0 commit comments

Comments
 (0)