From 7ff56f6f3457b3600d356b0765cac2d2ca35d462 Mon Sep 17 00:00:00 2001 From: Deyan Kamburov Date: Thu, 31 Jul 2025 11:51:31 +0300 Subject: [PATCH 1/3] Update wc-grid-examples-react.yml for Azure Pipelines Add trial to licensed conversion --- wc-grid-examples-react.yml | 77 +++++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 25 deletions(-) diff --git a/wc-grid-examples-react.yml b/wc-grid-examples-react.yml index 7ed836e..c979c58 100644 --- a/wc-grid-examples-react.yml +++ b/wc-grid-examples-react.yml @@ -107,31 +107,58 @@ stages: customCommand: 'install --legacy-peer-deps' customEndpoint: 'public proget' - # TODO: igniteui-cli to be used after project corrections - # to be able to use licensed packages - # - task: Npm@1 - # displayName: 'Install Ignite UI CLI globally' - # inputs: - # verbose: ${{ parameters.isVerbose }} - # command: custom - # workingDir: '$(Build.SourcesDirectory)' - # customCommand: 'install -g igniteui-cli' - - # - task: Bash@3 - # displayName: 'Run Ignite UI Upgrade in Root and All Project Subdirectories' - # inputs: - # targetType: 'inline' - # script: | - # echo "Running Ignite UI package upgrade at root level..." - # npx ig upgrade-packages --skip-install - - # echo "Running Ignite UI package upgrade in all project subdirectories..." - # for dir in $(Build.SourcesDirectory)/projects/*/; do - # if [ -d "$dir" ]; then - # echo "Processing: $dir" - # (cd "$dir" && npx ig upgrade-packages --skip-install) - # fi - # done + - task: Npm@1 + displayName: 'Install Ignite UI CLI globally' + inputs: + verbose: ${{ parameters.isVerbose }} + command: custom + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'install -g igniteui-cli' + + - task: Bash@3 + displayName: 'Run Ignite UI Upgrade in Root and All Project Subdirectories' + inputs: + targetType: 'inline' + script: | + echo "Running Ignite UI package upgrade at root level..." + npx ig upgrade-packages --skip-install + + echo "Running Ignite UI package upgrade in all project subdirectories..." + for dir in $(Build.SourcesDirectory)/projects/*/; do + if [ -d "$dir" ]; then + echo "Processing: $dir" + (cd "$dir" && npx ig upgrade-packages --skip-install) + fi + done + + - task: PowerShell@2 + displayName: 'Replace references to IG trial packages with licensed ones' + inputs: + failOnStderr: true + showWarnings: true + workingDirectory: '$(Build.SourcesDirectory)' + targetType: 'inline' + script: | + $packageJson = Get-Content -Raw .\package.json | ConvertFrom-Json + $properties = $packageJson.dependencies.PSObject.Properties ` + | where-object { $_.Name.StartsWith("igniteui-react") -or $_.Name.StartsWith("igniteui-dockmanager") } + + foreach( $property in $properties ) + { + $oldName = $property.Name; + $newName = "@infragistics/" + $oldName + + # remember the current value of the old property + $value = $property.Value; + + # remove reference to the trial package reference + $packageJson.dependencies.psobject.Properties.Remove($oldName); + + # add reference to the licensed package reference + $packageJson.dependencies | Add-Member -NotePropertyName $newName -NotePropertyValue $value; + } + + ConvertTo-Json -InputObject $packageJson | Set-Content -Path .\package.json - task: Npm@1 displayName: 'npm install --legacy-peer-deps' From 2b1f05036f0914349fad27767b9ca4ff648a467b Mon Sep 17 00:00:00 2001 From: Deyan Kamburov Date: Thu, 31 Jul 2025 12:02:02 +0300 Subject: [PATCH 2/3] comment out migration with the cli --- wc-grid-examples-react.yml | 50 ++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/wc-grid-examples-react.yml b/wc-grid-examples-react.yml index c979c58..586cc10 100644 --- a/wc-grid-examples-react.yml +++ b/wc-grid-examples-react.yml @@ -107,30 +107,32 @@ stages: customCommand: 'install --legacy-peer-deps' customEndpoint: 'public proget' - - task: Npm@1 - displayName: 'Install Ignite UI CLI globally' - inputs: - verbose: ${{ parameters.isVerbose }} - command: custom - workingDir: '$(Build.SourcesDirectory)' - customCommand: 'install -g igniteui-cli' - - - task: Bash@3 - displayName: 'Run Ignite UI Upgrade in Root and All Project Subdirectories' - inputs: - targetType: 'inline' - script: | - echo "Running Ignite UI package upgrade at root level..." - npx ig upgrade-packages --skip-install - - echo "Running Ignite UI package upgrade in all project subdirectories..." - for dir in $(Build.SourcesDirectory)/projects/*/; do - if [ -d "$dir" ]; then - echo "Processing: $dir" - (cd "$dir" && npx ig upgrade-packages --skip-install) - fi - done - + # TODO: igniteui-cli to be used after project corrections + # to be able to use licensed packages + # - task: Npm@1 + # displayName: 'Install Ignite UI CLI globally' + # inputs: + # verbose: ${{ parameters.isVerbose }} + # command: custom + # workingDir: '$(Build.SourcesDirectory)' + # customCommand: 'install -g igniteui-cli' + + # - task: Bash@3 + # displayName: 'Run Ignite UI Upgrade in Root and All Project Subdirectories' + # inputs: + # targetType: 'inline' + # script: | + # echo "Running Ignite UI package upgrade at root level..." + # npx ig upgrade-packages --skip-install + + # echo "Running Ignite UI package upgrade in all project subdirectories..." + # for dir in $(Build.SourcesDirectory)/projects/*/; do + # if [ -d "$dir" ]; then + # echo "Processing: $dir" + # (cd "$dir" && npx ig upgrade-packages --skip-install) + # fi + # done + - task: PowerShell@2 displayName: 'Replace references to IG trial packages with licensed ones' inputs: From 528859c259b74bf574f3df6db39c9dc036bb1156 Mon Sep 17 00:00:00 2001 From: Deyan Kamburov Date: Thu, 31 Jul 2025 12:18:57 +0300 Subject: [PATCH 3/3] Replace references to IG trial packages with licensed ones in TSX files --- wc-grid-examples-react.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wc-grid-examples-react.yml b/wc-grid-examples-react.yml index 586cc10..cfa405a 100644 --- a/wc-grid-examples-react.yml +++ b/wc-grid-examples-react.yml @@ -170,6 +170,18 @@ stages: workingDir: '$(Build.SourcesDirectory)' customCommand: 'install --legacy-peer-deps' + - task: PowerShell@2 + displayName: 'Replace references to IG trial packages with licensed ones in TSX files' + inputs: + failOnStderr: true + showWarnings: true + workingDirectory: '$(Build.SourcesDirectory)' + targetType: 'inline' + script: | + Get-ChildItem -Include "*.tsx","*.ts" -Recurse | ` + ForEach { (Get-Content $_.PSPath | ForEach { ($_ -replace '([from|import])\s?[''"](igniteui-[react|dockmanager].*)[''"]', '$1 "@infragistics/$2"') }) | ` + Set-Content $_.PSPath } + - task: Npm@1 displayName: 'npm run build' inputs: