Skip to content

Commit

Permalink
Merge branch 'main' into funnel/button-link-events
Browse files Browse the repository at this point in the history
  • Loading branch information
connorlanigan authored Jul 27, 2023
2 parents 308f13c + 85117c2 commit b549be0
Show file tree
Hide file tree
Showing 39 changed files with 208 additions and 670 deletions.
127 changes: 1 addition & 126 deletions .github/workflows/bundle-size/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .github/workflows/bundle-size/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"build": "node build.js"
"build": "node build.js",
"preinstall": "node ./unlock-package-lock.cjs"
},
"dependencies": {
"@cloudscape-design/components": "*",
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/bundle-size/unlock-package-lock.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env node
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const fs = require('fs');
const path = require('path');

/**
* Remove specific @cloudscape-design/* packages where we should always use the latest minor release.
*/
const filename = path.resolve(__dirname, 'package-lock.json');
const packageLock = JSON.parse(fs.readFileSync(filename));

Object.keys(packageLock.packages).forEach(dependencyName => {
removeDependencies(dependencyName, packageLock.packages);
});

Object.keys(packageLock.dependencies).forEach(dependencyName => {
removeDependencies(dependencyName, packageLock.dependencies);
});

fs.writeFileSync(filename, JSON.stringify(packageLock, null, 2) + '\n');
console.log('Removed @cloudscape-design/ dependencies from package-lock file');

function removeDependencies(dependencyName, packages) {
if (dependencyName.includes('@cloudscape-design/')) {
delete packages[dependencyName];
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Here is a basic example that renders a primary button:
import Button from '@cloudscape-design/components/button';
import '@cloudscape-design/global-styles/index.css';

function App {
function App() {
return <Button variant="primary">Click me</Button>;
}
```
Expand Down
Loading

0 comments on commit b549be0

Please sign in to comment.