Skip to content

Commit

Permalink
Update webpack-related dependencies (#22447)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChumpChief authored Sep 10, 2024
1 parent fff9bab commit d9f0c37
Show file tree
Hide file tree
Showing 69 changed files with 2,870 additions and 5,215 deletions.
2 changes: 1 addition & 1 deletion build-tools/packages/bundle-size-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"msgpack-lite": "^0.1.26",
"pako": "^2.1.0",
"typescript": "~5.4.5",
"webpack": "^5.88.1"
"webpack": "^5.94.0"
},
"devDependencies": {
"@biomejs/biome": "~1.8.3",
Expand Down
202 changes: 104 additions & 98 deletions build-tools/pnpm-lock.yaml

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions docs/themes/thxvscode/assets/js/bundle.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/themes/thxvscode/assets/js/jquery/accessibility.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* If an #skip-to-content element exists, this adds click handling to it to scroll the first button
* or link in the #main-content into view.
*/
export function loadSkipToContentButton() {
var skip_to_main_content_btn = $("#skip-to-content");
var mainFirstAnchor = $("#main-content button, #main-content a:visible").first();
Expand Down
20 changes: 11 additions & 9 deletions docs/themes/thxvscode/assets/js/jquery/docs.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
// Scrollspy and hashlink
export function loadDocsJavascript() {
/**
* Highlight section navigation on scroll
* Alternative position: sticky to avoid Edge bug with position: sticky
* https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/6263621-position-sticky
* Highlight section navigation on scroll in the right navigation
*/
$("body").scrollspy({ target: "#docs-subnavbar" });

// Set a local storage variable when the mobile nav dropdown has been changed
// Set a local storage variable when the nav dropdown (only visible for narrow layouts) has been changed
$("#small-nav-dropdown").change(function () {
localStorage.setItem("mobileNavChanged", "true");
});

// If the mobile nav changed variable has been set, restore focus to the mobile nav and remove the variable
// If the nav dropdown (only visible for narrow layouts) changed variable has been set, restore focus to
// the nav dropdown and remove the variable
if (localStorage.getItem("mobileNavChanged") === "true") {
$("#small-nav-dropdown").focus();
localStorage.removeItem("mobileNavChanged");
}

// Tries to set a bootstrap affix to the right navigation, but doesn't seem to really have an effect.
// Maybe duplicative with affix information in the html already.
const affixPaddingTop = 70;
$("#docs-subnavbar").affix({
offset: {
Expand All @@ -29,11 +29,11 @@ export function loadDocsJavascript() {
});

/**
* position: sticky polyfill for left navbar
* position: sticky polyfill for left navbar. Doesn't work because the parent element is 0-height.
*/

StickyFill.add($(".docs-navbar-container"));

// Expand/collapse support for the left nav bar
$(".collapse")
.on("hidden.bs.collapse", function () {
$(this).parent().addClass("collapsed");
Expand All @@ -43,16 +43,17 @@ export function loadDocsJavascript() {
$(this).parent().addClass("expanded");
$(this).parent().removeClass("collapsed");
});
// Navigate to the selected option for the nav dropdown (only visible for narrow layouts)
$("#small-nav-dropdown").change(function () {
window.location = this.value;
});

// UA detection, but doesn't seem to actually be used.
var userAgent = navigator.userAgent;
var isMacintosh = userAgent.indexOf("Macintosh") >= 0;
var isLinux = userAgent.indexOf("Linux") >= 0;
var isWindows = userAgent.indexOf("Windows") >= 0;

// Only change the DOM if we know anything at all
if (isMacintosh || isLinux || isWindows) {
var mine, other1, other2, other1Label, other2Label;
if (isMacintosh) {
Expand All @@ -76,6 +77,7 @@ export function loadDocsJavascript() {
}
}

// Code to show/hide the "#" link for individual sections in the doc pages on mouse hover
function appendHashLink() {
function incrementReasonsToBeVisible(header) {
return () => {
Expand Down
19 changes: 10 additions & 9 deletions docs/themes/thxvscode/assets/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
"build": "webpack --mode=production"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@babel/preset-env": "^7.16.11",
"@babel/runtime": "^7.17.2",
"babel-loader": "^8.2.3",
"core-js": "^3.21.1",
"terser-webpack-plugin": "^4.0.0",
"webpack": "^4.46.0",
"webpack-cli": "^4.9.2"
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@babel/runtime": "^7.25.6",
"babel-loader": "^9.1.3",
"core-js": "^3.38.1",
"terser-webpack-plugin": "^5.3.10",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"bootstrap": "^3.4.1",
"stickyfilljs": "^2.1.0"
}
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit d9f0c37

Please sign in to comment.