Skip to content

Live Share SDK 2.0.0 - #794

Draft
huntj88 wants to merge 59 commits into
mainfrom
mainv2
Draft

huntj88 wants to merge 59 commits into
mainfrom
mainv2

Conversation

@huntj88

@huntj88 huntj88 commented Aug 29, 2024

Copy link
Copy Markdown
Contributor

No description provided.

huntj88 and others added 29 commits February 26, 2024 16:20
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
… bug in `LiveCanvas`, and upgraded Fluid version (#775)
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: Ryan Bliss <smile@ryanbliss.me>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
…bo package (#781)

Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: Ryan Bliss <smile@ryanbliss.me>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
…fter npm install, other V2 prep (#786)

Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: Ryan Bliss <smile@ryanbliss.me>
…m support (#791)

Co-authored-by: James Hunt <jameshunt@microsoft.com>
…0.0, removed references to live-share-turbo
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: huntj88 <huntj88@gmail.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: huntj88 <huntj88@gmail.com>
Co-authored-by: Ryan Bliss <smile@ryanbliss.me>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Comment thread .github/workflows/live-share-build-samples.yaml Fixed
Comment thread .github/workflows/live-share-formatting.yaml Fixed
Comment thread .github/workflows/live-share-test-packages.yaml Fixed
Comment thread .github/workflows/live-share-test-usage.yaml Fixed
huntj88 and others added 2 commits January 8, 2026 15:25
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: huntj88 <10103298+huntj88@users.noreply.github.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Comment thread .github/workflows/live-share-build-samples.yaml Fixed
Comment thread .github/workflows/live-share-formatting.yaml Fixed
Comment thread .github/workflows/live-share-test-packages.yaml Fixed
Comment thread .github/workflows/live-share-test-usage.yaml Fixed
huntj88 and others added 3 commits April 2, 2026 15:22
…canvas package (#848)

Co-authored-by: James Hunt <jameshunt@microsoft.com>
…=2.40 <2.110 (#863)

Co-authored-by: James Hunt <jameshunt@microsoft.com>
Comment on lines +12 to +39
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x, 24.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm --loglevel verbose ci --ignore-scripts
timeout-minutes: 20

- run: npm install jest
working-directory: samples/javascript/02.react-video

- name: "build packages and samples"
run: npm run build

# TODO: get scenario_test.sh working

# - name: "test 02.react-video sample"
# shell: "bash"
# run: sh ../../../.github/workflows/scenario_test.sh
# working-directory: samples/javascript/02.react-video

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

Add an explicit permissions block to the workflow so the GITHUB_TOKEN is constrained to least privilege. The best fix here is to add it at the workflow root (top-level), since there is only one job and no sign of differing permission needs per job.

In .github/workflows/live-share-build-samples.yaml, insert:

permissions:
    contents: read

right after the trigger section (on: block) and before jobs:. This preserves existing behavior while explicitly limiting token access to read-only repository contents, which is sufficient for checkout/build in this snippet.

Suggested changeset 1
.github/workflows/live-share-build-samples.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/live-share-build-samples.yaml b/.github/workflows/live-share-build-samples.yaml
--- a/.github/workflows/live-share-build-samples.yaml
+++ b/.github/workflows/live-share-build-samples.yaml
@@ -7,6 +7,9 @@
         branches: [main, mainv2, "user/**", "copilot/**"]
     workflow_dispatch:
 
+permissions:
+    contents: read
+
 jobs:
     build:
         runs-on: ubuntu-latest
EOF
@@ -7,6 +7,9 @@
branches: [main, mainv2, "user/**", "copilot/**"]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +12 to +31
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x, 24.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- run: npm --loglevel verbose ci --ignore-scripts
timeout-minutes: 20

- name: "check formatting"
run: "bash checkFormatting.sh"
working-directory: .github/workflows

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

Add an explicit permissions block to the workflow, ideally at the root so it applies to all jobs unless overridden. For this workflow, the minimal and appropriate permission is:

  • contents: read

This preserves current functionality (actions/checkout and reading repository content) while enforcing least privilege.
Edit .github/workflows/live-share-formatting.yaml by inserting the permissions block between the trigger section and jobs:.

No imports, methods, or dependency changes are needed.

Suggested changeset 1
.github/workflows/live-share-formatting.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/live-share-formatting.yaml b/.github/workflows/live-share-formatting.yaml
--- a/.github/workflows/live-share-formatting.yaml
+++ b/.github/workflows/live-share-formatting.yaml
@@ -7,6 +7,9 @@
         branches: [main, mainv2, "user/**", "copilot/**"]
     workflow_dispatch:
 
+permissions:
+    contents: read
+
 jobs:
     build:
         runs-on: ubuntu-latest
EOF
@@ -7,6 +7,9 @@
branches: [main, mainv2, "user/**", "copilot/**"]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +12 to +40
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x, 24.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm --loglevel verbose ci --ignore-scripts
timeout-minutes: 20

- run: npm run prepare # will trigger a build of all packages

- name: "test live-share"
run: npm run test
working-directory: packages/live-share

- name: "test live-share-canvas"
run: npm run test
working-directory: packages/live-share-canvas

- name: "test live-share-media"
run: npm run test
working-directory: packages/live-share-media

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

Add an explicit permissions block at the workflow root so it applies to all jobs (including build) unless overridden. For this workflow, the minimal required scope is:

  • contents: read

This preserves existing functionality while preventing unintended broader token privileges if defaults change.

Change needed in:

  • .github/workflows/live-share-test-packages.yaml
  • Insert permissions: between the on: section and jobs: section.

No new imports, methods, or dependencies are required.

Suggested changeset 1
.github/workflows/live-share-test-packages.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/live-share-test-packages.yaml b/.github/workflows/live-share-test-packages.yaml
--- a/.github/workflows/live-share-test-packages.yaml
+++ b/.github/workflows/live-share-test-packages.yaml
@@ -7,6 +7,9 @@
         branches: [main, mainv2, "user/**", "copilot/**"]
     workflow_dispatch:
 
+permissions:
+    contents: read
+
 jobs:
     build:
         runs-on: ubuntu-latest
EOF
@@ -7,6 +7,9 @@
branches: [main, mainv2, "user/**", "copilot/**"]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +12 to +45
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x, 24.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm --loglevel verbose ci --ignore-scripts
timeout-minutes: 20

- run: npm run prepare # will trigger a build of all packages

- name: "test live-share with cjs app"
run: npm run test
working-directory: internal/usage-test/cjs-test

- name: "test live-share with esm app"
run: npm run test
working-directory: internal/usage-test/esm-test

- uses: pnpm/action-setup@v4
name: Install pnpm for next step
with:
version: 9
run_install: false
- name: "test live-share with pnpm typescript esm app"
run: pnpm run test
working-directory: internal/usage-test/pnpm-test

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 25 days ago

Add an explicit permissions block to the workflow so GITHUB_TOKEN is constrained regardless of repository/org defaults.

Best fix here (without changing functionality): define workflow-level permissions with contents: read, since all shown jobs/steps only need read access to repository contents (for checkout and testing). Place this near the top-level keys, e.g., after on: and before jobs:. This applies to all jobs unless overridden and resolves the CodeQL alert cleanly.

File to edit:

  • .github/workflows/live-share-test-usage.yaml
    Region:
  • Insert between lines 9 and 10 (between workflow_dispatch: and jobs:).

No imports, methods, or dependencies are needed.

Suggested changeset 1
.github/workflows/live-share-test-usage.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/live-share-test-usage.yaml b/.github/workflows/live-share-test-usage.yaml
--- a/.github/workflows/live-share-test-usage.yaml
+++ b/.github/workflows/live-share-test-usage.yaml
@@ -7,6 +7,9 @@
         branches: [main, mainv2, "user/**", "copilot/**"]
     workflow_dispatch:
 
+permissions:
+    contents: read
+
 jobs:
     build:
         runs-on: ubuntu-latest
EOF
@@ -7,6 +7,9 @@
branches: [main, mainv2, "user/**", "copilot/**"]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Copilot is powered by AI and may make mistakes. Always verify output.
huntj88 and others added 2 commits June 25, 2026 10:57
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: James Hunt <jameshunt@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7807308b-8b2a-4390-813d-a986277cec42
Copilot-Session: 59286b4a-1977-4cb4-a0f8-e50fde36924e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment