Skip to content

Commit

Permalink
chore: Export updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cansuaa committed Mar 5, 2025
1 parent 5105206 commit 32ec5df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"ace-builds": "^1.32.6",
"aws-rum-web": "^1.12.0",
"axe-core": "^4.4.3",
"babel-loader": "^8.1.0",
"copy-webpack-plugin": "^11.0.0",
Expand Down
5 changes: 3 additions & 2 deletions scripts/clean-package-lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const fs = require('fs');
const filename = require.resolve('../package-lock.json');
const packageLock = require(filename);

if (packageLock.lockfileVersion !== 3) {
throw new Error('package-lock.json must have "lockfileVersion": 3');
if (packageLock.lockfileVersion !== 2) {
throw new Error('package-lock.json must have "lockfileVersion": 2');
}

function unlock(packages) {
Expand All @@ -25,6 +25,7 @@ function unlock(packages) {
}

packageLock.packages = unlock(packageLock.packages);
packageLock.dependencies = unlock(packageLock.dependencies);

fs.writeFileSync(filename, JSON.stringify(packageLock, null, 2) + '\n');
console.log('Removed @cloudscape-design/ dependencies from package-lock file');
8 changes: 2 additions & 6 deletions src/common/adjust-body-padding.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT-0
export function adjustBodyPadding() {
const header = document.querySelector('#h');
if (!header) {
throw new Error('Header were not found');
}
const { height: headerHeight } = header.getBoundingClientRect();
document.documentElement.style.scrollPaddingTop = `${headerHeight}px`;
const { height: footerHeight } = document.querySelector('#f')!.getBoundingClientRect();
(document.querySelector('#b') as HTMLElement).style.paddingBottom = `${footerHeight}px`;
}

window.addEventListener('DOMContentLoaded', adjustBodyPadding);
Expand Down

0 comments on commit 32ec5df

Please sign in to comment.