From 98f4adb84c6c1641ffaaa9ff592ea03ffd293bc1 Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Fri, 22 Aug 2025 17:04:50 +0300 Subject: [PATCH 01/16] Improve tsx trial to licensed task --- azure-pipelines/wc-grid-examples-react.yml | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 6191db3..c164203 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -151,17 +151,24 @@ 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' + - task: Bash@3 + displayName: 'Replace references to IG trial packages with licensed ones in TSX/TS 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 } + set -eo pipefail + echo "Replacing IG trial package imports with licensed ones..." + + # Process each file with logging but faster than while-read + find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) \ + ! -path "*/node_modules/*" -print0 | + xargs -0 -n 1 bash -c ' + file="$1" + echo "Processing $file" + sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-react-[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "$file" + ' _ + + echo "All references updated." - task: Npm@1 displayName: 'npm run build' From c2b120a852b7b97c5eed8dd8e9adbc2b7d4c5ad2 Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Fri, 22 Aug 2025 17:19:29 +0300 Subject: [PATCH 02/16] wip check new version of script --- azure-pipelines/wc-grid-examples-react.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index c164203..023693e 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -162,11 +162,10 @@ stages: # Process each file with logging but faster than while-read find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) \ ! -path "*/node_modules/*" -print0 | - xargs -0 -n 1 bash -c ' - file="$1" - echo "Processing $file" - sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-react-[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "$file" - ' _ + xargs -0 -I {} bash -c ' + echo "Processing {}" + sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-react-[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "{}" + ' echo "All references updated." From ed45c68cc59163072f11ac787083b2346c0ee8cf Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Fri, 22 Aug 2025 17:21:46 +0300 Subject: [PATCH 03/16] wip script rewrite --- azure-pipelines/wc-grid-examples-react.yml | 25 +++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 023693e..bcc9c46 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -159,13 +159,28 @@ stages: set -eo pipefail echo "Replacing IG trial package imports with licensed ones..." - # Process each file with logging but faster than while-read + # Process each .ts/.tsx file recursively, skip node_modules find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) \ ! -path "*/node_modules/*" -print0 | - xargs -0 -I {} bash -c ' - echo "Processing {}" - sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-react-[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "{}" - ' + while IFS= read -r -d '' file; do + echo "Processing $file" + + # Use a temporary file to avoid in-place issues + tmpfile=$(mktemp) + if sed "s/\(from\|import\)[[:space:]]\+\(['\"]\)\(igniteui-react-[^'\"]\+\|dockmanager.*\)\2/\1 \"@infragistics\/\3\"/g" "$file" > "$tmpfile"; then + # Only overwrite if content changed + if ! cmp -s "$file" "$tmpfile"; then + mv "$tmpfile" "$file" + echo "Replacements applied in $file" + else + rm "$tmpfile" + fi + else + echo "ERROR processing $file" + rm "$tmpfile" + exit 1 + fi + done echo "All references updated." From 6e1523d594f8a8aab58e195dbab927d49fdb7c5a Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Fri, 22 Aug 2025 17:33:33 +0300 Subject: [PATCH 04/16] modify tsx script --- azure-pipelines/wc-grid-examples-react.yml | 24 +++++----------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index bcc9c46..2a15cd1 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -159,28 +159,14 @@ stages: set -eo pipefail echo "Replacing IG trial package imports with licensed ones..." - # Process each .ts/.tsx file recursively, skip node_modules + # Process each file with logging find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) \ ! -path "*/node_modules/*" -print0 | - while IFS= read -r -d '' file; do + xargs -0 -n 1 bash -c ' + file="$1" echo "Processing $file" - - # Use a temporary file to avoid in-place issues - tmpfile=$(mktemp) - if sed "s/\(from\|import\)[[:space:]]\+\(['\"]\)\(igniteui-react-[^'\"]\+\|dockmanager.*\)\2/\1 \"@infragistics\/\3\"/g" "$file" > "$tmpfile"; then - # Only overwrite if content changed - if ! cmp -s "$file" "$tmpfile"; then - mv "$tmpfile" "$file" - echo "Replacements applied in $file" - else - rm "$tmpfile" - fi - else - echo "ERROR processing $file" - rm "$tmpfile" - exit 1 - fi - done + sed -i '\''s/\(from\|import\)[[:space:]]\+\(["'\'']\)\(igniteui-react-[^"'\'']\+\|dockmanager.*\)\2/\1 "@infragistics\/\3"/g'\'' "$file" + ' _ echo "All references updated." From bf646919190ee0a2fa9bf2f8ff811adbbc4eb3b3 Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Fri, 22 Aug 2025 17:40:40 +0300 Subject: [PATCH 05/16] tsx script update --- azure-pipelines/wc-grid-examples-react.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 2a15cd1..e891555 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -159,14 +159,12 @@ stages: set -eo pipefail echo "Replacing IG trial package imports with licensed ones..." - # Process each file with logging find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) \ ! -path "*/node_modules/*" -print0 | - xargs -0 -n 1 bash -c ' - file="$1" + while IFS= read -r -d '' file; do echo "Processing $file" - sed -i '\''s/\(from\|import\)[[:space:]]\+\(["'\'']\)\(igniteui-react-[^"'\'']\+\|dockmanager.*\)\2/\1 "@infragistics\/\3"/g'\'' "$file" - ' _ + sed -i 's/\(from\|import\)[[:space:]]\+["'\'']\(igniteui-react-[^"'\''']\+\|dockmanager.*\)["'\'']/\1 "@infragistics\/\2"/g' "$file" + done echo "All references updated." From 946ce5a08440c62285e0cb29ce224a566ba54974 Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Fri, 22 Aug 2025 17:44:20 +0300 Subject: [PATCH 06/16] simplify tsx script --- azure-pipelines/wc-grid-examples-react.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index e891555..3db3243 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -159,12 +159,14 @@ stages: set -eo pipefail echo "Replacing IG trial package imports with licensed ones..." + # Process each file with logging find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) \ ! -path "*/node_modules/*" -print0 | - while IFS= read -r -d '' file; do + xargs -0 -n 1 bash -c ' + file="$1" echo "Processing $file" - sed -i 's/\(from\|import\)[[:space:]]\+["'\'']\(igniteui-react-[^"'\''']\+\|dockmanager.*\)["'\'']/\1 "@infragistics\/\2"/g' "$file" - done + sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-react-[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "$file" + ' _ echo "All references updated." From 3ef56384eba50a3934c42cbe36d6492951f7101e Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Mon, 25 Aug 2025 17:15:44 +0300 Subject: [PATCH 07/16] fix sed in tsx script --- azure-pipelines/wc-grid-examples-react.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 3db3243..9c02370 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -159,15 +159,14 @@ stages: set -eo pipefail echo "Replacing IG trial package imports with licensed ones..." - # Process each file with logging find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) \ ! -path "*/node_modules/*" -print0 | xargs -0 -n 1 bash -c ' file="$1" echo "Processing $file" - sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-react-[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "$file" + sed -i "s/\(from\|import\)[[:space:]]\+['\"\(]\(igniteui-react-[^'\"\) ]\+\|dockmanager.*\)['\"\)]/\1 \"@infragistics\/\2\"/g" "$file" ' _ - + echo "All references updated." - task: Npm@1 From fdcc776db4d5362f90e0519b825848a0811eaa5e Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Tue, 26 Aug 2025 10:21:16 +0300 Subject: [PATCH 08/16] reorder pipeline --- azure-pipelines/wc-grid-examples-react.yml | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 9c02370..af57197 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -103,15 +103,6 @@ stages: workingFile: '$(Build.SourcesDirectory)/.npmrc' customEndpoint: 'public proget' - - task: Npm@1 - displayName: 'npm install --legacy-peer-deps' - inputs: - verbose: ${{ parameters.isVerbose }} - command: custom - workingDir: '$(Build.SourcesDirectory)' - customCommand: 'install --legacy-peer-deps' - customEndpoint: 'public proget' - # TODO: igniteui-cli to be used after project corrections - task: PowerShell@2 @@ -143,13 +134,13 @@ stages: ConvertTo-Json -InputObject $packageJson | Set-Content -Path .\package.json - - task: Npm@1 - displayName: 'npm install --legacy-peer-deps' - inputs: - verbose: ${{ parameters.isVerbose }} - command: custom - workingDir: '$(Build.SourcesDirectory)' - customCommand: 'install --legacy-peer-deps' + # - task: Npm@1 + # displayName: 'npm install --legacy-peer-deps' + # inputs: + # verbose: ${{ parameters.isVerbose }} + # command: custom + # workingDir: '$(Build.SourcesDirectory)' + # customCommand: 'install --legacy-peer-deps' - task: Bash@3 displayName: 'Replace references to IG trial packages with licensed ones in TSX/TS files' @@ -169,6 +160,15 @@ stages: echo "All references updated." + - task: Npm@1 + displayName: 'npm install --legacy-peer-deps' + inputs: + verbose: ${{ parameters.isVerbose }} + command: custom + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'install --legacy-peer-deps' + customEndpoint: 'public proget' + - task: Npm@1 displayName: 'npm run build' inputs: From 870e5996cdc8a6f53223a470b459a9c0c0db2bcf Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Tue, 26 Aug 2025 11:41:31 +0300 Subject: [PATCH 09/16] revert changes --- azure-pipelines/wc-grid-examples-react.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index af57197..6546838 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -134,13 +134,13 @@ stages: ConvertTo-Json -InputObject $packageJson | Set-Content -Path .\package.json - # - task: Npm@1 - # displayName: 'npm install --legacy-peer-deps' - # inputs: - # verbose: ${{ parameters.isVerbose }} - # command: custom - # workingDir: '$(Build.SourcesDirectory)' - # customCommand: 'install --legacy-peer-deps' + - task: Npm@1 + displayName: 'npm install --legacy-peer-deps' + inputs: + verbose: ${{ parameters.isVerbose }} + command: custom + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'install --legacy-peer-deps' - task: Bash@3 displayName: 'Replace references to IG trial packages with licensed ones in TSX/TS files' From eba40129a58f583557ab6100d953322358ff3e58 Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Tue, 26 Aug 2025 11:42:02 +0300 Subject: [PATCH 10/16] revert more changes --- azure-pipelines/wc-grid-examples-react.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 6546838..309acef 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -103,6 +103,15 @@ stages: workingFile: '$(Build.SourcesDirectory)/.npmrc' customEndpoint: 'public proget' + - task: Npm@1 + displayName: 'npm install --legacy-peer-deps' + inputs: + verbose: ${{ parameters.isVerbose }} + command: custom + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'install --legacy-peer-deps' + customEndpoint: 'public proget' + # TODO: igniteui-cli to be used after project corrections - task: PowerShell@2 From 706ff452474cd273e173de19022d982c60ec7a54 Mon Sep 17 00:00:00 2001 From: rstratkovinfrag Date: Tue, 26 Aug 2025 11:42:58 +0300 Subject: [PATCH 11/16] revert --- azure-pipelines/wc-grid-examples-react.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 309acef..9c02370 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -169,15 +169,6 @@ stages: echo "All references updated." - - task: Npm@1 - displayName: 'npm install --legacy-peer-deps' - inputs: - verbose: ${{ parameters.isVerbose }} - command: custom - workingDir: '$(Build.SourcesDirectory)' - customCommand: 'install --legacy-peer-deps' - customEndpoint: 'public proget' - - task: Npm@1 displayName: 'npm run build' inputs: From ad7bceb41939d79e5dc47cb343345af3dd348d41 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Tue, 26 Aug 2025 11:55:50 +0300 Subject: [PATCH 12/16] Let's try with the same char escapes as in WC's pipeline --- azure-pipelines/wc-grid-examples-react.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 9c02370..ec54dd9 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -159,12 +159,11 @@ stages: set -eo pipefail echo "Replacing IG trial package imports with licensed ones..." - find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) \ - ! -path "*/node_modules/*" -print0 | + find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) ! -path "*/node_modules/*" -print0 | xargs -0 -n 1 bash -c ' file="$1" echo "Processing $file" - sed -i "s/\(from\|import\)[[:space:]]\+['\"\(]\(igniteui-react-[^'\"\) ]\+\|dockmanager.*\)['\"\)]/\1 \"@infragistics\/\2\"/g" "$file" + sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-react-[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "$file" ' _ echo "All references updated." From d05279472d93345d0b4bc427d0042597bfaec761 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Tue, 26 Aug 2025 12:02:27 +0300 Subject: [PATCH 13/16] Handle the ig react package imports as well --- azure-pipelines/wc-grid-examples-react.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index ec54dd9..558ff09 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -163,7 +163,7 @@ stages: xargs -0 -n 1 bash -c ' file="$1" echo "Processing $file" - sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-react-[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "$file" + sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-react-?[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "$file" ' _ echo "All references updated." From 0d09b70721047242361af6ca32a82cfb773e4013 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Tue, 26 Aug 2025 12:06:30 +0300 Subject: [PATCH 14/16] Refactor the npm install calls --- azure-pipelines/wc-grid-examples-react.yml | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 558ff09..5e84cf8 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -89,28 +89,12 @@ stages: publishLocation: 'pipeline' - task: Npm@1 - displayName: 'Register licensed npm registry in .npmrc' - inputs: - verbose: ${{ parameters.isVerbose }} - command: 'custom' - workingDir: '$(Build.SourcesDirectory)' - customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' - customEndpoint: 'public proget' - - - task: npmAuthenticate@0 - displayName: '[IG Production ProGet] npm authenticate' - inputs: - workingFile: '$(Build.SourcesDirectory)/.npmrc' - customEndpoint: 'public proget' - - - task: Npm@1 - displayName: 'npm install --legacy-peer-deps' + displayName: 'npm install with trial packages - to get a sensible dependency tree' inputs: verbose: ${{ parameters.isVerbose }} command: custom workingDir: '$(Build.SourcesDirectory)' customCommand: 'install --legacy-peer-deps' - customEndpoint: 'public proget' # TODO: igniteui-cli to be used after project corrections @@ -144,12 +128,28 @@ stages: ConvertTo-Json -InputObject $packageJson | Set-Content -Path .\package.json - task: Npm@1 - displayName: 'npm install --legacy-peer-deps' + displayName: 'Register licensed npm registry in .npmrc' + inputs: + verbose: ${{ parameters.isVerbose }} + command: 'custom' + workingDir: '$(Build.SourcesDirectory)' + customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/' + customEndpoint: 'public proget' + + - task: npmAuthenticate@0 + displayName: '[IG Production ProGet] npm authenticate' + inputs: + workingFile: '$(Build.SourcesDirectory)/.npmrc' + customEndpoint: 'public proget' + + - task: Npm@1 + displayName: 'npm install with licensed packages' inputs: verbose: ${{ parameters.isVerbose }} command: custom workingDir: '$(Build.SourcesDirectory)' customCommand: 'install --legacy-peer-deps' + customEndpoint: 'public proget' - task: Bash@3 displayName: 'Replace references to IG trial packages with licensed ones in TSX/TS files' From f7c77b4bd4e999f19e1877e0aa7c26f83d3c289f Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Tue, 26 Aug 2025 12:11:30 +0300 Subject: [PATCH 15/16] Try to make sed print what it's trying to replace --- azure-pipelines/wc-grid-examples-react.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 5e84cf8..78b8d1f 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -163,7 +163,7 @@ stages: xargs -0 -n 1 bash -c ' file="$1" echo "Processing $file" - sed -i "s/\(from\|import\)[[:space:]]\+[\"'\'']\(igniteui-react-?[^\"'\'']\+\|dockmanager.*\)[\"'\'']/\1 \"@infragistics\/\2\"/g" "$file" + sed -n "s/\(from\|import\)[[:space:]]\+[\"'']\(igniteui-react[^\"'']*\|dockmanager.*\)[\"'']/\1 \"@infragistics\/\2\"/gp" "$file" ' _ echo "All references updated." From dc0960fc7bf55a045e9255130ab298c5873cddd1 Mon Sep 17 00:00:00 2001 From: Borislav Traykov Date: Tue, 26 Aug 2025 12:50:58 +0300 Subject: [PATCH 16/16] refactor trial-to-licensed for ts & tsx files --- azure-pipelines/wc-grid-examples-react.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-pipelines/wc-grid-examples-react.yml b/azure-pipelines/wc-grid-examples-react.yml index 78b8d1f..7fd430e 100644 --- a/azure-pipelines/wc-grid-examples-react.yml +++ b/azure-pipelines/wc-grid-examples-react.yml @@ -159,11 +159,13 @@ stages: set -eo pipefail echo "Replacing IG trial package imports with licensed ones..." - find "$(Build.SourcesDirectory)" -type f \( -name "*.ts" -o -name "*.tsx" \) ! -path "*/node_modules/*" -print0 | + find . -type f \( -name "*.ts" -o -name "*.tsx" \) ! -path "*/node_modules/*" -print0 | xargs -0 -n 1 bash -c ' file="$1" echo "Processing $file" - sed -n "s/\(from\|import\)[[:space:]]\+[\"'']\(igniteui-react[^\"'']*\|dockmanager.*\)[\"'']/\1 \"@infragistics\/\2\"/gp" "$file" + + # Replace imports from igniteui-react* or dockmanager + sed -i "s/\(from\|import\)[[:space:]]\+\([\"'\''\]\)\(igniteui-react[^\"'\''[:space:]]*\|dockmanager[^\"'\''[:space:]]*\)\2/\1 \"@infragistics\/\3\"/g" "$file" ' _ echo "All references updated."