Skip to content

Commit

Permalink
Merge branch 'add-sentry-to-yari' into bundlesize-compare-add-sentry-…
Browse files Browse the repository at this point in the history
…to-yari
  • Loading branch information
caugner committed Sep 11, 2024
2 parents 8535811 + bfff095 commit 9970152
Show file tree
Hide file tree
Showing 14 changed files with 2,075 additions and 3,005 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.62.0"
".": "2.63.0"
}
97 changes: 97 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions client/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,13 @@ function config(webpackEnv) {
// Otherwise React will be compiled in the very slow development mode.
new webpack.DefinePlugin(env.stringified),
// Treeshake Sentry (saves about 12 kB on the chunk).
//new webpack.DefinePlugin({
// __SENTRY_DEBUG__: false,
// __SENTRY_TRACING__: false,
// __RRWEB_EXCLUDE_IFRAME__: true,
// __RRWEB_EXCLUDE_SHADOW_DOM__: true,
// __SENTRY_EXCLUDE_REPLAY_WORKER__: true,
//}),
new webpack.DefinePlugin({
__SENTRY_DEBUG__: false,
__SENTRY_TRACING__: false,
__RRWEB_EXCLUDE_IFRAME__: true,
__RRWEB_EXCLUDE_SHADOW_DOM__: true,
__SENTRY_EXCLUDE_REPLAY_WORKER__: true,
}),
// Experimental hot reloading for React .
// https://github.com/facebook/react/tree/main/packages/react-refresh
isEnvDevelopment &&
Expand Down
2 changes: 1 addition & 1 deletion client/pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"devDependencies": {
"@types/dexie": "1.3.1",
"ts-loader": "^9.5.1",
"typescript": "^5.5.4",
"typescript": "^5.6.2",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4",
"workers-preview": "^1.0.6"
Expand Down
8 changes: 4 additions & 4 deletions client/pwa/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,10 @@ ts-loader@^9.5.1:
semver "^7.3.4"
source-map "^0.7.4"

typescript@^5.5.4:
version "5.5.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==
typescript@^5.6.2:
version "5.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0"
integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==

update-browserslist-db@^1.0.13:
version "1.0.13"
Expand Down
18 changes: 8 additions & 10 deletions client/src/document/organisms/sidebar/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,15 @@
padding-left: 0.5rem;
}

ol {
li {
.icon {
margin-right: 0.01em;
}
li {
.icon {
margin-right: 0.01em;
}

&.no-bullet {
display: block;
font-weight: var(--font-body-strong-weight);
list-style-type: none;
}
&.no-bullet {
display: block;
font-weight: var(--font-body-strong-weight);
list-style-type: none;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/observatory/results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default function ObservatoryResults() {
</section>
<div className="sidebar-container">
<SidebarContainer doc={{}}>
{<ObservatoryDocsNav /> || null}
<ObservatoryDocsNav />
</SidebarContainer>
</div>
{hasData && !combinedError && (
Expand Down
5 changes: 4 additions & 1 deletion client/src/playground/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ function cmExtensions(colorScheme: string, language: string) {
];
}

const Editor = forwardRef<EditorHandle, any>(function EditorInner(
const Editor = forwardRef<
EditorHandle,
{ language: string; callback: () => void }
>(function EditorInner(
{
language,
callback = () => {},
Expand Down
32 changes: 29 additions & 3 deletions client/src/plus/ai-help/use-ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,20 @@ export function useAiChat({
});
}, [setSearchParams, chatId]);

const removeChatIdFromUrl = useCallback(() => {
setSearchParams(
(prev) => {
prev.delete("c");
return prev;
},
{ replace: true }
);
}, [setSearchParams]);

useEffect(() => {
if (!isHistoryEnabled) {
// If we got a chat id passed in without history enabled, clear parameters from URL
removeChatIdFromUrl();
return;
}
let timeoutID;
Expand Down Expand Up @@ -452,12 +464,19 @@ export function useAiChat({
}
} catch (e) {
setPreviousChatId(undefined);
setChatId(convId);
setPath([]);
dispatchState({
type: "reset",
});
handleError(e);
// If we got a 404 from the API, reset and remove the parameter from the URL,
// do not show an error.
if (e instanceof Error && e.message.startsWith("404")) {
setChatId(undefined);
removeChatIdFromUrl();
} else {
setChatId(convId);
handleError(e);
}
}
setIsHistoryLoading(false);
};
Expand All @@ -467,7 +486,14 @@ export function useAiChat({
if (r) {
reset();
}
}, [isHistoryEnabled, searchParams, chatId, reset, handleError]);
}, [
isHistoryEnabled,
removeChatIdFromUrl,
searchParams,
chatId,
reset,
handleError,
]);

useEffect(() => {
if (remoteQuota !== undefined) {
Expand Down
4 changes: 4 additions & 0 deletions client/src/ui/organisms/placement/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,10 @@ section.place {
width: initial;
}
}

html[data-nop] & {
display: none;
}
}

.dark section.place .pong-box2 {
Expand Down
81 changes: 0 additions & 81 deletions kumascript/macros/DOMAttributeMethods.ejs

This file was deleted.

1 change: 0 additions & 1 deletion kumascript/macros/unimplemented_inline.ejs

This file was deleted.

23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mdn/yari",
"version": "2.62.0",
"version": "2.63.0",
"repository": "https://github.com/mdn/yari",
"license": "MPL-2.0",
"author": "MDN Web Docs",
Expand Down Expand Up @@ -73,6 +73,7 @@
"@mdn/bcd-utils-api": "^0.0.7",
"@mdn/browser-compat-data": "^5.5.51",
"@mozilla/glean": "5.0.3",
"@sentry/browser": "^8.30.0",
"@sentry/node": "^8.29.0",
"@sentry/react": "^8.29.0",
"@stripe/stripe-js": "^4.4.0",
Expand All @@ -94,7 +95,7 @@
"dexie": "^4.0.8",
"dotenv": "^16.4.5",
"ejs": "^3.1.10",
"express": "^4.19.2",
"express": "^4.20.0",
"fdir": "^6.3.0",
"feed": "^4.2.2",
"file-type": "^19.5.0",
Expand All @@ -117,10 +118,10 @@
"md5-file": "^5.0.0",
"mdast-util-from-markdown": "^2.0.1",
"mdast-util-phrasing": "^4.1.0",
"mdn-data": "^2.10.0",
"mdn-data": "^2.11.0",
"open": "^10.1.0",
"open-editor": "^5.0.0",
"openai": "^4.58.1",
"openai": "^4.58.2",
"pg": "^8.12.0",
"pgvector": "^0.2.0",
"prism-svelte": "^0.5.0",
Expand All @@ -139,15 +140,15 @@
"remark-rehype": "^11.1.0",
"remark-stringify": "^11.0.0",
"sanitize-filename": "^1.6.3",
"send": "^0.18.0",
"send": "^0.19.0",
"source-map-support": "^0.5.21",
"sse.js": "^2.5.0",
"tempy": "^3.1.0",
"unified": "^11.0.5",
"unist-builder": "^4.0.0",
"unist-util-visit": "^5.0.0",
"web-features": "^1.2.0",
"web-specs": "^3.20.0"
"web-specs": "^3.21.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
Expand All @@ -167,8 +168,8 @@
"@types/jest": "^29.5.12",
"@types/js-yaml": "^4.0.9",
"@types/mdast": "^4.0.4",
"@types/node": "^18.19.47",
"@types/react": "^18.3.4",
"@types/node": "^18.19.50",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@types/react-modal": "^3.16.3",
"@types/webpack-bundle-analyzer": "^4.7.0",
Expand Down Expand Up @@ -233,7 +234,7 @@
"react-is": "^18.3.1",
"react-refresh": "^0.14",
"react-router": "^6.17.0",
"react-router-dom": "^6.26.1",
"react-router-dom": "^6.26.2",
"remark-prettier": "^2.0.0",
"resolve": "^1.22.8",
"resolve-url-loader": "^5.0.0",
Expand All @@ -255,8 +256,8 @@
"ts-jest": "^29.2.5",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"typescript": "^5.5.4",
"typescript-eslint": "^8.4.0",
"typescript": "^5.6.2",
"typescript-eslint": "^8.5.0",
"webpack": "^5.94.0",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
Expand Down
Loading

0 comments on commit 9970152

Please sign in to comment.