From 34445541ecec23558b41fa3b418ee244889f2ee6 Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Fri, 2 Jun 2023 16:07:03 -0500 Subject: [PATCH 01/10] Testing --- packages/nimble-blazor/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nimble-blazor/package.json b/packages/nimble-blazor/package.json index 6295d33c42..1ce9355e61 100644 --- a/packages/nimble-blazor/package.json +++ b/packages/nimble-blazor/package.json @@ -11,8 +11,8 @@ "generate-icons:bundle": "rollup --bundleConfigAsCjs --config build/generate-icons/rollup.config.js", "generate-icons:run": "node build/generate-icons/dist/index.js", "generate-hybrid": "rollup --bundleConfigAsCjs --config build/generate-hybrid/rollup.config.js", - "lint": "npm run lint:js", - "lint:cs": "dotnet format --verify-no-changes", + "lint": "npm run lint:cs && npm run lint:js", + "lint:cs": "dotnet --info && dotnet format --verify-no-changes", "lint:js": "eslint .", "format": "npm run format:cs && npm run format:js", "format:cs": "dotnet format", From 1f0d982de24107a64c130ae02237727968ac3023 Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Fri, 2 Jun 2023 16:07:21 -0500 Subject: [PATCH 02/10] Change files --- ...nimble-blazor-d4f88529-2aa9-48d9-b605-1eb45277fd1e.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@ni-nimble-blazor-d4f88529-2aa9-48d9-b605-1eb45277fd1e.json diff --git a/change/@ni-nimble-blazor-d4f88529-2aa9-48d9-b605-1eb45277fd1e.json b/change/@ni-nimble-blazor-d4f88529-2aa9-48d9-b605-1eb45277fd1e.json new file mode 100644 index 0000000000..d1969f8a79 --- /dev/null +++ b/change/@ni-nimble-blazor-d4f88529-2aa9-48d9-b605-1eb45277fd1e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Re-enable Blazor linting", + "packageName": "@ni/nimble-blazor", + "email": "20709258+msmithNI@users.noreply.github.com", + "dependentChangeType": "none" +} From 68491fe63a5fdcdd63be2ef25c6ddedb22301048 Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Fri, 2 Jun 2023 16:35:51 -0500 Subject: [PATCH 03/10] Force .NET 6.0.2xx on build agent --- .github/workflows/main.yml | 4 ++++ packages/nimble-blazor/global.ci.json | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 packages/nimble-blazor/global.ci.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index daa48a7ee0..2a6b01f31b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,6 +41,10 @@ jobs: # only informational so swallow error codes - run: npm outdated || exit 0 + # Force .NET 6.0.2xx for Blazor build (agent now has 7.0.2xx which is broken, see https://github.com/dotnet/format/issues/1800) + - name: Apply global.json for nimble-blazor + run: mv packages/nimble-blazor/global.ci.json packages/nimble-blazor/global.json + # Audit - run: npm audit --only=prod # https://github.com/ni/nimble/issues/801 diff --git a/packages/nimble-blazor/global.ci.json b/packages/nimble-blazor/global.ci.json new file mode 100644 index 0000000000..32e432f252 --- /dev/null +++ b/packages/nimble-blazor/global.ci.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "6.0.200", + "allowPrelease": "false", + "rollForward": "patch" + } +} \ No newline at end of file From b1c54e18fe87c78309aedb9e9e04fb17b206456c Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Fri, 2 Jun 2023 16:45:53 -0500 Subject: [PATCH 04/10] Update to allow .NET 6.x --- .github/workflows/main.yml | 2 +- packages/nimble-blazor/global.ci.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2a6b01f31b..4e337478d3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: # only informational so swallow error codes - run: npm outdated || exit 0 - # Force .NET 6.0.2xx for Blazor build (agent now has 7.0.2xx which is broken, see https://github.com/dotnet/format/issues/1800) + # Force .NET 6.0.xxx for Blazor build (agent now has a newer version which breaks 'dotnet format', see https://github.com/dotnet/format/issues/1800) - name: Apply global.json for nimble-blazor run: mv packages/nimble-blazor/global.ci.json packages/nimble-blazor/global.json diff --git a/packages/nimble-blazor/global.ci.json b/packages/nimble-blazor/global.ci.json index 32e432f252..8665fb05e8 100644 --- a/packages/nimble-blazor/global.ci.json +++ b/packages/nimble-blazor/global.ci.json @@ -2,6 +2,6 @@ "sdk": { "version": "6.0.200", "allowPrelease": "false", - "rollForward": "patch" + "rollForward": "latestMinor" } } \ No newline at end of file From 117c0e4564aa8a2279241d6366425579bb5977db Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Fri, 2 Jun 2023 17:01:27 -0500 Subject: [PATCH 05/10] Move dotnet --info to separate CI step --- .github/workflows/main.yml | 3 +++ packages/nimble-blazor/package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e337478d3..10195a2fd0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,6 +41,9 @@ jobs: # only informational so swallow error codes - run: npm outdated || exit 0 + # Print .NET info for installed SDK versions + - run: dotnet --info + # Force .NET 6.0.xxx for Blazor build (agent now has a newer version which breaks 'dotnet format', see https://github.com/dotnet/format/issues/1800) - name: Apply global.json for nimble-blazor run: mv packages/nimble-blazor/global.ci.json packages/nimble-blazor/global.json diff --git a/packages/nimble-blazor/package.json b/packages/nimble-blazor/package.json index 1ce9355e61..40891a590a 100644 --- a/packages/nimble-blazor/package.json +++ b/packages/nimble-blazor/package.json @@ -12,7 +12,7 @@ "generate-icons:run": "node build/generate-icons/dist/index.js", "generate-hybrid": "rollup --bundleConfigAsCjs --config build/generate-hybrid/rollup.config.js", "lint": "npm run lint:cs && npm run lint:js", - "lint:cs": "dotnet --info && dotnet format --verify-no-changes", + "lint:cs": "dotnet format --verify-no-changes", "lint:js": "eslint .", "format": "npm run format:cs && npm run format:js", "format:cs": "dotnet format", From 14a63a21cc35d6c774822f1af8eb1f523848b21b Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Fri, 2 Jun 2023 17:02:29 -0500 Subject: [PATCH 06/10] Update global.ci.json --- packages/nimble-blazor/global.ci.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nimble-blazor/global.ci.json b/packages/nimble-blazor/global.ci.json index 8665fb05e8..6b8a74b112 100644 --- a/packages/nimble-blazor/global.ci.json +++ b/packages/nimble-blazor/global.ci.json @@ -1,7 +1,7 @@ { "sdk": { "version": "6.0.200", - "allowPrelease": "false", - "rollForward": "latestMinor" + "allowPrelease": "false", + "rollForward": "latestMinor" } -} \ No newline at end of file +} From 4e35735781ec49aac69bb07bc2dbd9b63f403131 Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Fri, 2 Jun 2023 17:19:28 -0500 Subject: [PATCH 07/10] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10195a2fd0..bbf9f8342d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,7 @@ jobs: # Force .NET 6.0.xxx for Blazor build (agent now has a newer version which breaks 'dotnet format', see https://github.com/dotnet/format/issues/1800) - name: Apply global.json for nimble-blazor - run: mv packages/nimble-blazor/global.ci.json packages/nimble-blazor/global.json + run: cp packages/nimble-blazor/global.ci.json packages/nimble-blazor/global.json # Audit - run: npm audit --only=prod From 3bc7fcab61e1925e0e967973a6a8662ef24046c1 Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Mon, 5 Jun 2023 16:20:08 -0500 Subject: [PATCH 08/10] PR feedback. Use global.json locally too. Update docs. Update main.yml to use same .NET version as global.json explicitly. --- .github/workflows/main.yml | 6 +----- CONTRIBUTING.md | 3 ++- packages/nimble-blazor/CONTRIBUTING.md | 2 +- packages/nimble-blazor/README.md | 2 +- packages/nimble-blazor/{global.ci.json => global.json} | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) rename packages/nimble-blazor/{global.ci.json => global.json} (75%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bbf9f8342d..ae7d1cff24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: # Install dependencies - uses: actions/setup-dotnet@v3 with: - dotnet-version: '6.0.x' + global-json-file: packages/nimble-blazor/global.json - uses: actions/setup-node@v3 with: node-version: '16' @@ -44,10 +44,6 @@ jobs: # Print .NET info for installed SDK versions - run: dotnet --info - # Force .NET 6.0.xxx for Blazor build (agent now has a newer version which breaks 'dotnet format', see https://github.com/dotnet/format/issues/1800) - - name: Apply global.json for nimble-blazor - run: cp packages/nimble-blazor/global.ci.json packages/nimble-blazor/global.json - # Audit - run: npm audit --only=prod # https://github.com/ni/nimble/issues/801 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b724ddbcc..57c52c1103 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,7 +22,8 @@ This repository uses the following tooling. See below for more info. First step in development is to build the monorepo which requires the following to be installed: - Node.js version 16+ (run `node --version`) and npm version 8+ (run `npm --version`) which can be downloaded from https://nodejs.org/en/download/ -- .NET 6 SDK version 6.0.202+ (run `dotnet --version`) which can be downloaded from https://dotnet.microsoft.com/en-us/download +- .NET 6 SDK (`6.0.202 <= version < 7`) which can be downloaded from https://dotnet.microsoft.com/en-us/download + - Run `dotnet --info` to verify the required version of the SDK is installed. A `v6` install is required, but it's fine if later versions are installed too. From the `nimble` directory: diff --git a/packages/nimble-blazor/CONTRIBUTING.md b/packages/nimble-blazor/CONTRIBUTING.md index a7aaa659bd..3a605dff4c 100644 --- a/packages/nimble-blazor/CONTRIBUTING.md +++ b/packages/nimble-blazor/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Getting Started -If not already done, download and install the .NET 6 SDK version 6.0.202+ (run `dotnet --version`) which can be downloaded from https://dotnet.microsoft.com/en-us/download +If not already done, download and install the .NET SDK (see [the main contributing doc](../../CONTRIBUTING.md) for the required version). Initialize and build the Nimble monorepo (`npm install` + `npm run build` from the root `nimble` directory) before working with the Blazor codebase. diff --git a/packages/nimble-blazor/README.md b/packages/nimble-blazor/README.md index 0cfea8c2aa..28609645e4 100644 --- a/packages/nimble-blazor/README.md +++ b/packages/nimble-blazor/README.md @@ -21,7 +21,7 @@ This repo contains: - Visual Studio 2022 ([Enterprise, if available](https://my.visualstudio.com/Downloads?PId=8229)): Choose the "ASP.NET and Web Development" Workload in the installer - Ensure Visual Studio is completely up to date (v17.1.6+): In Visual Studio click "Help" then "Check for Updates" - **Mac with Visual Studio Code**: Install [Visual Studio Code](https://code.visualstudio.com/) and open it. Open the Extensions pane ("Preferences" >> "Extensions"), and search for / install the `ms-dotnettools.csharp` extension. -2. .NET 6 SDK: If not already done, download and install the .NET 6 SDK version 6.0.202+ (run `dotnet --version`) which can be downloaded from https://dotnet.microsoft.com/en-us/download +2. .NET SDK: See [the main contributing doc](../../CONTRIBUTING.md) for the required version. ### Creating a new Blazor project diff --git a/packages/nimble-blazor/global.ci.json b/packages/nimble-blazor/global.json similarity index 75% rename from packages/nimble-blazor/global.ci.json rename to packages/nimble-blazor/global.json index 6b8a74b112..bfdf1e2ca5 100644 --- a/packages/nimble-blazor/global.ci.json +++ b/packages/nimble-blazor/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.200", + "version": "6.0.202", "allowPrelease": "false", "rollForward": "latestMinor" } From d760cdfbf2ea0475bec7fc4a935a48a33a0e0f1f Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Mon, 5 Jun 2023 17:37:33 -0500 Subject: [PATCH 09/10] PR feedback --- .github/workflows/main.yml | 5 ++--- ...nimble-blazor-d4f88529-2aa9-48d9-b605-1eb45277fd1e.json | 7 ------- packages/nimble-blazor/CONTRIBUTING.md | 2 +- packages/nimble-blazor/README.md | 2 +- 4 files changed, 4 insertions(+), 12 deletions(-) delete mode 100644 change/@ni-nimble-blazor-d4f88529-2aa9-48d9-b605-1eb45277fd1e.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae7d1cff24..6d54018010 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,8 @@ jobs: - uses: actions/setup-dotnet@v3 with: global-json-file: packages/nimble-blazor/global.json + - run: dotnet --info + working-directory: packages/nimble-blazor/ - uses: actions/setup-node@v3 with: node-version: '16' @@ -41,9 +43,6 @@ jobs: # only informational so swallow error codes - run: npm outdated || exit 0 - # Print .NET info for installed SDK versions - - run: dotnet --info - # Audit - run: npm audit --only=prod # https://github.com/ni/nimble/issues/801 diff --git a/change/@ni-nimble-blazor-d4f88529-2aa9-48d9-b605-1eb45277fd1e.json b/change/@ni-nimble-blazor-d4f88529-2aa9-48d9-b605-1eb45277fd1e.json deleted file mode 100644 index d1969f8a79..0000000000 --- a/change/@ni-nimble-blazor-d4f88529-2aa9-48d9-b605-1eb45277fd1e.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "Re-enable Blazor linting", - "packageName": "@ni/nimble-blazor", - "email": "20709258+msmithNI@users.noreply.github.com", - "dependentChangeType": "none" -} diff --git a/packages/nimble-blazor/CONTRIBUTING.md b/packages/nimble-blazor/CONTRIBUTING.md index 3a605dff4c..d89f2e2ab7 100644 --- a/packages/nimble-blazor/CONTRIBUTING.md +++ b/packages/nimble-blazor/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Getting Started -If not already done, download and install the .NET SDK (see [the main contributing doc](../../CONTRIBUTING.md) for the required version). +If not already done, download and install the .NET SDK (see [the main contributing doc](/CONTRIBUTING.md) for the required version). Initialize and build the Nimble monorepo (`npm install` + `npm run build` from the root `nimble` directory) before working with the Blazor codebase. diff --git a/packages/nimble-blazor/README.md b/packages/nimble-blazor/README.md index 28609645e4..11314a368b 100644 --- a/packages/nimble-blazor/README.md +++ b/packages/nimble-blazor/README.md @@ -21,7 +21,7 @@ This repo contains: - Visual Studio 2022 ([Enterprise, if available](https://my.visualstudio.com/Downloads?PId=8229)): Choose the "ASP.NET and Web Development" Workload in the installer - Ensure Visual Studio is completely up to date (v17.1.6+): In Visual Studio click "Help" then "Check for Updates" - **Mac with Visual Studio Code**: Install [Visual Studio Code](https://code.visualstudio.com/) and open it. Open the Extensions pane ("Preferences" >> "Extensions"), and search for / install the `ms-dotnettools.csharp` extension. -2. .NET SDK: See [the main contributing doc](../../CONTRIBUTING.md) for the required version. +2. .NET SDK: See [the main contributing doc](/CONTRIBUTING.md) for the required version. ### Creating a new Blazor project From b399c167f776a492039c8970dcfbef7a0e0132a1 Mon Sep 17 00:00:00 2001 From: Malcolm Smith <20709258+msmithNI@users.noreply.github.com> Date: Mon, 5 Jun 2023 17:38:17 -0500 Subject: [PATCH 10/10] Change files --- ...nimble-blazor-48a8f3aa-cad3-4fc9-8a98-159d24ed56d0.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@ni-nimble-blazor-48a8f3aa-cad3-4fc9-8a98-159d24ed56d0.json diff --git a/change/@ni-nimble-blazor-48a8f3aa-cad3-4fc9-8a98-159d24ed56d0.json b/change/@ni-nimble-blazor-48a8f3aa-cad3-4fc9-8a98-159d24ed56d0.json new file mode 100644 index 0000000000..8861fc783b --- /dev/null +++ b/change/@ni-nimble-blazor-48a8f3aa-cad3-4fc9-8a98-159d24ed56d0.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Specify .NET 6 via global.json file; re-enable Blazor linting", + "packageName": "@ni/nimble-blazor", + "email": "20709258+msmithNI@users.noreply.github.com", + "dependentChangeType": "patch" +}