Skip to content

Commit

Permalink
Needs human: Bump @types/react-dom from 18.3.1 to 19.0.3 in /src/play…
Browse files Browse the repository at this point in the history
…ground (#16092)

Bumps
[@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom)
from 18.3.1 to 19.0.3.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/react-dom&package-manager=npm_and_yarn&previous-version=18.3.1&new-version=19.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/16092)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anthony Martin <[email protected]>
  • Loading branch information
dependabot[bot] and anthony-c-martin authored Jan 20, 2025
1 parent 4d984eb commit cf3e09f
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 59 deletions.
82 changes: 42 additions & 40 deletions src/playground/package-lock.json

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

10 changes: 5 additions & 5 deletions src/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.18.0",
"@types/node": "^22.10.5",
"@types/node": "^22.10.7",
"@types/pako": "^2.0.3",
"@types/react": "^19.0.5",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
"@types/webpack": "^5.28.5",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.2",
"eslint": "^9.17.0",
"eslint": "^9.18.0",
"eslint-plugin-jest": "^28.11.0",
"eslint-plugin-notice": "^1.0.0",
"globals": "^15.14.0",
"html-webpack-plugin": "^5.6.3",
"monaco-editor-webpack-plugin": "^7.1.0",
"nerdbank-gitversioning": "^3.7.112",
"nerdbank-gitversioning": "^3.7.115",
"style-loader": "^4.0.0",
"ts-loader": "^9.5.2",
"ts-node": "^10.9.2",
Expand Down
16 changes: 7 additions & 9 deletions src/playground/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import { Container, Row, Spinner } from 'react-bootstrap';
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
import 'bootstrap/dist/css/bootstrap.min.css';
Expand All @@ -10,15 +10,15 @@ import './index.css';
import { initializeInterop } from './lspInterop';
import { Playground } from './playground';

ReactDOM.render(

const root = createRoot(document.getElementById('root'));
root.render(
// Loading spinner while we initialize Blazor
<Container className="d-flex vh-100">
<Row className="m-auto align-self-center">
<Spinner animation="border" variant="light" />
</Row>
</Container>,
document.getElementById('root')
);
</Container>);

async function initialize() {
const insights = new ApplicationInsights({
Expand All @@ -32,12 +32,10 @@ async function initialize() {

await initializeInterop(self);

ReactDOM.render(
root.render(
<div className="app-container">
<Playground insights={insights} />
</div>,
document.getElementById('root')
);
</div>);
}

initialize();
5 changes: 3 additions & 2 deletions src/playground/src/playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Button, ButtonGroup, Col, Container, Dropdown, FormControl, Nav, Navbar
import './playground.css';
import { JsonEditor } from './jsonEditor';
import { BicepEditor } from './bicepEditor';
import { copyShareLinkToClipboard, handleShareLink } from './utils';
import { getShareLink, handleShareLink } from './utils';
import { quickstartsPaths, getQuickstartsLink } from './examples';
import { decompile } from './lspInterop';
import { IApplicationInsights } from '@microsoft/applicationinsights-web';
Expand Down Expand Up @@ -69,7 +69,8 @@ export const Playground : React.FC<Props> = (props) => {
insights.trackEvent({ name: 'copySharedLink' });
setCopied(true);
setTimeout(() => setCopied(false), 2000);
copyShareLinkToClipboard(bicepContent);
const shareLink = getShareLink(bicepContent);
navigator.clipboard.writeText(shareLink);
}

const handleDecompileClick = (file: File) => {
Expand Down
11 changes: 8 additions & 3 deletions src/playground/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ export function handleShareLink(onContents: (contents : string | null) => void):
}
}

export function copyShareLinkToClipboard(content: string): void {
export function getShareLink(content: string) {
const contentHash = encodeHash(content);
const shareLink = `https://aka.ms/bicepdemo#${contentHash}`;
navigator.clipboard.writeText(shareLink);
let href = document.location.href;
if (href === 'https://azure.github.io/bicep/') {
// use aka.ms for the official site
href = 'https://aka.ms/bicepdemo';
}

return `${href}#${contentHash}`;
}

function encodeHash(content: string): string {
Expand Down

0 comments on commit cf3e09f

Please sign in to comment.