diff --git a/.eslintrc.json b/.eslintrc.json index cf81c07acc..3dfe675446 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -195,30 +195,6 @@ "plugin:react/recommended" ] }, - { - "files": [ - "*.vue" - ], - "parserOptions": { - "ecmaFeatures": { - "jsx": false - } - }, - "plugins": [ - "@typescript-eslint", - "vue" - ], - "extends": [ - "plugin:vue/essential", - "eslint:recommended", - "@vue/eslint-config-typescript" - ], - "rules": { - "no-extra-boolean-cast": "off", - "vue/no-use-v-if-with-v-for": "off", - "vue/multi-word-component-names": "off" - } - }, { "files": [ "*.js" diff --git a/.testcaferc.dev.js b/.testcaferc.dev.js index 6dc8b1952b..b07ad52cc4 100644 --- a/.testcaferc.dev.js +++ b/.testcaferc.dev.js @@ -1,5 +1,5 @@ module.exports = { - "browsers": [`chrome:${require("puppeteer").executablePath()}`], + "browsers": [`chrome:${require("puppeteer").executablePath()} --window-size=1920,1080`], "nativeAutomation": "true", } \ No newline at end of file diff --git a/.testcaferc.js b/.testcaferc.js index d98ed03cf9..570716918e 100644 --- a/.testcaferc.js +++ b/.testcaferc.js @@ -1,7 +1,7 @@ module.exports = { - "browsers": [`chrome:${require("puppeteer").executablePath()}:headless`], + "browsers": [`chrome:${require("puppeteer").executablePath()}:headless --window-size=1920,1080`], "nativeAutomation": "true", "concurrency": 4, "quarantineMode": { diff --git a/CHANGELOG.md b/CHANGELOG.md index c2b3b1d54c..02b9eaf601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [1.12.17](https://github.com/surveyjs/survey-library/compare/v1.12.16...v1.12.17) (2024-12-30) + ## [1.12.16](https://github.com/surveyjs/survey-library/compare/v1.12.15...v1.12.16) (2024-12-24) ## [1.12.15](https://github.com/surveyjs/survey-library/compare/v1.12.14...v1.12.15) (2024-12-17) diff --git a/accessibility-tests.yml b/accessibility-tests.yml index 27fd6a9e96..1c2d13145b 100644 --- a/accessibility-tests.yml +++ b/accessibility-tests.yml @@ -3,394 +3,343 @@ # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - trigger: batch: true branches: include: - - master + - master tags: exclude: - v*.*.* pool: - vmImage: 'windows-latest' + vmImage: "windows-latest" jobs: -- job: Knockout - steps: - - checkout: self - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_knockout_prod - displayName: 'build prod' - - - script: | - npm run accessibility-tests:ci:knockout - displayName: 'Accessibility Tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Knockout_AXE' - OverWrite: true - condition: always() - displayName: 'copy accessibility artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Knockout_AXE/' - ArtifactName: 'Library_Knockout_AXE' - publishLocation: 'Container' - condition: always() - displayName: 'publish accessibility artifacts' - -- job: React - steps: - - checkout: self - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - powershell: | - npm run build_react_prod - npm run build_core - npm run build_react_ui - displayName: 'build prod' - - - script: | - npm run accessibility-tests:ci:react - displayName: 'Accessibility Tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_React_AXE' - OverWrite: true - condition: always() - displayName: 'copy accessibility artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_React_AXE/' - ArtifactName: 'Library_React_AXE' - publishLocation: 'Container' - condition: always() - displayName: 'publish accessibility artifacts' - -- job: Vue - steps: - - checkout: self - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_vue_prod - displayName: 'build prod' - - - script: | - npm run accessibility-tests:ci:vue - displayName: 'Accessibility Tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Vue_AXE' - OverWrite: true - condition: always() - displayName: 'copy accessibility artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Vue_AXE/' - ArtifactName: 'Library_Vue_AXE' - publishLocation: 'Container' - condition: always() - displayName: 'publish accessibility artifacts' - -- job: Angular - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install root' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - powershell: | - npm run build_core - npm run build_i18n_dev - npm run build-plugins - displayName: "Build Core" - - - script: | - cd packages/survey-angular-ui - npm install - displayName: "NPM install packages/survey-angular-ui" - - - script: | - cd packages/survey-angular-ui - npm run build - displayName: "Build Angular" - - - script: | - cd packages/survey-angular-ui/example - npm install - displayName: "NPM install examples/angular-ui" - - - script: | - cd packages/survey-angular-ui - npm run build:example - displayName: "Build Angular Example" - - - script: | - npm run accessibility-tests:ci:angular - displayName: "run accessibility tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Angular_AXE' - OverWrite: true - condition: always() - displayName: 'copy accessibility artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Angular_AXE/' - ArtifactName: 'Library_Angular_AXE' - publishLocation: 'Container' - condition: always() - displayName: 'publish accessibility artifacts' - -- job: Vue3 - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install root' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - powershell: | - npm run build_core - npm run build_i18n_dev - npm run build-plugins - displayName: "Build Core" - - - script: | - cd packages/survey-vue3-ui - npm install - displayName: "NPM install packages/survey-vue3-ui" - - - script: | - cd packages/survey-vue3-ui - npm run build - displayName: "Build Vue3" - - - script: | - cd packages/survey-vue3-ui/example - npm install - displayName: "NPM install Vue3 example" - - - script: | - cd packages/survey-vue3-ui/example - npm run build - displayName: "Build Vue3 Example" - - - script: | - npm run accessibility-tests:ci:vue3 - displayName: "run accessibility tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Vue3_AXE' - OverWrite: true - condition: always() - displayName: 'copy accessibility artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Vue3_AXE/' - ArtifactName: 'Library_Vue3_AXE' - publishLocation: 'Container' - condition: always() - displayName: 'publish accessibility artifacts' \ No newline at end of file + - job: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npm run lint + displayName: "run lint command" + + - script: | + cd packages/survey-core + npm install + displayName: "NPM install packages/survey-core" + + - script: | + cd packages/survey-core + npm run build:all + displayName: "Build core" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/build/survey-core + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/build/survey-core" + ArtifactName: "SurveyJSLibraryBuildCore-AT-$(Build.BuildId)" + publishLocation: "Container" + + - job: React + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-AT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-AT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-react-ui + npm install + displayName: "NPM install packages/survey-react-ui" + + - script: | + cd packages/survey-react-ui + npm run build + displayName: "Build React" + + - script: | + cd packages/survey-react-ui + npm run accessibility-tests:ci + displayName: "run accessibility tests" + + - job: Angular + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-AT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-AT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-angular-ui + npm install + displayName: "NPM install packages/survey-angular-ui" + + - script: | + cd packages/survey-angular-ui + npm run build + displayName: "Build Angular" + + - script: | + cd packages/survey-angular-ui/example + npm install + displayName: "NPM install examples/angular-ui" + + - script: | + cd packages/survey-angular-ui + npm run build:example:prod + displayName: "Build Angular Example" + + - script: | + cd packages/survey-angular-ui + npm run accessibility-tests:ci + displayName: "run accessibility tests" + + - job: Vue3 + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-AT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-AT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-vue3-ui + npm install + displayName: "NPM install packages/survey-vue3-ui" + + - script: | + cd packages/survey-vue3-ui + npm run build + displayName: "Build Vue3" + + - script: | + cd packages/survey-vue3-ui/example + npm install + displayName: "NPM install examples/angular-ui" + + - script: | + cd packages/survey-vue3-ui/example + npm run build + displayName: "Build Vue3 Example" + + - script: | + cd packages/survey-vue3-ui + npm run accessibility-tests:ci + displayName: "run accessibility tests" + + - job: SurveyUI_and_CSSFrameworks + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPM + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + workingDir: $(Build.SourcesDirectory) + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-AT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-AT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-js-ui + npm install + displayName: "NPM install packages/survey-js-ui" + + - script: | + cd packages/survey-js-ui + npm run build + displayName: "Build UI" + + - script: | + cd packages/survey-js-ui + npm run accessibility-tests:ci + displayName: "run accessibility tests" diff --git a/accessibilityTests/helper.ts b/accessibilityTests/helper.ts index 29ecd7d2d6..57b0c2cb90 100644 --- a/accessibilityTests/helper.ts +++ b/accessibilityTests/helper.ts @@ -9,15 +9,11 @@ const environment = args.env; export const frameworks = environment ? [environment] : ["knockout", "react", "vue"]; -export const url = "http://127.0.0.1:8080/examples_test/default/"; +export const url = "http://127.0.0.1:8080/examples_test/defaultV2/"; export const urlV2 = "http://127.0.0.1:8080/examples_test/defaultV2/"; export const url_test = "http://127.0.0.1:8080/examples_test/"; export const FLOAT_PRECISION = 0.01; -export const applyTheme = ClientFunction((theme) => { - window["Survey"].StylesManager.applyTheme(theme); -}); - export const initSurvey = ClientFunction( (framework, json, events?, isDesignMode?, props?) => { // eslint-disable-next-line no-console @@ -72,6 +68,9 @@ export const initSurvey = ClientFunction( el: "#surveyElement", data: { survey: model }, }); + } else if (framework === "survey-js-ui") { + document.getElementById("surveyElement").innerHTML = ""; + (window as any).SurveyUI.renderSurvey(model, document.getElementById("surveyElement")); } else if (framework === "angular" || framework == "vue3") { (window as any).setSurvey(model); } @@ -82,7 +81,7 @@ export const initSurvey = ClientFunction( // https://www.deque.com/axe/core-documentation/api-documentation/#overview export const axeTags = ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa", "best-practice", "section508", "wcag412"]; -export const axeContext = { include: [[".sv_p_root"]] }; +export const axeContext = { include: [[".sd-page"]] }; export const axeOptions = { runOnly: { type: "tag", diff --git a/build-packages.yml b/build-packages.yml index 6d0923c18d..86f6656913 100644 --- a/build-packages.yml +++ b/build-packages.yml @@ -17,7 +17,6 @@ resources: variables: npm_config_cache: $(Pipeline.Workspace)/.npm - trigger: batch: true branches: @@ -31,969 +30,676 @@ pool: vmImage: ubuntu-latest jobs: - -- job: NPMCache - - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-library/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-library - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - -- job: CoreAngularJquery - dependsOn: - - NPMCache - - steps: - - checkout: self - - checkout: Service - persistCredentials: true - clean: true - fetchDepth: 1 - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-library/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - # setup next release version - - task: DownloadBuildArtifacts@0 - inputs: - buildType: "specific" - project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" - pipeline: "47" - buildVersionToDownload: "latest" - downloadType: "single" - artifactName: "ReleaseVersionFile" - downloadPath: "$(System.ArtifactsDirectory)" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" - Contents: "version.txt" - TargetFolder: "$(Build.SourcesDirectory)/" - OverWrite: true - displayName: "Copy Build Artifact - SurveyJSVersion File" - - - powershell: | - $version = Get-Content $(Build.SourcesDirectory)/version.txt - Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" - displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" - ########################################################################## - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-library - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run release -- --release-as $(SurveyJSVersion) - git status - displayName: "npm run release" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_core - npm run build_i18n - npm run build-plugins - displayName: "Build Core" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run doc_gen - displayName: "generate docs" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/docs" - Contents: | - classes.json - pmes.json - surveyjs_definition.json - TargetFolder: "$(Build.SourcesDirectory)/service/surveyjs.io/App_Data/DocsLibrary" - OverWrite: true - CleanTargetFolder: false - displayName: "copy generated docs to the local surveyjs/service repo" - - # read about the problem with git output ($env:GIT_REDIRECT_STDERR = '2>&1') : - # https://github.com/microsoft/azure-pipelines-yaml/issues/248 - # https://stackoverflow.com/questions/58485585/azure-pipeline-powershell-and-git-on-windows-server-2019-gives-error-in-output - - powershell: | - cd $(Build.SourcesDirectory)/service - $env:GIT_REDIRECT_STDERR = '2>&1' - git config --global user.email "kurmanov.work@gmail.com" - git config --global user.name "dmitrykurmanov" - git pull origin master - git fetch origin master --tags --force - git checkout master - git add surveyjs.io/App_Data/DocsLibrary - git commit -m "updated survey-library docs [azurepipelines skip]" - git pull origin master - git push origin master - displayName: "git surveyjs/service push updated docs" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_angular - displayName: "Build Angular" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_jquery - displayName: "Build jQuery" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-core" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-core" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-angular" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-angular" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-jquery" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-jquery" - - #trigger next build via the artifact file 'version.txt' - - task: CopyFiles@2 - inputs: - contents: "version.txt" - targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild - displayName: "copy version file to Build.ArtifactStagingDirectory" - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" - ArtifactName: "SurveyJSLibraryBuildCoreAngularJquery" - publishLocation: "Container" - -- job: Knockout - dependsOn: - - NPMCache - - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-library/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - # setup next release version - - task: DownloadBuildArtifacts@0 - inputs: - buildType: "specific" - project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" - pipeline: "47" - buildVersionToDownload: "latest" - downloadType: "single" - artifactName: "ReleaseVersionFile" - downloadPath: "$(System.ArtifactsDirectory)" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" - Contents: "version.txt" - TargetFolder: "$(Build.SourcesDirectory)/" - OverWrite: true - displayName: "Copy Build Artifact - SurveyJSVersion File" - - - powershell: | - $version = Get-Content $(Build.SourcesDirectory)/version.txt - Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" - displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" - ########################################################################## - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-library - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run release -- --release-as $(SurveyJSVersion) - git status - displayName: "npm run release" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_knockout - displayName: "Build Knockout" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_core - npm run build_i18n - npm run build-plugins - npm run build_knockout_ui - displayName: "Build Knockout UI" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run test:postcss - displayName: "check postcss compatibility" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run testsingle - displayName: "run unit tests" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run testcafe:ko - displayName: "run functional tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-knockout" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-knockout" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-knockout-ui" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-knockout-ui" - - #trigger next build via the artifact file 'version.txt' - - task: CopyFiles@2 - inputs: - contents: "version.txt" - targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild - displayName: "copy version file to Build.ArtifactStagingDirectory" - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" - ArtifactName: "SurveyJSLibraryBuildKnockout" - publishLocation: "Container" - -- job: React - dependsOn: - - NPMCache - - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-library/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - # setup next release version - - task: DownloadBuildArtifacts@0 - inputs: - buildType: "specific" - project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" - pipeline: "47" - buildVersionToDownload: "latest" - downloadType: "single" - artifactName: "ReleaseVersionFile" - downloadPath: "$(System.ArtifactsDirectory)" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" - Contents: "version.txt" - TargetFolder: "$(Build.SourcesDirectory)/" - OverWrite: true - displayName: "Copy Build Artifact - SurveyJSVersion File" - - - powershell: | - $version = Get-Content $(Build.SourcesDirectory)/version.txt - Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" - displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" - ########################################################################## - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-library - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run release -- --release-as $(SurveyJSVersion) - git status - displayName: "npm run release" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_react - displayName: "Build React" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_core - npm run build_i18n - npm run build-plugins - npm run build_react_ui - displayName: "Build React UI" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run testcafe:react - displayName: "run functional tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-react" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-react" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-react-ui" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-react-ui" - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" - ArtifactName: "SurveyJSLibraryBuildReact" - publishLocation: "Container" - -- job: Vue - dependsOn: - - NPMCache - - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-library/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - # setup next release version - - task: DownloadBuildArtifacts@0 - inputs: - buildType: "specific" - project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" - pipeline: "47" - buildVersionToDownload: "latest" - downloadType: "single" - artifactName: "ReleaseVersionFile" - downloadPath: "$(System.ArtifactsDirectory)" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" - Contents: "version.txt" - TargetFolder: "$(Build.SourcesDirectory)/" - OverWrite: true - displayName: "Copy Build Artifact - SurveyJSVersion File" - - - powershell: | - $version = Get-Content $(Build.SourcesDirectory)/version.txt - Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" - displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" - ########################################################################## - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-library - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run release -- --release-as $(SurveyJSVersion) - git status - displayName: "npm run release" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_vue - displayName: "Build Vue" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_core - npm run build_i18n - npm run build-plugins - npm run build_vue_ui - displayName: "Build Vue UI" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run testcafe:vue - displayName: "Vue functional tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-vue" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-vue" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-vue-ui" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-vue-ui" - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" - ArtifactName: "SurveyJSLibraryBuildVue" - publishLocation: "Container" - -- job: Angular - dependsOn: - - NPMCache - - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-library/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - # setup next release version - - task: DownloadBuildArtifacts@0 - inputs: - buildType: "specific" - project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" - pipeline: "47" - buildVersionToDownload: "latest" - downloadType: "single" - artifactName: "ReleaseVersionFile" - downloadPath: "$(System.ArtifactsDirectory)" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" - Contents: "version.txt" - TargetFolder: "$(Build.SourcesDirectory)/" - OverWrite: true - displayName: "Copy Build Artifact - SurveyJSVersion File" - - - powershell: | - $version = Get-Content $(Build.SourcesDirectory)/version.txt - Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" - displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" - ########################################################################## - - - task: Npm@1 - displayName: 'NPM install root' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-library - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_core - npm run build_i18n - npm run build-plugins - displayName: "Build Core" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui - npm install - displayName: "NPM install packages/survey-angular-ui" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui - npm run release -- --release-as $(SurveyJSVersion) - git status - displayName: "npm run release" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui - npm run build - displayName: "Build Angular" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui/example - npm install - displayName: "NPM install examples/angular-ui" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui - npm run build:example - displayName: "Build Angular Example" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui - npm run test:single - displayName: "run unit and markup tests" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run testcafe:ci:angular - displayName: "run functional tests" - - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-angular-ui" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-angular-ui" - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" - ArtifactName: "SurveyJSLibraryBuildAngular" - publishLocation: "Container" - -- job: Vue3 - dependsOn: - - NPMCache - - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-library/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - # setup next release version - - task: DownloadBuildArtifacts@0 - inputs: - buildType: "specific" - project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" - pipeline: "47" - buildVersionToDownload: "latest" - downloadType: "single" - artifactName: "ReleaseVersionFile" - downloadPath: "$(System.ArtifactsDirectory)" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" - Contents: "version.txt" - TargetFolder: "$(Build.SourcesDirectory)/" - OverWrite: true - displayName: "Copy Build Artifact - SurveyJSVersion File" - - - powershell: | - $version = Get-Content $(Build.SourcesDirectory)/version.txt - Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" - displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" - ########################################################################## - - - task: Npm@1 - displayName: 'NPM install root' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-library - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_core - npm run build_i18n - npm run build-plugins - displayName: "Build Core" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui - npm install - displayName: "NPM install packages/survey-vue3-ui" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui - npm run release -- --release-as $(SurveyJSVersion) - git status - displayName: "npm run release" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui - npm run build - displayName: "Build Vue3" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui/example - npm install - displayName: "NPM install survey-vue3-ui/example" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui/example - npm run build - displayName: "Build Vue3 Example" - - - script: | - cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui - npm run test:single - displayName: "run unit and markup tests" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run testcafe:ci:vue3 - displayName: "run functional tests" - - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-vue3-ui" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-vue3-ui" - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" - ArtifactName: "SurveyJSLibraryBuildVue3" - publishLocation: "Container" - -# - job: JqueryUI -# dependsOn: -# - NPMCache - -# steps: -# - checkout: self -# - checkout: EmptyRepo -# persistCredentials: true -# clean: true - -# - task: NodeTool@0 -# inputs: -# versionSpec: "16.x" -# displayName: "Install Node.js" - -# - task: CopyFiles@2 -# inputs: -# SourceFolder: "$(Build.SourcesDirectory)/survey-library/" -# Contents: "package.json" -# TargetFolder: "$(Build.SourcesDirectory)/Temp/" -# OverWrite: true -# displayName: "Copy package.json for cache key" -# - task: Cache@2 -# inputs: -# key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' -# path: $(Build.SourcesDirectory)/survey-library/node_modules -# cacheHitVar: NPM_CACHE_RESTORED -# displayName: Cache NPM - -# # setup next release version -# - task: DownloadBuildArtifacts@0 -# inputs: -# buildType: "specific" -# project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" -# pipeline: "47" -# buildVersionToDownload: "latest" -# downloadType: "single" -# artifactName: "ReleaseVersionFile" -# downloadPath: "$(System.ArtifactsDirectory)" - -# - task: CopyFiles@2 -# inputs: -# SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" -# Contents: "version.txt" -# TargetFolder: "$(Build.SourcesDirectory)/" -# OverWrite: true -# displayName: "Copy Build Artifact - SurveyJSVersion File" - -# - powershell: | -# $version = Get-Content $(Build.SourcesDirectory)/version.txt -# Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" -# displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" -# ########################################################################## - -# - task: Npm@1 -# displayName: 'NPM install' -# inputs: -# command: install -# verbose: false -# workingDir: $(Build.SourcesDirectory)/survey-library -# condition: ne(variables.NPM_CACHE_RESTORED, 'true') - -# - script: | -# cd $(Build.SourcesDirectory)/survey-library -# npm run release -- --release-as $(SurveyJSVersion) -# git status -# displayName: "npm run release" - -# - script: | -# cd $(Build.SourcesDirectory)/survey-library -# npm run build_core -# npm run build_i18n -# npm run build-plugins -# displayName: "Build Core" - -# - script: | -# cd $(Build.SourcesDirectory)/survey-library -# npm run build_jquery_ui -# displayName: "Build jquery-ui" - -# - script: | -# cd $(Build.SourcesDirectory)/survey-library -# npm run testcafe:jquery-ui:ci -# displayName: "run functional tests" - -# - task: CopyFiles@2 -# inputs: -# SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-jquery-ui" -# TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-jquery-ui" - -# - task: PublishBuildArtifacts@1 -# inputs: -# PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" -# ArtifactName: "SurveyJSLibraryBuildJQueryUI" -# publishLocation: "Container" - -- job: SurveyUI_and_CSSFrameworks - dependsOn: - - NPMCache - - steps: - - checkout: self - - checkout: EmptyRepo - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/survey-library/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - # setup next release version - - task: DownloadBuildArtifacts@0 - inputs: - buildType: "specific" - project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" - pipeline: "47" - buildVersionToDownload: "latest" - downloadType: "single" - artifactName: "ReleaseVersionFile" - downloadPath: "$(System.ArtifactsDirectory)" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" - Contents: "version.txt" - TargetFolder: "$(Build.SourcesDirectory)/" - OverWrite: true - displayName: "Copy Build Artifact - SurveyJSVersion File" - - - powershell: | - $version = Get-Content $(Build.SourcesDirectory)/version.txt - Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" - displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" - ########################################################################## - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory)/survey-library - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run release -- --release-as $(SurveyJSVersion) - git status - displayName: "npm run release" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_core - npm run build_i18n - npm run build-plugins - displayName: "Build Core" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run build_js_ui - displayName: "Build survey-js-ui" - - - script: | - cd $(Build.SourcesDirectory)/survey-library - npm run testcafe:survey-js-ui:ci - displayName: "run functional tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/survey-library/build/survey-js-ui" - TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-js-ui" - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" - ArtifactName: "SurveyJSLibraryBuildSurveyUI" - publishLocation: "Container" + - job: NPMCache + + steps: + - checkout: self + - checkout: EmptyRepo + persistCredentials: true + clean: true + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/survey-library/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPM + + - task: Npm@1 + displayName: "NPM install" + inputs: + command: install + verbose: false + workingDir: $(Build.SourcesDirectory)/survey-library + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - job: Core + dependsOn: + - NPMCache + + steps: + - checkout: self + - checkout: Service + persistCredentials: true + clean: true + fetchDepth: 1 + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/survey-library/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPM + + # setup next release version + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "specific" + project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" + pipeline: "47" + buildVersionToDownload: "latest" + downloadType: "single" + artifactName: "ReleaseVersionFile" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" + Contents: "version.txt" + TargetFolder: "$(Build.SourcesDirectory)/" + OverWrite: true + displayName: "Copy Build Artifact - SurveyJSVersion File" + + - powershell: | + $version = Get-Content $(Build.SourcesDirectory)/version.txt + Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" + displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" + ########################################################################## + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + workingDir: $(Build.SourcesDirectory)/survey-library + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + cd $(Build.SourcesDirectory)/survey-library + npm run lint + displayName: "run lint command" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-core + npm install + displayName: "NPM install packages/survey-core" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-core + npm run release -- --release-as $(SurveyJSVersion) + git status + displayName: "npm run release" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-core + npm run build:all + displayName: "Build Core" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-core + npm test + displayName: "run unit test" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-core + npm run test:postcss + displayName: "check postcss compatibility" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-core + npm run doc_gen + displayName: "generate docs" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/packages/survey-core/docs" + Contents: | + classes.json + pmes.json + surveyjs_definition.json + TargetFolder: "$(Build.SourcesDirectory)/service/surveyjs.io/App_Data/DocsLibrary" + OverWrite: true + CleanTargetFolder: false + displayName: "copy generated docs to the local surveyjs/service repo" + + # read about the problem with git output ($env:GIT_REDIRECT_STDERR = '2>&1') : + # https://github.com/microsoft/azure-pipelines-yaml/issues/248 + # https://stackoverflow.com/questions/58485585/azure-pipeline-powershell-and-git-on-windows-server-2019-gives-error-in-output + - powershell: | + cd $(Build.SourcesDirectory)/service + $env:GIT_REDIRECT_STDERR = '2>&1' + git config --global user.email "kurmanov.work@gmail.com" + git config --global user.name "dmitrykurmanov" + git pull origin master + git fetch origin master --tags --force + git checkout master + git add surveyjs.io/App_Data/DocsLibrary + git commit -m "updated survey-library docs [azurepipelines skip]" + git pull origin master + git push origin master + displayName: "git surveyjs/service push updated docs" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/packages/survey-core/build" + TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-core" + + #trigger next build via the artifact file 'version.txt' + - task: CopyFiles@2 + inputs: + contents: "version.txt" + targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild + displayName: "copy version file to Build.ArtifactStagingDirectory" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-core" + ArtifactName: "SurveyJSLibraryBuildCore-$(Build.BuildId)" + publishLocation: "Container" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" + ArtifactName: "SurveyJSLibraryBuildCore" + publishLocation: "Container" + + - job: React + dependsOn: + - Core + + steps: + - checkout: self + - checkout: EmptyRepo + persistCredentials: true + clean: true + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/survey-library/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPM + + # setup next release version + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "specific" + project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" + pipeline: "47" + buildVersionToDownload: "latest" + downloadType: "single" + artifactName: "ReleaseVersionFile" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" + Contents: "version.txt" + TargetFolder: "$(Build.SourcesDirectory)/" + OverWrite: true + displayName: "Copy Build Artifact - SurveyJSVersion File" + + - powershell: | + $version = Get-Content $(Build.SourcesDirectory)/version.txt + Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" + displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" + ########################################################################## + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + workingDir: $(Build.SourcesDirectory)/survey-library + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + cd $(Build.SourcesDirectory)/survey-library + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/survey-library/packages/survey-core/build" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-react-ui + npm install + displayName: "NPM install packages/survey-react-ui" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-react-ui + npm run release -- --release-as $(SurveyJSVersion) + git status + displayName: "npm run release" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-react-ui + npm run build + displayName: "Build React UI" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-react-ui + npm run test + displayName: "run markup tests" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-react-ui + npm run testcafe:ci + displayName: "run functional tests" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/packages/survey-react-ui/build" + TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-react-ui" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" + ArtifactName: "SurveyJSLibraryBuildReact" + publishLocation: "Container" + + - job: Angular + dependsOn: + - Core + + steps: + - checkout: self + - checkout: EmptyRepo + persistCredentials: true + clean: true + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/survey-library/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + # setup next release version + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "specific" + project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" + pipeline: "47" + buildVersionToDownload: "latest" + downloadType: "single" + artifactName: "ReleaseVersionFile" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" + Contents: "version.txt" + TargetFolder: "$(Build.SourcesDirectory)/" + OverWrite: true + displayName: "Copy Build Artifact - SurveyJSVersion File" + + - powershell: | + $version = Get-Content $(Build.SourcesDirectory)/version.txt + Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" + displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" + ########################################################################## + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + workingDir: $(Build.SourcesDirectory)/survey-library + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + cd $(Build.SourcesDirectory)/survey-library + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/survey-library/packages/survey-core/build" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui + npm install + displayName: "NPM install packages/survey-angular-ui" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui + npm run release -- --release-as $(SurveyJSVersion) + git status + displayName: "npm run release" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui + npm run build + displayName: "Build Angular" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui/example + npm install + displayName: "NPM install examples/angular-ui" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui + npm run build:example:prod + displayName: "Build Angular Example" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui + npm run test + displayName: "run unit and markup tests" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui + npm run testcafe:ci + displayName: "run functional tests" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui/build" + TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-angular-ui" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" + ArtifactName: "SurveyJSLibraryBuildAngular" + publishLocation: "Container" + + - job: Vue3 + dependsOn: + - Core + + steps: + - checkout: self + - checkout: EmptyRepo + persistCredentials: true + clean: true + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/survey-library/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + # setup next release version + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "specific" + project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" + pipeline: "47" + buildVersionToDownload: "latest" + downloadType: "single" + artifactName: "ReleaseVersionFile" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" + Contents: "version.txt" + TargetFolder: "$(Build.SourcesDirectory)/" + OverWrite: true + displayName: "Copy Build Artifact - SurveyJSVersion File" + + - powershell: | + $version = Get-Content $(Build.SourcesDirectory)/version.txt + Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" + displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" + ########################################################################## + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + workingDir: $(Build.SourcesDirectory)/survey-library + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + cd $(Build.SourcesDirectory)/survey-library + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/survey-library/packages/survey-core/build" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui + npm install + displayName: "NPM install packages/survey-vue3-ui" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui + npm run release -- --release-as $(SurveyJSVersion) + git status + displayName: "npm run release" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui + npm run build + displayName: "Build Vue3" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui/example + npm install + displayName: "NPM install survey-vue3-ui/example" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui/example + npm run build + displayName: "Build Vue3 Example" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui + npm run test + displayName: "run unit and markup tests" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui + npm run testcafe:ci + displayName: "run functional tests" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/packages/survey-vue3-ui/build" + TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-vue3-ui" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" + ArtifactName: "SurveyJSLibraryBuildVue3" + publishLocation: "Container" + + - job: SurveyUI_and_CSSFrameworks + dependsOn: + - Core + + steps: + - checkout: self + - checkout: EmptyRepo + persistCredentials: true + clean: true + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/survey-library/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPM + + # setup next release version + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "specific" + project: "af2804d2-859a-4705-9ef5-cdf46d1d5d4f" + pipeline: "47" + buildVersionToDownload: "latest" + downloadType: "single" + artifactName: "ReleaseVersionFile" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(System.ArtifactsDirectory)/ReleaseVersionFile/" + Contents: "version.txt" + TargetFolder: "$(Build.SourcesDirectory)/" + OverWrite: true + displayName: "Copy Build Artifact - SurveyJSVersion File" + + - powershell: | + $version = Get-Content $(Build.SourcesDirectory)/version.txt + Write-Host "##vso[task.setvariable variable=SurveyJSVersion;]$version" + displayName: "setup SurveyJSVersion variable from SurveyJSVersionFile" + ########################################################################## + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + workingDir: $(Build.SourcesDirectory)/survey-library + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + cd $(Build.SourcesDirectory)/survey-library + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/survey-library/packages/survey-core/build" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-js-ui + npm install + displayName: "NPM install packages/survey-js-ui" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-js-ui + npm run release -- --release-as $(SurveyJSVersion) + git status + displayName: "npm run release" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-js-ui + npm run build + displayName: "Build UI" + + # - script: | + # cd $(Build.SourcesDirectory)/survey-library/packages/survey-js-ui + # npm run test + # displayName: "run markup tests" + + - script: | + cd $(Build.SourcesDirectory)/survey-library/packages/survey-js-ui + npm run testcafe:ci + displayName: "run functional tests" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/survey-library/packages/survey-js-ui/build" + TargetFolder: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/packages/survey-js-ui" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/" + ArtifactName: "SurveyJSLibraryBuildSurveyUI" + publishLocation: "Container" diff --git a/build-scripts/karma.conf.js b/build-scripts/karma.conf.js deleted file mode 100644 index e383fd424e..0000000000 --- a/build-scripts/karma.conf.js +++ /dev/null @@ -1,76 +0,0 @@ -var path = require("path"); -var webpack = require("webpack"); -var webpackConfigCreator = require("./webpack.common"); -var packageJson = require("../package.json"); -const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin"); -var webpackConfig = webpackConfigCreator({ - platform: "knockout", - buildType: "dev", -}, - packageJson -); - -//process.env.CHROME_BIN = require("puppeteer").executablePath(); - -/*setup ts config file for tests ("noImplicitAny": false)*/ -webpackConfig.resolve.plugins[0] = new TsconfigPathsPlugin({ configFile: path.resolve(__dirname, "./tsconfig.tests.json") }) -webpackConfig.module.rules[0].options.configFile = "build-scripts/tsconfig.tests.json"; - -module.exports = function (config) { - config.set({ - basePath: "../", - frameworks: ["qunit"], - files: ["tests/entries/*.ts"], - exclude: [], - mime: { - "text/x-typescript": ["ts", "tsx"] - }, - captureTimeout: 210000, - browserDisconnectTimeout: 100000, - browserDisconnectTolerance: 3, - browserNoActivityTimeout: 100000, - junitReporter: { - outputDir: "tmp/testresults/", - outputFile: "test-results.xml" - }, - preprocessors: { - "**/*.ts": ["webpack", "sourcemap"] - }, - webpack: { - module: webpackConfig.module, - resolve: webpackConfig.resolve, - plugins: webpackConfig.plugins.concat([ - new webpack.SourceMapDevToolPlugin({ - filename: null, // if no value is provided the sourcemap is inlined - test: /\.(ts|js)($|\?)/i // process .js and .ts files only - }) - ]) - }, - reporters: ["progress", "dots", "junit"], - browsers: ["ChromeHeadlessNoSandbox"], - customLaunchers: { - ChromeHeadlessNoSandbox: { - base: 'ChromeHeadless', - flags: [ - '--no-sandbox', - '--disable-gpu', - '--no-default-browser-check', - '--no-first-run', - '--disable-default-apps', - '--disable-popup-blocking', - '--disable-translate', - '--disable-background-timer-throttling', - '--disable-renderer-backgrounding', - '--disable-device-discovery-notifications', - '--disable-web-security' - ] - } - }, - colors: true, - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_WARN, - autoWatch: true, - singleRun: false, - concurrency: Infinity - }); -}; diff --git a/build-scripts/survey-angular/README.md b/build-scripts/survey-angular/README.md deleted file mode 100644 index 4ee46524e0..0000000000 --- a/build-scripts/survey-angular/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# SurveyJS Form Library for Angular - - - - - -SurveyJS Form Library is a free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your web applications. - -> **NOTE**: This package contains a legacy Knockout-dependent version of SurveyJS Form Library for Angular. -> -> In Angular v12+ applications, we recommend using a new [native implementation of SurveyJS Angular Form Library](https://www.npmjs.com/package/survey-angular-ui). For information on how to integrate it into your application, refer to the following tutorial: [Add a Survey to an Angular Application](https://surveyjs.io/form-library/documentation/get-started-angular). -> -> With earlier Angular versions, you can use this obsolete package. Refer to the following code examples on GitHub for more information: -> - [Add SurveyJS Form Library to an Angular v8–v11 Application](https://github.com/surveyjs/code-examples/tree/main/legacy-angular/form-library) -> - [Add Survey Creator to an Angular v8–v11 Application](https://github.com/surveyjs/code-examples/tree/main/legacy-angular/survey-creator) - -## Resources - -- [Website](https://surveyjs.io/) -- [Documentation](https://surveyjs.io/Documentation/Library) -- [Live Examples](https://surveyjs.io/form-library/examples/nps-question/angular) -- [What's New](https://surveyjs.io/WhatsNew) - -## Build SurveyJS Form Library for Angular from Sources - -Refer to instructions in the root README file: [Build the SurveyJS Form Library from Sources](https://github.com/surveyjs/survey-library#build-the-surveyjs-form-library-from-sources). - -## Licensing - -SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE). diff --git a/build-scripts/survey-angular/package.json b/build-scripts/survey-angular/package.json deleted file mode 100644 index db6790ca47..0000000000 --- a/build-scripts/survey-angular/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "survey-angular", - "version": "1.8.33", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "angular", - "angular-component" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey.angular.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "survey.angular.d.ts", - "typesVersions": { - "<4.2": { - "*": [ - "ts3.4/*" - ] - } - }, - "dependencies": {} -} \ No newline at end of file diff --git a/build-scripts/survey-angular/tsconfig.json b/build-scripts/survey-angular/tsconfig.json deleted file mode 100644 index 02fa849770..0000000000 --- a/build-scripts/survey-angular/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions:": { - "baseUrl": ".", - "paths": { - "survey-core": ["../../src/entries/core.ts"], - } - } -} diff --git a/build-scripts/survey-angular/tsconfig.typing.angular.json b/build-scripts/survey-angular/tsconfig.typing.angular.json deleted file mode 100644 index cfb849c858..0000000000 --- a/build-scripts/survey-angular/tsconfig.typing.angular.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "lib": [ - "DOM", - "ES5", - "ES2015.Promise", - "es6" - ], - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../src/entries/core.ts" - ], - "@coreIconsV1": [ - "../../packages/survey-core/src/iconsV1" - ], - "@coreIconsV2": [ - "../../packages/survey-core/src/iconsV2" - ] - }, - "sourceMap": false, - "noImplicitAny": false, - "importHelpers": false, - "experimentalDecorators": true, - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "declaration": true, - "emitDeclarationOnly": true, - "skipLibCheck": true - }, - "include": [ - "../../src/entries/angular.ts" - ], -} \ No newline at end of file diff --git a/build-scripts/survey-angular/webpack.config.js b/build-scripts/survey-angular/webpack.config.js deleted file mode 100644 index f88eeb980e..0000000000 --- a/build-scripts/survey-angular/webpack.config.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); -var path = require("path"); - -const config = { - entry: { - survey: path.resolve(__dirname, "../../src/main.scss"), - modern: path.resolve(__dirname, "../../src/modern.scss"), - defaultV2: path.resolve(__dirname, "../../packages/survey-core/src/defaultV2-theme/defaultV2.scss") - }, - externals: { - }, - plugins: [ - new DtsGeneratorPlugin({ - tsConfigPath: "./build-scripts/survey-angular/tsconfig.typing.angular.json", - filePath: "build/survey-angular/survey.angular.d.ts", - moduleName: "survey-angular", - importName: "src/entries/angular" - }), - ], -}; - -module.exports = function (options) { - options.platform = "angular"; - options.libraryName = "Survey"; - return merge(webpackCommonConfigCreator(options, packageJson, "survey.angular"), config); -} diff --git a/build-scripts/survey-core/README.md b/build-scripts/survey-core/README.md deleted file mode 100644 index 483c0631d7..0000000000 --- a/build-scripts/survey-core/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Survey Model (Platform-Independent Part) - - - - - -[![Build Status](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_apis/build/status/SurveyJS%20Library?branchName=master)](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=7&branchName=master) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE) - - - - - - - - - - -A platform-independent survey model for SurveyJS Form Library. This package should be used with one of platform-specific UI rendering packages. Refer to the following Get Started tutorials for more information: - -- [Angular](https://surveyjs.io/Documentation/Library?id=get-started-angular) -- [React](https://surveyjs.io/Documentation/Library?id=get-started-react) -- [Vue](https://surveyjs.io/Documentation/Library?id=get-started-vue) -- [HTML/CSS/JavaScript](https://surveyjs.io/form-library/documentation/get-started-html-css-javascript) - -## Resources - -- [Website](https://surveyjs.io/) -- [Documentation](https://surveyjs.io/Documentation/Library) -- [Live Examples](https://surveyjs.io/Examples/Library) -- [What's New](https://surveyjs.io/WhatsNew) - -## Build Survey Model from Sources - -Refer to instructions in the root README file: [Build the SurveyJS Form Library from Sources](https://github.com/surveyjs/survey-library#build-the-surveyjs-form-library-from-sources). - -## Licensing - -SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE). diff --git a/build-scripts/survey-core/package.json b/build-scripts/survey-core/package.json deleted file mode 100644 index f347a90cc9..0000000000 --- a/build-scripts/survey-core/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "survey-core", - "version": "1.8.33", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "survey", - "library" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey.core.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "./typings/src/entries/core.d.ts", - "typesVersions": { - "<4.2": { - "*": [ - "ts3.4/*" - ] - } - }, - "dependencies": {} -} \ No newline at end of file diff --git a/build-scripts/survey-core/tsconfig.i18n.json b/build-scripts/survey-core/tsconfig.i18n.json deleted file mode 100644 index 283f332e16..0000000000 --- a/build-scripts/survey-core/tsconfig.i18n.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "declaration": false, - "declarationDir": null, - "paths": { - "survey-core": [ - "../../build/survey-core" - ] - }, - }, - "include": [ - "../../src/entries/i18n.ts" - ], - "exclude": [], -} \ No newline at end of file diff --git a/build-scripts/survey-core/tsconfig.icons.json b/build-scripts/survey-core/tsconfig.icons.json deleted file mode 100644 index f8979f0bad..0000000000 --- a/build-scripts/survey-core/tsconfig.icons.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../build/survey-core" - ] - }, - "declaration": true, - "declarationDir": "../../build/survey-core/icons/" - }, - "include": [ - "../../packages/survey-core/src/iconsV1.ts", - "../../packages/survey-core/src/iconsV2.ts", - ], - "exclude": [], -} \ No newline at end of file diff --git a/build-scripts/survey-core/tsconfig.json b/build-scripts/survey-core/tsconfig.json deleted file mode 100644 index 1573b2c125..0000000000 --- a/build-scripts/survey-core/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "declaration": true, - "declarationDir": "../../build/survey-core/typings" - }, - "include": [ - "../../src/entries/core.ts" - ], - "exclude": [], -} \ No newline at end of file diff --git a/build-scripts/survey-core/tsconfig.plugins.bootstrap.json b/build-scripts/survey-core/tsconfig.plugins.bootstrap.json deleted file mode 100644 index e54410716a..0000000000 --- a/build-scripts/survey-core/tsconfig.plugins.bootstrap.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../build/survey-core" - ] - }, - "declaration": true, - "declarationDir": "../../build/survey-core/plugins" - }, - "include": [ - "../../src/plugins/themes/bootstrap-integration/index.ts" - ], - "exclude": [], -} \ No newline at end of file diff --git a/build-scripts/survey-core/tsconfig.plugins.bootstrapmaterial.json b/build-scripts/survey-core/tsconfig.plugins.bootstrapmaterial.json deleted file mode 100644 index 098f06e715..0000000000 --- a/build-scripts/survey-core/tsconfig.plugins.bootstrapmaterial.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../build/survey-core" - ] - }, - "declaration": true, - "declarationDir": "../../build/survey-core/plugins" - }, - "include": [ - "../../src/plugins/themes/bootstrap-material-integration/index.ts" - ], - "exclude": [], -} \ No newline at end of file diff --git a/build-scripts/survey-core/tsconfig.themes.json b/build-scripts/survey-core/tsconfig.themes.json deleted file mode 100644 index c25dd462b9..0000000000 --- a/build-scripts/survey-core/tsconfig.themes.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../build/survey-core" - ] - }, - "declaration": true, - "declarationDir": "../../build/survey-core/themes/" - }, - "include": [ - "../../packages/survey-core/src/themes/index.ts" - ], - "exclude": [], -} \ No newline at end of file diff --git a/build-scripts/survey-core/webpack.config.js b/build-scripts/survey-core/webpack.config.js deleted file mode 100644 index 528833c99b..0000000000 --- a/build-scripts/survey-core/webpack.config.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); -var FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); -// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; -var path = require("path"); - -const config = { - entry: { - survey: path.resolve(__dirname, "../../src/main.scss"), - modern: path.resolve(__dirname, "../../src/modern.scss"), - "modern.fontless": path.resolve(__dirname, "../../src/modern.fontless.scss"), - defaultV2: path.resolve(__dirname, "../../packages/survey-core/src/defaultV2-theme/defaultV2.scss"), - "defaultV2.fontless": path.resolve(__dirname, "../../packages/survey-core/src/defaultV2-theme/defaultV2.fontless.scss") - }, - plugins: [ - new FixStyleOnlyEntriesPlugin(), - ], -}; - -module.exports = function (options) { - options.platform = "core"; - options.libraryName = "Survey"; - options.tsConfigFile = path.resolve(__dirname, "./tsconfig.json") - return merge(webpackCommonConfigCreator(options, packageJson, "survey.core"), config); -}; diff --git a/build-scripts/survey-core/webpack.i18n.js b/build-scripts/survey-core/webpack.i18n.js deleted file mode 100644 index 12af95a08a..0000000000 --- a/build-scripts/survey-core/webpack.i18n.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -const fs = require("fs"); -const path = require("path"); -const webpackCommonConfigCreator = require("../webpack.common"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); - -const config = { - externals: { - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - } -}; -function patchEntries() { - config.entry = {}; - fs.readdirSync(path.resolve(__dirname, "../../packages/survey-core/src/localization")).forEach(file => { - var extension = path.extname(file); - if (extension.toLowerCase() === ".ts") { - config.entry[path.basename(file, extension)] = (path.resolve(__dirname, "../../packages/survey-core/src/localization") + "/" + file); - } - }); - config.entry.index = path.resolve(__dirname, "../../src/entries/i18n.ts"); -} - -function patchFilename(options) { - config.output = {}; - const isProductionBuild = options.buildType === "prod"; - config.output.filename = (pathData) => { - return (pathData.chunk.name == "survey.i18n" ? "[name]" : "i18n/[name]") + (isProductionBuild ? ".min" : "") + ".js"; - } -} - -module.exports = function (options) { - options.platform = "i18n"; - options.libraryName = "SurveyLocales"; - patchEntries(); - patchFilename(options); - options.tsConfigFile = path.resolve(__dirname, "./tsconfig.i18n.json") - return merge(webpackCommonConfigCreator(options, packageJson, "survey.i18n"), config); -}; - diff --git a/build-scripts/survey-core/webpack.icons.config.js b/build-scripts/survey-core/webpack.icons.config.js deleted file mode 100644 index b0fab92c81..0000000000 --- a/build-scripts/survey-core/webpack.icons.config.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const { merge } = require("webpack-merge"); -var FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); -var path = require("path"); - -const config = { - entry: { - "iconsV1": path.resolve(__dirname, "../../packages/survey-core/src/iconsV1.ts"), - "iconsV2": path.resolve(__dirname, "../../packages/survey-core/src/iconsV2.ts"), - }, - plugins: [new FixStyleOnlyEntriesPlugin()], - externals: { - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - } -}; - -module.exports = function (options) { - options.platform = ""; - options.libraryName = "SurveyIcons"; - options.tsConfigFile = path.resolve(__dirname, "./tsconfig.icons.json") - - return merge(webpackCommonConfigCreator(options, { "name": "survey-icons" }, "survey.icons", "survey-core/icons"), config); -}; diff --git a/build-scripts/survey-core/webpack.plugins.bootstrap.config.js b/build-scripts/survey-core/webpack.plugins.bootstrap.config.js deleted file mode 100644 index db4880d3d5..0000000000 --- a/build-scripts/survey-core/webpack.plugins.bootstrap.config.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const { merge } = require("webpack-merge"); -var FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); -var path = require("path"); - -const config = { - entry: { - ["index"]: path.resolve(__dirname, "../../src/plugins/themes/bootstrap-integration/index.ts"), - }, - plugins: [new FixStyleOnlyEntriesPlugin()], - externals: { - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - } -}; - -module.exports = function (options) { - options.platform = ""; - options.libraryName = "SurveyBootstrap"; - options.tsConfigFile = path.resolve(__dirname, "./tsconfig.plugins.bootstrap.json") - - return merge(webpackCommonConfigCreator(options, { "name": "survey-plugins" }, "survey.plugins", "survey-core/plugins/bootstrap-integration"), config); -}; diff --git a/build-scripts/survey-core/webpack.plugins.bootstrap.material.config.js b/build-scripts/survey-core/webpack.plugins.bootstrap.material.config.js deleted file mode 100644 index ff821d856a..0000000000 --- a/build-scripts/survey-core/webpack.plugins.bootstrap.material.config.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const { merge } = require("webpack-merge"); -var FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); -var path = require("path"); - -const config = { - entry: { - ["index"]: path.resolve(__dirname, "../../src/plugins/themes/bootstrap-material-integration/index.ts"), - }, - plugins: [new FixStyleOnlyEntriesPlugin()], - externals: { - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - } -}; - -module.exports = function (options) { - options.platform = ""; - options.libraryName = "SurveyBootstrapMaterial"; - - options.tsConfigFile = path.resolve(__dirname, "./tsconfig.plugins.bootstrapmaterial.json") - - return merge(webpackCommonConfigCreator(options, { "name": "survey-plugins" }, "survey.plugins", "survey-core/plugins/bootstrap-material-integration"), config); -}; diff --git a/build-scripts/survey-core/webpack.themes.config.js b/build-scripts/survey-core/webpack.themes.config.js deleted file mode 100644 index 2b957c4fc0..0000000000 --- a/build-scripts/survey-core/webpack.themes.config.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const { merge } = require("webpack-merge"); -var FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); -var path = require("path"); - -const config = { - entry: { - "default-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-light.ts"), - "default-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-dark.ts"), - "default-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-light-panelless.ts"), - "default-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-dark-panelless.ts"), - "sharp-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-light.ts"), - "sharp-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-dark.ts"), - "sharp-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-light-panelless.ts"), - "sharp-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-dark-panelless.ts"), - "borderless-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-light.ts"), - "borderless-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-dark.ts"), - "borderless-light-panelless.": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-light-panelless.ts"), - "borderless-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-dark-panelless.ts"), - "flat-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-light.ts"), - "flat-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-dark.ts"), - "flat-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-light-panelless.ts"), - "flat-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-dark-panelless.ts"), - "plain-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-light.ts"), - "plain-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-dark.ts"), - "plain-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-light-panelless.ts"), - "plain-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-dark-panelless.ts"), - "doubleborder-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-light.ts"), - "doubleborder-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-dark.ts"), - "doubleborder-light-panelles": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-light-panelless.ts"), - "doubleborder-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-dark-panelless.ts"), - "layered-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-light.ts"), - "layered-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-dark.ts"), - "layered-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-light-panelless.ts"), - "layered-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-dark-panelless.ts"), - "solid-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-light.ts"), - "solid-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-dark.ts"), - "solid-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-light-panelless.ts"), - "solid-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-dark-panelless.ts"), - "three-dimensional-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-light.ts"), - "three-dimensional-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-dark.ts"), - "three-dimensional-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-light-panelless.ts"), - "three-dimensional-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-dark-panelless.ts"), - "contrast-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-light.ts"), - "contrast-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-dark.ts"), - "contrast-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-light-panelless.ts"), - "contrast-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-dark-panelless.ts"), - "index": path.resolve(__dirname, "../../packages/survey-core/src/themes/index.ts"), - }, - plugins: [new FixStyleOnlyEntriesPlugin()], - externals: { - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - } -}; - -module.exports = function (options) { - options.platform = ""; - options.libraryName = "SurveyTheme"; - options.tsConfigFile = path.resolve(__dirname, "./tsconfig.themes.json") - - return merge(webpackCommonConfigCreator(options, { "name": "survey-themes" }, "survey.themes", "survey-core/themes"), config); -}; diff --git a/build-scripts/survey-jquery-ui/README.md b/build-scripts/survey-jquery-ui/README.md deleted file mode 100644 index 1a2d38d875..0000000000 --- a/build-scripts/survey-jquery-ui/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# SurveyJS jQuery Form Library - - - - - -[![Build Status](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_apis/build/status/SurveyJS%20Library?branchName=master)](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=7&branchName=master) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE) - - - - - - - - - - -A free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your jQuery-powered applications. - -## Features - -- Dynamic forms, surveys, polls, and quizzes for your JavaScript application -- Integration with React, Angular, Vue, jQuery, and Knockout -- 20+ built-in question types and support for custom question types -- Built-in themes and CSS customization -- Answer validation -- TypeScript support -- Community-supported UI localization to 50+ languages -- Integration with any backend framework (examples for PHP, NodeJS, and ASP.NET included) -- Compatibility with any server + database combination -- Third-party component integration - -## Get Started - -To get started with SurveyJS jQuery Form Library, refer to the following tutorial: [Add a Survey to a jQuery Application](https://surveyjs.io/Documentation/Library?id=get-started-jquery). - -## Resources - -- [Website](https://surveyjs.io/) -- [Documentation](https://surveyjs.io/Documentation/Library) -- [Live Examples](https://surveyjs.io/form-library/examples/nps-question/jquery) -- [What's New](https://surveyjs.io/WhatsNew) - -## Build SurveyJS jQuery Form Library from Sources - -Refer to instructions in the root README file: [Build the SurveyJS Form Library from Sources](https://github.com/surveyjs/survey-library#build-the-surveyjs-form-library-from-sources). - -## Licensing - -SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE). diff --git a/build-scripts/survey-jquery-ui/package.json b/build-scripts/survey-jquery-ui/package.json deleted file mode 100644 index 44dba4665b..0000000000 --- a/build-scripts/survey-jquery-ui/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "survey-jquery-ui", - "version": "1.8.33", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "jquery", - "jquery-plugin" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey-jquery-ui.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "survey-jquery-ui.d.ts", - "dependencies": { - "jquery": ">=1.12.4" - }, - "peerDependencies": { - "survey-core": "*" - } -} \ No newline at end of file diff --git a/build-scripts/survey-jquery-ui/tsconfig.json b/build-scripts/survey-jquery-ui/tsconfig.json deleted file mode 100644 index aabf0e3a5f..0000000000 --- a/build-scripts/survey-jquery-ui/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../tsconfig.json", -} \ No newline at end of file diff --git a/build-scripts/survey-jquery-ui/tsconfig.typing.jquery-ui.json b/build-scripts/survey-jquery-ui/tsconfig.typing.jquery-ui.json deleted file mode 100644 index 0cec6c2970..0000000000 --- a/build-scripts/survey-jquery-ui/tsconfig.typing.jquery-ui.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "lib": [ - "DOM", - "ES5", - "ES2015.Promise", - "es6" - ], - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../build/survey-core" - ], - "@coreIconsV1": [ - "../../build/survey-core/icons/iconsV1" - ], - "@coreIconsV2": [ - "../../build/survey-core/icons/iconsV2" - ] - }, - "sourceMap": false, - "noImplicitAny": false, - "importHelpers": false, - "experimentalDecorators": true, - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "strictNullChecks": true, - "jsx": "react", - "declaration": true, - "emitDeclarationOnly": true, - "skipLibCheck": true - }, - "include": [ - "../../src/entries/jquery-ui.ts" - ], -} \ No newline at end of file diff --git a/build-scripts/survey-jquery-ui/webpack.config.js b/build-scripts/survey-jquery-ui/webpack.config.js deleted file mode 100644 index c8643d6e3f..0000000000 --- a/build-scripts/survey-jquery-ui/webpack.config.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); -var path = require("path"); - -const config = { - resolve: { - alias: { - "react": "preact/compat", - "react-dom/test-utils": "preact/test-utils", - "react-dom": "preact/compat", // Must be below test-utils - "react/jsx-runtime": "preact/jsx-runtime" - }, - extensions: ['.ts', '.tsx'] - }, - externals: { - jquery: { - root: "jQuery", - commonjs2: "jquery", - commonjs: "jquery", - amd: "jquery" - }, - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - }, - plugins: [ - new DtsGeneratorPlugin({ - tsConfigPath: "./build-scripts/survey-jquery-ui/tsconfig.typing.jquery-ui.json", - filePath: "build/survey-jquery-ui/survey-jquery-ui.d.ts", - moduleName: "survey-jquery-ui", - importName: "src/entries/jquery-ui" - }), - ], -}; - -module.exports = function (options) { - options.platform = "jquery-ui"; - options.libraryName = "SurveyJquery"; - return merge(webpackCommonConfigCreator(options, packageJson, "survey-jquery-ui"), config); -} diff --git a/build-scripts/survey-jquery/README.md b/build-scripts/survey-jquery/README.md deleted file mode 100644 index 1a2d38d875..0000000000 --- a/build-scripts/survey-jquery/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# SurveyJS jQuery Form Library - - - - - -[![Build Status](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_apis/build/status/SurveyJS%20Library?branchName=master)](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=7&branchName=master) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE) - - - - - - - - - - -A free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your jQuery-powered applications. - -## Features - -- Dynamic forms, surveys, polls, and quizzes for your JavaScript application -- Integration with React, Angular, Vue, jQuery, and Knockout -- 20+ built-in question types and support for custom question types -- Built-in themes and CSS customization -- Answer validation -- TypeScript support -- Community-supported UI localization to 50+ languages -- Integration with any backend framework (examples for PHP, NodeJS, and ASP.NET included) -- Compatibility with any server + database combination -- Third-party component integration - -## Get Started - -To get started with SurveyJS jQuery Form Library, refer to the following tutorial: [Add a Survey to a jQuery Application](https://surveyjs.io/Documentation/Library?id=get-started-jquery). - -## Resources - -- [Website](https://surveyjs.io/) -- [Documentation](https://surveyjs.io/Documentation/Library) -- [Live Examples](https://surveyjs.io/form-library/examples/nps-question/jquery) -- [What's New](https://surveyjs.io/WhatsNew) - -## Build SurveyJS jQuery Form Library from Sources - -Refer to instructions in the root README file: [Build the SurveyJS Form Library from Sources](https://github.com/surveyjs/survey-library#build-the-surveyjs-form-library-from-sources). - -## Licensing - -SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE). diff --git a/build-scripts/survey-jquery/package.json b/build-scripts/survey-jquery/package.json deleted file mode 100644 index 6150075e98..0000000000 --- a/build-scripts/survey-jquery/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "survey-jquery", - "version": "1.8.33", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "jquery", - "jquery-plugin" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey.jquery.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "survey.jquery.d.ts", - "dependencies": { - "jquery": ">=1.12.4" - } -} \ No newline at end of file diff --git a/build-scripts/survey-jquery/tsconfig.json b/build-scripts/survey-jquery/tsconfig.json deleted file mode 100644 index 02fa849770..0000000000 --- a/build-scripts/survey-jquery/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions:": { - "baseUrl": ".", - "paths": { - "survey-core": ["../../src/entries/core.ts"], - } - } -} diff --git a/build-scripts/survey-jquery/tsconfig.plugins.themes.typing.json b/build-scripts/survey-jquery/tsconfig.plugins.themes.typing.json deleted file mode 100644 index 4167a94781..0000000000 --- a/build-scripts/survey-jquery/tsconfig.plugins.themes.typing.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../build/survey-core" - ] - }, - "declaration": true, - "emitDeclarationOnly": true, - "outDir": "../../build/survey-jquery/themes/typings/" - }, - "include": [ - "../../packages/survey-core/src/themes/index.ts" - ] -} \ No newline at end of file diff --git a/build-scripts/survey-jquery/tsconfig.typing.jquery.json b/build-scripts/survey-jquery/tsconfig.typing.jquery.json deleted file mode 100644 index e0a2ddfb32..0000000000 --- a/build-scripts/survey-jquery/tsconfig.typing.jquery.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "lib": [ - "DOM", - "ES5", - "ES2015.Promise", - "es6" - ], - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../src/entries/core.ts" - ], - "@coreIconsV1": [ - "../../packages/survey-core/src/iconsV1" - ], - "@coreIconsV2": [ - "../../packages/survey-core/src/iconsV2" - ] - }, - "sourceMap": false, - "noImplicitAny": false, - "importHelpers": false, - "experimentalDecorators": true, - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "declaration": true, - "emitDeclarationOnly": true, - "skipLibCheck": true - }, - "include": [ - "../../src/entries/jquery.ts" - ], -} \ No newline at end of file diff --git a/build-scripts/survey-jquery/webpack.config.js b/build-scripts/survey-jquery/webpack.config.js deleted file mode 100644 index ce5223e87f..0000000000 --- a/build-scripts/survey-jquery/webpack.config.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); -var path = require("path"); - -const config = { - entry: { - survey: path.resolve(__dirname, "../../src/main.scss"), - modern: path.resolve(__dirname, "../../src/modern.scss"), - defaultV2: path.resolve(__dirname, "../../packages/survey-core/src/defaultV2-theme/defaultV2.scss") - }, - externals: { - jquery: { - root: "jQuery", - commonjs2: "jquery", - commonjs: "jquery", - amd: "jquery" - } - }, - plugins: [ - new DtsGeneratorPlugin({ - tsConfigPath: "./build-scripts/survey-jquery/tsconfig.typing.jquery.json", - filePath: "build/survey-jquery/survey.jquery.d.ts", - moduleName: "survey-jquery", - importName: "src/entries/jquery" - }), - ], -}; - -module.exports = function (options) { - options.platform = "jquery"; - options.libraryName = "Survey"; - return merge(webpackCommonConfigCreator(options, packageJson, "survey.jquery"), config); -} diff --git a/build-scripts/survey-jquery/webpack.themes.config.js b/build-scripts/survey-jquery/webpack.themes.config.js deleted file mode 100644 index f1627b06f6..0000000000 --- a/build-scripts/survey-jquery/webpack.themes.config.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const { merge } = require("webpack-merge"); -var FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -var path = require("path"); - -const config = { - entry: { - "default-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-light.ts"), - "default-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-dark.ts"), - "default-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-light-panelless.ts"), - "default-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-dark-panelless.ts"), - "sharp-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-light.ts"), - "sharp-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-dark.ts"), - "sharp-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-light-panelless.ts"), - "sharp-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-dark-panelless.ts"), - "borderless-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-light.ts"), - "borderless-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-dark.ts"), - "borderless-light-panelless.": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-light-panelless.ts"), - "borderless-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-dark-panelless.ts"), - "flat-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-light.ts"), - "flat-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-dark.ts"), - "flat-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-light-panelless.ts"), - "flat-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-dark-panelless.ts"), - "plain-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-light.ts"), - "plain-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-dark.ts"), - "plain-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-light-panelless.ts"), - "plain-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-dark-panelless.ts"), - "doubleborder-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-light.ts"), - "doubleborder-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-dark.ts"), - "doubleborder-light-panelles": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-light-panelless.ts"), - "doubleborder-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-dark-panelless.ts"), - "layered-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-light.ts"), - "layered-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-dark.ts"), - "layered-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-light-panelless.ts"), - "layered-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-dark-panelless.ts"), - "solid-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-light.ts"), - "solid-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-dark.ts"), - "solid-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-light-panelless.ts"), - "solid-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-dark-panelless.ts"), - "three-dimensional-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-light.ts"), - "three-dimensional-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-dark.ts"), - "three-dimensional-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-light-panelless.ts"), - "three-dimensional-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-dark-panelless.ts"), - "contrast-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-light.ts"), - "contrast-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-dark.ts"), - "contrast-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-light-panelless.ts"), - "contrast-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-dark-panelless.ts"), - "index": path.resolve(__dirname, "../../packages/survey-core/src/themes/index.ts"), - }, - plugins: [new FixStyleOnlyEntriesPlugin()], - externals: { - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - } -}; - -module.exports = function (options) { - options.platform = ""; - options.libraryName = "SurveyTheme"; - if (options.buildType !== "prod") { - config.plugins.push(new DtsGeneratorPlugin({ - tsConfigPath: "./build-scripts/survey-jquery/tsconfig.plugins.themes.typing.json", - filePath: "build/survey-jquery/themes/index.d.ts", - moduleName: "survey-jquery/themes", - importName: "index" - })); - } - - return merge(webpackCommonConfigCreator(options, { "name": "survey-themes" }, "survey.themes", "survey-jquery/themes"), config); -}; diff --git a/build-scripts/survey-js-ui/package.json b/build-scripts/survey-js-ui/package.json deleted file mode 100644 index 4f80d81e57..0000000000 --- a/build-scripts/survey-js-ui/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "survey-js-ui", - "version": "1.11.7", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "jquery", - "jquery-plugin" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey-js-ui.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "./typings/src/entries/js-ui.d.ts", - "dependencies": {}, - "peerDependencies": { - "survey-core": "*", - "@types/react-dom": "*", - "@types/react": "*" - } -} \ No newline at end of file diff --git a/build-scripts/survey-js-ui/tsconfig.json b/build-scripts/survey-js-ui/tsconfig.json deleted file mode 100644 index 11c6d6809a..0000000000 --- a/build-scripts/survey-js-ui/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../build/survey-core" - ], - "@coreIconsV1": [ - "../../build/survey-core/icons/iconsV1" - ], - "@coreIconsV2": [ - "../../build/survey-core/icons/iconsV2" - ] - }, - "declaration": true, - "declarationDir": "../../build/survey-js-ui/typings", - "skipLibCheck": true, - }, - "include": [ - "../../src/entries/js-ui.ts", - ], - "exclude": [], -} \ No newline at end of file diff --git a/build-scripts/survey-js-ui/webpack.config.js b/build-scripts/survey-js-ui/webpack.config.js deleted file mode 100644 index 0328289aab..0000000000 --- a/build-scripts/survey-js-ui/webpack.config.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); -var path = require("path"); - -const config = { - resolve: { - alias: { - "react": "preact/compat", - "react-dom/test-utils": "preact/test-utils", - "react-dom": "preact/compat", - "react/jsx-runtime": "preact/jsx-runtime" - }, - extensions: ['.ts', '.tsx'] - }, - externals: { - jquery: { - root: "jQuery", - commonjs2: "jquery", - commonjs: "jquery", - amd: "jquery" - }, - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - }, -}; - -module.exports = function (options) { - options.platform = "js-ui"; - options.libraryName = "SurveyUI"; - options.tsConfigFile = path.resolve(__dirname, "./tsconfig.json") - return merge(webpackCommonConfigCreator(options, packageJson, "survey-js-ui"), config); -} diff --git a/build-scripts/survey-knockout-ui/README.md b/build-scripts/survey-knockout-ui/README.md deleted file mode 100644 index baae5028f6..0000000000 --- a/build-scripts/survey-knockout-ui/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# SurveyJS Knockout Form Library - - - - - -[![Build Status](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_apis/build/status/SurveyJS%20Library?branchName=master)](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=7&branchName=master) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE) - - - - - - - - - - -A free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your Knockout applications. - -## Features - -- Dynamic forms, surveys, polls, and quizzes for your JavaScript application -- Integration with React, Angular, Vue, jQuery, and Knockout -- 20+ built-in question types and support for custom question types -- Built-in themes and CSS customization -- Answer validation -- TypeScript support -- Community-supported UI localization to 50+ languages -- Integration with any backend framework (examples for PHP, NodeJS, and ASP.NET included) -- Compatibility with any server + database combination -- Third-party component integration - -## Get Started - -To get started with SurveyJS Knockout Form Library, refer to the following tutorial: [Add a Survey to a Knockout Application](https://surveyjs.io/Documentation/Library?id=get-started-knockout). - -## Resources - -- [Website](https://surveyjs.io/) -- [Documentation](https://surveyjs.io/Documentation/Library) -- [Live Examples](https://surveyjs.io/form-library/examples/nps-question/knockoutjs) -- [What's New](https://surveyjs.io/WhatsNew) - -## Build SurveyJS Knockout Form Library from Sources - -Refer to instructions in the root README file: [Build the SurveyJS Form Library from Sources](https://github.com/surveyjs/survey-library#build-the-surveyjs-form-library-from-sources). - - -## Licensing - -SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE). diff --git a/build-scripts/survey-knockout-ui/package.json b/build-scripts/survey-knockout-ui/package.json deleted file mode 100644 index 4ec6958eb6..0000000000 --- a/build-scripts/survey-knockout-ui/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "survey-knockout-ui", - "version": "2.0.0", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "knockout" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey-knockout-ui.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "survey-knockout-ui.d.ts", - "typesVersions": { - "<4.2": { - "*": [ - "ts3.4/*" - ] - } - }, - "peerDependencies": { - "survey-core": "*" - }, - "dependencies": { - "knockout": "^3.5.0" - } -} \ No newline at end of file diff --git a/build-scripts/survey-knockout-ui/tsconfig.json b/build-scripts/survey-knockout-ui/tsconfig.json deleted file mode 100644 index 91335461c6..0000000000 --- a/build-scripts/survey-knockout-ui/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../tsconfig.json", -} diff --git a/build-scripts/survey-knockout-ui/tsconfig.typing.ko-ui.json b/build-scripts/survey-knockout-ui/tsconfig.typing.ko-ui.json deleted file mode 100644 index 11da4a8903..0000000000 --- a/build-scripts/survey-knockout-ui/tsconfig.typing.ko-ui.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "lib": [ - "DOM", - "ES5", - "ES2015.Promise", - "es6" - ], - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../build/survey-core" - ], - "@coreIconsV1": [ - "../../build/survey-core/icons/iconsV1" - ], - "@coreIconsV2": [ - "../../build/survey-core/icons/iconsV2" - ] - }, - "sourceMap": false, - "noImplicitAny": false, - "importHelpers": false, - "experimentalDecorators": true, - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "declaration": true, - "emitDeclarationOnly": true, - "skipLibCheck": true - }, - "include": [ - "../../src/entries/knockout-ui-model.ts" - ], -} \ No newline at end of file diff --git a/build-scripts/survey-knockout-ui/webpack.config.js b/build-scripts/survey-knockout-ui/webpack.config.js deleted file mode 100644 index 566166cacd..0000000000 --- a/build-scripts/survey-knockout-ui/webpack.config.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); - -const config = { - externals: { - knockout: { - root: "ko", - commonjs2: "knockout", - commonjs: "knockout", - amd: "knockout" - }, - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - }, - plugins: [ - new DtsGeneratorPlugin({ - tsConfigPath: "./build-scripts/survey-knockout-ui/tsconfig.typing.ko-ui.json", - filePath: "build/survey-knockout-ui/survey-knockout-ui.d.ts", - moduleName: "survey-knockout-ui", - importName: "entries/knockout-ui-model" - }), - ], -}; - -module.exports = function (options) { - options.platform = "knockout-ui"; - options.libraryName = "SurveyKnockout"; - return merge(webpackCommonConfigCreator(options, packageJson), config); -} diff --git a/build-scripts/survey-knockout/README.md b/build-scripts/survey-knockout/README.md deleted file mode 100644 index e3e032c808..0000000000 --- a/build-scripts/survey-knockout/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# SurveyJS Form Library for Knockout - - - - - -SurveyJS Form Library is a free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your web applications. - -> **NOTE**: This package contains a legacy version of SurveyJS Form Library for Knockout. We recommend using a [new implementation](https://www.npmjs.com/package/survey-react-ui) that separates the data model from the UI rendering. For information on how to integrate it into your application, refer to the following tutorial: [Add a Survey to a Knockout Application](https://surveyjs.io/form-library/documentation/get-started-knockout). - -## Resources - -- [Website](https://surveyjs.io/) -- [Documentation](https://surveyjs.io/Documentation/Library) -- [Live Examples](https://surveyjs.io/form-library/examples/nps-question/knockoutjs) -- [What's New](https://surveyjs.io/WhatsNew) - -## Build SurveyJS Form Library for Knockout from Sources - -Refer to instructions in the root README file: [Build the SurveyJS Form Library from Sources](https://github.com/surveyjs/survey-library#build-the-surveyjs-form-library-from-sources). - -## Licensing - -SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE). diff --git a/build-scripts/survey-knockout/karma.conf.knockout.js b/build-scripts/survey-knockout/karma.conf.knockout.js deleted file mode 100644 index f8de30a26d..0000000000 --- a/build-scripts/survey-knockout/karma.conf.knockout.js +++ /dev/null @@ -1,9 +0,0 @@ -var karmaKonf = require("../karma.conf"); - -module.exports = function(config) { - karmaKonf(config); - config.set({ - basePath: "../../", - files: ["tests/markup/question_knockout_tests.ts"], - }); -}; diff --git a/build-scripts/survey-knockout/package.json b/build-scripts/survey-knockout/package.json deleted file mode 100644 index f51ac014c6..0000000000 --- a/build-scripts/survey-knockout/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "survey-knockout", - "version": "1.8.33", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "knockout" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey.ko.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "survey.ko.d.ts", - "typesVersions": { - "<4.2": { - "*": [ - "ts3.4/*" - ] - } - }, - "dependencies": { - "knockout": "^3.5.1" - } -} \ No newline at end of file diff --git a/build-scripts/survey-knockout/tsconfig.json b/build-scripts/survey-knockout/tsconfig.json deleted file mode 100644 index 02fa849770..0000000000 --- a/build-scripts/survey-knockout/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions:": { - "baseUrl": ".", - "paths": { - "survey-core": ["../../src/entries/core.ts"], - } - } -} diff --git a/build-scripts/survey-knockout/tsconfig.typing.ko.json b/build-scripts/survey-knockout/tsconfig.typing.ko.json deleted file mode 100644 index b912ced94b..0000000000 --- a/build-scripts/survey-knockout/tsconfig.typing.ko.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "lib": [ - "DOM", - "ES5", - "ES2015.Promise", - "es6" - ], - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../src/entries/core.ts" - ], - "@coreIconsV1": [ - "../../packages/survey-core/src/iconsV1" - ], - "@coreIconsV2": [ - "../../packages/survey-core/src/iconsV2" - ] - }, - "sourceMap": false, - "noImplicitAny": false, - "importHelpers": false, - "experimentalDecorators": true, - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "declaration": true, - "emitDeclarationOnly": true, - "skipLibCheck": true - }, - "include": [ - "../../src/entries/knockout.ts" - ], -} \ No newline at end of file diff --git a/build-scripts/survey-knockout/webpack.config.js b/build-scripts/survey-knockout/webpack.config.js deleted file mode 100644 index 6509e9c7b0..0000000000 --- a/build-scripts/survey-knockout/webpack.config.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); -var path = require("path"); - -const config = { - entry: { - survey: path.resolve(__dirname, "../../src/main.scss"), - modern: path.resolve(__dirname, "../../src/modern.scss"), - defaultV2: path.resolve(__dirname, "../../packages/survey-core/src/defaultV2-theme/defaultV2.scss") - }, - externals: { - knockout: { - root: "ko", - commonjs2: "knockout", - commonjs: "knockout", - amd: "knockout" - } - }, - plugins: [ - new DtsGeneratorPlugin({ - tsConfigPath: "./build-scripts/survey-knockout/tsconfig.typing.ko.json", - filePath: "build/survey-knockout/survey.ko.d.ts", - moduleName: "survey-knockout", - importName: "src/entries/knockout" - }), - ], -}; - -module.exports = function (options) { - options.platform = "knockout"; - options.libraryName = "Survey"; - return merge(webpackCommonConfigCreator(options, packageJson, "survey.ko"), config); -} diff --git a/build-scripts/survey-react-ui/README.md b/build-scripts/survey-react-ui/README.md deleted file mode 100644 index 9a9e4f2be2..0000000000 --- a/build-scripts/survey-react-ui/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# SurveyJS React Form Library - - - - - -[![Build Status](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_apis/build/status/SurveyJS%20Library?branchName=master)](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=7&branchName=master) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE) - - - - - - - - - - -A free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your React applications. - -## Features - -- Dynamic forms, surveys, polls, and quizzes for your JavaScript application -- Integration with React, Angular, Vue, jQuery, and Knockout -- 20+ built-in question types and support for custom question types -- Built-in themes and CSS customization -- Answer validation -- TypeScript support -- Community-supported UI localization to 50+ languages -- Integration with any backend framework (examples for PHP, NodeJS, and ASP.NET included) -- Compatibility with any server + database combination -- Third-party component integration - -## Get Started - -To get started with SurveyJS React Form Library, refer to the following tutorial: [Add a Survey to a React Application](https://surveyjs.io/Documentation/Library?id=get-started-react). - -## Resources - -- [Website](https://surveyjs.io/) -- [Documentation](https://surveyjs.io/Documentation/Library) -- [Live Examples](https://surveyjs.io/form-library/examples/nps-question/reactjs) -- [What's New](https://surveyjs.io/WhatsNew) - -## Build SurveyJS React Form Library from Sources - -Refer to instructions in the root README file: [Build the SurveyJS Form Library from Sources](https://github.com/surveyjs/survey-library#build-the-surveyjs-form-library-from-sources). - -## Licensing - -SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE). diff --git a/build-scripts/survey-react-ui/package.json b/build-scripts/survey-react-ui/package.json deleted file mode 100644 index 9eee0f2db8..0000000000 --- a/build-scripts/survey-react-ui/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "survey-react-ui", - "version": "2.0.0", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "knockout" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey-react-ui.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "./typings/src/entries/react-ui.d.ts", - "peerDependencies": { - "survey-core": "*", - "react": "^16.5.0 || ^17.0.1 || ^18.2.0 || ^19.0.0", - "react-dom": "^16.5.0 || ^17.0.1 || ^18.2.0 || ^19.0.0" - } -} \ No newline at end of file diff --git a/build-scripts/survey-react-ui/tsconfig.json b/build-scripts/survey-react-ui/tsconfig.json deleted file mode 100644 index daaf7ceaff..0000000000 --- a/build-scripts/survey-react-ui/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "jsx": "react", - "paths": { - "survey-core": [ - "../../build/survey-core" - ], - "@coreIconsV1": [ - "../../build/survey-core/icons/iconsV1" - ], - "@coreIconsV2": [ - "../../build/survey-core/icons/iconsV2" - ] - }, - "declaration": true, - "declarationDir": "../../build/survey-react-ui/typings" - }, - "include": [ - "../../src/entries/react-ui.ts" - ], - "exclude": [] -} \ No newline at end of file diff --git a/build-scripts/survey-react-ui/webpack.config.js b/build-scripts/survey-react-ui/webpack.config.js deleted file mode 100644 index 2c1a3d1dd1..0000000000 --- a/build-scripts/survey-react-ui/webpack.config.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const { merge } = require("webpack-merge"); -const packageJson = require("./package.json"); -const path = require("path"); - -const config = { - externals: { - react: { - root: "React", - commonjs2: "react", - commonjs: "react", - amd: "react" - }, - "react-dom": { - root: "ReactDOM", - commonjs2: "react-dom", - commonjs: "react-dom", - amd: "react-dom" - }, - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - }, -}; - -module.exports = function (options) { - options.platform = "react-ui"; - options.libraryName = "SurveyReact"; - options.tsConfigFile = path.resolve(__dirname, "./tsconfig.json") - return merge(webpackCommonConfigCreator(options, packageJson), config); -} diff --git a/build-scripts/survey-react/README.md b/build-scripts/survey-react/README.md deleted file mode 100644 index 109fb5d8c6..0000000000 --- a/build-scripts/survey-react/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# SurveyJS Form Library for React - - - - - -SurveyJS Form Library is a free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your web applications. - -> **NOTE**: This package contains a legacy Knockout-dependent version of SurveyJS Form Library for React. We recommend using a new [native implementation of SurveyJS React Form Library](https://www.npmjs.com/package/survey-react-ui). For information on how to integrate it into your application, refer to the following tutorial: [Add a Survey to a React Application](https://surveyjs.io/form-library/documentation/get-started-react). - -## Resources - -- [Website](https://surveyjs.io/) -- [Documentation](https://surveyjs.io/Documentation/Library) -- [Live Examples](https://surveyjs.io/form-library/examples/nps-question/reactjs) -- [What's New](https://surveyjs.io/WhatsNew) - -## Build SurveyJS Form Library for React from Sources - -Refer to instructions in the root README file: [Build the SurveyJS Form Library from Sources](https://github.com/surveyjs/survey-library#build-the-surveyjs-form-library-from-sources). - -## Licensing - -SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE). diff --git a/build-scripts/survey-react/karma.conf.react.js b/build-scripts/survey-react/karma.conf.react.js deleted file mode 100644 index f3100790fc..0000000000 --- a/build-scripts/survey-react/karma.conf.react.js +++ /dev/null @@ -1,9 +0,0 @@ -var karmaKonf = require("../karma.conf"); - -module.exports = function(config) { - karmaKonf(config); - config.set({ - basePath: "../../", - files: ["tests/markup/question_react_tests.ts"], - }); -}; \ No newline at end of file diff --git a/build-scripts/survey-react/package.json b/build-scripts/survey-react/package.json deleted file mode 100644 index e5fba3e5fb..0000000000 --- a/build-scripts/survey-react/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "survey-react", - "version": "1.8.33", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "react", - "react-component" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey.react.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "survey.react.d.ts", - "peerDependencies": { - "react": "^16.5.0 || ^17.0.1 || ^18.1.0", - "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0" - } -} \ No newline at end of file diff --git a/build-scripts/survey-react/tsconfig.json b/build-scripts/survey-react/tsconfig.json deleted file mode 100644 index 02fa849770..0000000000 --- a/build-scripts/survey-react/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions:": { - "baseUrl": ".", - "paths": { - "survey-core": ["../../src/entries/core.ts"], - } - } -} diff --git a/build-scripts/survey-react/tsconfig.typing.react.json b/build-scripts/survey-react/tsconfig.typing.react.json deleted file mode 100644 index d65c69877e..0000000000 --- a/build-scripts/survey-react/tsconfig.typing.react.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "lib": [ - "DOM", - "ES5", - "ES2015.Promise", - "es6" - ], - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../src/entries/core.ts" - ], - "@coreIconsV1": [ - "../../packages/survey-core/src/iconsV1" - ], - "@coreIconsV2": [ - "../../packages/survey-core/src/iconsV2" - ] - }, - "sourceMap": false, - "noImplicitAny": false, - "importHelpers": false, - "experimentalDecorators": true, - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "jsx": "react", - "declaration": true, - "emitDeclarationOnly": true, - "skipLibCheck": true - }, - "include": [ - "../../src/entries/react.ts" - ], -} \ No newline at end of file diff --git a/build-scripts/survey-react/webpack.config.js b/build-scripts/survey-react/webpack.config.js deleted file mode 100644 index 1c15b892be..0000000000 --- a/build-scripts/survey-react/webpack.config.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); -var path = require("path"); - -const config = { - entry: { - survey: path.resolve(__dirname, "../../src/main.scss"), - modern: path.resolve(__dirname, "../../src/modern.scss"), - defaultV2: path.resolve(__dirname, "../../packages/survey-core/src/defaultV2-theme/defaultV2.scss") - }, - externals: { - react: { - root: "React", - commonjs2: "react", - commonjs: "react", - amd: "react" - }, - "react-dom": { - root: "ReactDOM", - commonjs2: "react-dom", - commonjs: "react-dom", - amd: "react-dom" - } - }, - plugins: [ - new DtsGeneratorPlugin({ - tsConfigPath: "./build-scripts/survey-react/tsconfig.typing.react.json", - filePath: "build/survey-react/survey.react.d.ts", - moduleName: "survey-react", - importName: "src/entries/react" - }), - ], -}; - -module.exports = function (options) { - options.platform = "react"; - options.libraryName = "Survey"; - return merge(webpackCommonConfigCreator(options, packageJson, "survey.react"), config); -} diff --git a/build-scripts/survey-vue-ui/README.md b/build-scripts/survey-vue-ui/README.md deleted file mode 100644 index 6df3a934f4..0000000000 --- a/build-scripts/survey-vue-ui/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# SurveyJS Vue Form Library (Vue 2) - - - - - -[![Build Status](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_apis/build/status/SurveyJS%20Library?branchName=master)](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=7&branchName=master) -[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE) - - - - - - - - - - -A free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your Vue applications. - -> **NOTE**: This package contains a version of SurveyJS Form Library for Vue 2. If you are looking for a Vue 3 version, refer to the [survey-vue3-ui](https://www.npmjs.com/package/survey-vue3-ui) npm package. - -## Features - -- Dynamic forms, surveys, polls, and quizzes for your JavaScript application -- Integration with React, Angular, Vue, jQuery, and Knockout -- 20+ built-in question types and support for custom question types -- Built-in themes and CSS customization -- Answer validation -- TypeScript support -- Community-supported UI localization to 50+ languages -- Integration with any backend framework (examples for PHP, NodeJS, and ASP.NET included) -- Compatibility with any server + database combination -- Third-party component integration - -## Get Started - -To get started with SurveyJS Vue Form Library, refer to the following tutorial: [Add a Survey to a Vue 2 Application](https://surveyjs.io/form-library/documentation/get-started-vue#add-a-survey-to-a-vue-2-application). - -## Resources - -- [Website](https://surveyjs.io/) -- [Documentation](https://surveyjs.io/Documentation/Library) -- [Live Examples](https://surveyjs.io/form-library/examples/nps-question/vuejs) -- [What's New](https://surveyjs.io/WhatsNew) - -## Build SurveyJS Vue Form Library from Sources - -Refer to instructions in the root README file: [Build the SurveyJS Form Library from Sources](https://github.com/surveyjs/survey-library#build-the-surveyjs-form-library-from-sources). - -## Licensing - -SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE). diff --git a/build-scripts/survey-vue-ui/package.json b/build-scripts/survey-vue-ui/package.json deleted file mode 100644 index 7385e7505b..0000000000 --- a/build-scripts/survey-vue-ui/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "survey-vue-ui", - "version": "2.0.0", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "knockout" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey-vue-ui.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "survey-vue-ui.d.ts", - "peerDependencies": { - "survey-core": "*" - }, - "dependencies": { - "vue": "^2.6.12" - } -} \ No newline at end of file diff --git a/build-scripts/survey-vue-ui/tsconfig.json b/build-scripts/survey-vue-ui/tsconfig.json deleted file mode 100644 index 91335461c6..0000000000 --- a/build-scripts/survey-vue-ui/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../tsconfig.json", -} diff --git a/build-scripts/survey-vue-ui/tsconfig.typing.vue-ui.json b/build-scripts/survey-vue-ui/tsconfig.typing.vue-ui.json deleted file mode 100644 index e328fa6a55..0000000000 --- a/build-scripts/survey-vue-ui/tsconfig.typing.vue-ui.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "lib": [ - "DOM", - "ES5", - "ES2015.Promise", - "es6" - ], - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../build/survey-core" - ], - "@coreIconsV1": [ - "../../build/survey-core/icons/iconsV1" - ], - "@coreIconsV2": [ - "../../build/survey-core/icons/iconsV2" - ] - }, - "types": [ - "vite/client", - ], - "declaration": true, - "emitDeclarationOnly": true, - "skipLibCheck": true, - "experimentalDecorators": true, - "moduleResolution": "Node" - }, - "include": [ - "../../src/entries/vue-ui-model.ts" - ] -} \ No newline at end of file diff --git a/build-scripts/survey-vue-ui/webpack.config.js b/build-scripts/survey-vue-ui/webpack.config.js deleted file mode 100644 index f5b5b0104b..0000000000 --- a/build-scripts/survey-vue-ui/webpack.config.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); - -const config = { - externals: { - vue: { - root: "Vue", - commonjs2: "vue", - commonjs: "vue", - amd: "vue" - }, - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - }, - plugins: [ - new DtsGeneratorPlugin({ - tsCommand: "vue-tsc --project", - tsConfigPath: "./build-scripts/survey-vue-ui/tsconfig.typing.vue-ui.json", - filePath: "build/survey-vue-ui/survey-vue-ui.d.ts", - moduleName: "survey-vue-ui", - importName: "entries/vue-ui-model" - }), - ], -}; - -module.exports = function (options) { - options.platform = "vue-ui"; - options.libraryName = "SurveyVue"; - return merge(webpackCommonConfigCreator(options, packageJson), config); -} diff --git a/build-scripts/survey-vue/README.md b/build-scripts/survey-vue/README.md deleted file mode 100644 index 0c3d49fb82..0000000000 --- a/build-scripts/survey-vue/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# SurveyJS Form Library for Vue - - - - - -SurveyJS Form Library is a free and open-source MIT-licensed JavaScript form builder library that allows you to design dynamic, data-driven, multi-language survey forms and run them in your web applications. - -> **NOTE**: This package contains a legacy Knockout-dependent version of SurveyJS Form Library for Vue. We recommend using a new [native implementation of SurveyJS Vue Form Library](https://www.npmjs.com/package/survey-vue-ui). For information on how to integrate it into your application, refer to the following tutorial: [Add a Survey to a Vue Application](https://surveyjs.io/form-library/documentation/get-started-vue). - -## Resources - -- [Website](https://surveyjs.io/) -- [Documentation](https://surveyjs.io/Documentation/Library) -- [Live Examples](https://surveyjs.io/form-library/examples/nps-question/vuejs) -- [What's New](https://surveyjs.io/WhatsNew) - -## Build SurveyJS Form Library for Vue from Sources - -Refer to instructions in the root README file: [Build the SurveyJS Form Library from Sources](https://github.com/surveyjs/survey-library#build-the-surveyjs-form-library-from-sources). - -## Licensing - -SurveyJS Form Library is distributed under the [MIT license](https://github.com/surveyjs/survey-library/blob/master/LICENSE). diff --git a/build-scripts/survey-vue/karma.conf.vue.js b/build-scripts/survey-vue/karma.conf.vue.js deleted file mode 100644 index 39e67f2250..0000000000 --- a/build-scripts/survey-vue/karma.conf.vue.js +++ /dev/null @@ -1,10 +0,0 @@ -var karmaKonf = require("../karma.conf"); - -module.exports = function(config) { - karmaKonf(config); - config.set({ - basePath: "../../", - files: ["tests/markup/question_vue_tests.ts"], - browserConsoleLogOptions: {level: "warn"} - }); -}; \ No newline at end of file diff --git a/build-scripts/survey-vue/package.json b/build-scripts/survey-vue/package.json deleted file mode 100644 index 74931d2338..0000000000 --- a/build-scripts/survey-vue/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "survey-vue", - "version": "1.8.33", - "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.", - "keywords": [ - "Survey", - "JavaScript", - "Bootstrap", - "Library", - "vue" - ], - "homepage": "https://surveyjs.io/", - "license": "MIT", - "files": [ - "**/*" - ], - "main": "survey-vue.js", - "repository": { - "type": "git", - "url": "https://github.com/surveyjs/surveyjs.git" - }, - "typings": "survey.vue.d.ts", - "dependencies": { - "vue": "^2.1.10" - } -} \ No newline at end of file diff --git a/build-scripts/survey-vue/tsconfig.json b/build-scripts/survey-vue/tsconfig.json deleted file mode 100644 index 02fa849770..0000000000 --- a/build-scripts/survey-vue/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions:": { - "baseUrl": ".", - "paths": { - "survey-core": ["../../src/entries/core.ts"], - } - } -} diff --git a/build-scripts/survey-vue/tsconfig.plugins.themes.typing.json b/build-scripts/survey-vue/tsconfig.plugins.themes.typing.json deleted file mode 100644 index 372361210c..0000000000 --- a/build-scripts/survey-vue/tsconfig.plugins.themes.typing.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../build/survey-core" - ] - }, - "declaration": true, - "emitDeclarationOnly": true, - "outDir": "../../build/survey-vue/themes/typings/" - }, - "include": [ - "../../packages/survey-core/src/themes/index.ts" - ] -} \ No newline at end of file diff --git a/build-scripts/survey-vue/tsconfig.typing.vue.json b/build-scripts/survey-vue/tsconfig.typing.vue.json deleted file mode 100644 index 67ba456416..0000000000 --- a/build-scripts/survey-vue/tsconfig.typing.vue.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "lib": [ - "DOM", - "ES5", - "ES2015.Promise", - "es6" - ], - "baseUrl": ".", - "paths": { - "survey-core": [ - "../../src/entries/core.ts" - ], - "@coreIconsV1": [ - "../../packages/survey-core/src/iconsV1" - ], - "@coreIconsV2": [ - "../../packages/survey-core/src/iconsV2" - ] - }, - "types": [ - "vite/client", - "node", - ], - "declaration": true, - "emitDeclarationOnly": true, - "skipLibCheck": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "moduleResolution": "Node" - }, - "include": [ - "../../src/entries/vue.ts" - ] -} \ No newline at end of file diff --git a/build-scripts/survey-vue/webpack.config.js b/build-scripts/survey-vue/webpack.config.js deleted file mode 100644 index 562822603f..0000000000 --- a/build-scripts/survey-vue/webpack.config.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -const { merge } = require("webpack-merge"); -var packageJson = require("./package.json"); -var path = require("path"); - -const config = { - entry: { - survey: path.resolve(__dirname, "../../src/main.scss"), - modern: path.resolve(__dirname, "../../src/modern.scss"), - defaultV2: path.resolve(__dirname, "../../packages/survey-core/src/defaultV2-theme/defaultV2.scss") - }, - externals: { - vue: { - root: "Vue", - commonjs2: "vue", - commonjs: "vue", - amd: "vue" - } - }, - plugins: [ - new DtsGeneratorPlugin({ - tsCommand: "vue-tsc --project", - tsConfigPath: "./build-scripts/survey-vue/tsconfig.typing.vue.json", - filePath: "build/survey-vue/survey.vue.d.ts", - moduleName: "survey-vue", - importName: "src/entries/vue" - }), - ], -}; - -module.exports = function (options) { - options.platform = "vue"; - options.libraryName = "Survey"; - return merge(webpackCommonConfigCreator(options, packageJson, "survey.vue"), config); -} diff --git a/build-scripts/survey-vue/webpack.themes.config.js b/build-scripts/survey-vue/webpack.themes.config.js deleted file mode 100644 index 0ff6a7a198..0000000000 --- a/build-scripts/survey-vue/webpack.themes.config.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; - -const webpackCommonConfigCreator = require("../webpack.common"); -const { merge } = require("webpack-merge"); -var FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); -const DtsGeneratorPlugin = require("../webpack-dts-generator"); -var path = require("path"); - -const config = { - entry: { - "default-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-light.ts"), - "default-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-dark.ts"), - "default-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-light-panelless.ts"), - "default-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/default-dark-panelless.ts"), - "sharp-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-light.ts"), - "sharp-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-dark.ts"), - "sharp-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-light-panelless.ts"), - "sharp-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/sharp-dark-panelless.ts"), - "borderless-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-light.ts"), - "borderless-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-dark.ts"), - "borderless-light-panelless.": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-light-panelless.ts"), - "borderless-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/borderless-dark-panelless.ts"), - "flat-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-light.ts"), - "flat-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-dark.ts"), - "flat-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-light-panelless.ts"), - "flat-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/flat-dark-panelless.ts"), - "plain-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-light.ts"), - "plain-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-dark.ts"), - "plain-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-light-panelless.ts"), - "plain-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/plain-dark-panelless.ts"), - "doubleborder-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-light.ts"), - "doubleborder-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-dark.ts"), - "doubleborder-light-panelles": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-light-panelless.ts"), - "doubleborder-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/doubleborder-dark-panelless.ts"), - "layered-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-light.ts"), - "layered-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-dark.ts"), - "layered-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-light-panelless.ts"), - "layered-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/layered-dark-panelless.ts"), - "solid-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-light.ts"), - "solid-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-dark.ts"), - "solid-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-light-panelless.ts"), - "solid-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/solid-dark-panelless.ts"), - "three-dimensional-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-light.ts"), - "three-dimensional-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-dark.ts"), - "three-dimensional-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-light-panelless.ts"), - "three-dimensional-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/threedimensional-dark-panelless.ts"), - "contrast-light": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-light.ts"), - "contrast-dark": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-dark.ts"), - "contrast-light-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-light-panelless.ts"), - "contrast-dark-panelless": path.resolve(__dirname, "../../packages/survey-core/src/themes/contrast-dark-panelless.ts"), - "index": path.resolve(__dirname, "../../packages/survey-core/src/themes/index.ts"), - }, - plugins: [new FixStyleOnlyEntriesPlugin()], - externals: { - "survey-core": { - root: "Survey", - commonjs2: "survey-core", - commonjs: "survey-core", - amd: "survey-core" - } - } -}; - -module.exports = function (options) { - options.platform = ""; - options.libraryName = "SurveyTheme"; - if (options.buildType !== "prod") { - config.plugins.push(new DtsGeneratorPlugin({ - tsConfigPath: "./build-scripts/survey-vue/tsconfig.plugins.themes.typing.json", - filePath: "build/survey-vue/themes/index.d.ts", - moduleName: "survey-vue/themes", - importName: "index" - })); - } - - return merge(webpackCommonConfigCreator(options, { "name": "survey-themes" }, "survey.themes", "survey-vue/themes"), config); -}; diff --git a/build-scripts/svgbundle.pug b/build-scripts/svgbundle.pug deleted file mode 100644 index 2ffadcd398..0000000000 --- a/build-scripts/svgbundle.pug +++ /dev/null @@ -1,16 +0,0 @@ -svg(style={display: 'none'})&attributes(svg) - - mixin parseObject(obj) - each child in obj - if child !== null && child.type === 'text' - | - else if child !== null && typeof child.children === 'object' - | #[#{child.name}&attributes(child.attribs) #[+parseObject(child.children)]] - - if defs.length - defs - each def in defs - | #[#{def.name}&attributes(def.attribs) #[+parseObject(def.children)]] - - each symbol in symbols - | #[#{symbol.name}&attributes(symbol.attribs) #[+parseObject(symbol.children)]] diff --git a/build-scripts/tsconfig.json b/build-scripts/tsconfig.json deleted file mode 100644 index 7f57f41527..0000000000 --- a/build-scripts/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "lib": [ - "DOM", - "ES5", - "ES6", - "ES2015.Promise" - ], - "sourceMap": true, - "noImplicitAny": true, - "importHelpers": false, - "experimentalDecorators": true, - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "jsx": "react", - "baseUrl": ".", - "paths": { - "@coreIconsV1": [ - "../build/survey-core/icons/iconsV1.d.ts" - ], - "@coreIconsV2": [ - "../build/survey-core/icons/iconsV2.d.ts" - ] - } - }, - "exclude": [ - "../src/entries/**/*.ts" - ], - "include": [ - "../src/**/*.ts" - ] -} \ No newline at end of file diff --git a/build-scripts/tsconfig.tests.json b/build-scripts/tsconfig.tests.json deleted file mode 100644 index cd2a3c2866..0000000000 --- a/build-scripts/tsconfig.tests.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "noImplicitAny": false, - "paths": { - "survey-core": [ - "../src/entries/core.ts" - ], - "@coreIconsV1": [ - "../packages/survey-core/src/iconsV1" - ], - "@coreIconsV2": [ - "../packages/survey-core/src/iconsV2" - ], - "@legacy/*": [ - "../src/*" - ] - } - } -} \ No newline at end of file diff --git a/build-scripts/tslint.json b/build-scripts/tslint.json deleted file mode 100644 index 4b93c3f11e..0000000000 --- a/build-scripts/tslint.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "rules": { - "class-name": true, - "comment-format": [true, "check-space"], - "curly": true, - "eofline": true, - "forin": true, - "indent": [true, "spaces"], - "label-position": true, - "label-undefined": true, - "max-line-length": [true, 140], - "member-access": false, - "member-ordering": [ - true, - "static-before-instance", - "variables-before-functions" - ], - "no-arg": true, - "no-bitwise": true, - "no-console": [true, "debug", "info", "time", "timeEnd", "trace"], - "no-construct": true, - "no-debugger": true, - "no-duplicate-key": true, - "no-duplicate-variable": true, - "no-empty": false, - "no-eval": true, - "no-inferrable-types": true, - "no-shadowed-variable": true, - "no-string-literal": false, - "no-switch-case-fall-through": true, - "no-trailing-whitespace": true, - "no-unused-expression": true, - "no-unused-variable": true, - "no-unreachable": true, - "no-use-before-declare": true, - "no-var-keyword": true, - "object-literal-sort-keys": false, - "one-line": [ - true, - "check-open-brace", - "check-catch", - "check-else", - "check-whitespace" - ], - "quotemark": [true, "double"], - "radix": true, - "semicolon": ["always"], - "triple-equals": [true, "allow-null-check"], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - } -} diff --git a/build-scripts/webpack-bundle-svg.js b/build-scripts/webpack-bundle-svg.js deleted file mode 100644 index 4af4428e00..0000000000 --- a/build-scripts/webpack-bundle-svg.js +++ /dev/null @@ -1,9 +0,0 @@ -class BundleSvgPlugin { - apply(compiler) { - compiler.hooks.afterEnvironment.tap('BundleSvgPlugin', (params) => { - // params['MyPlugin - data'] = 'important stuff my plugin will use later'; - }); - } -} - -module.exports = BundleSvgPlugin; diff --git a/build-scripts/webpack-dts-generator.js b/build-scripts/webpack-dts-generator.js deleted file mode 100644 index 51470c7b64..0000000000 --- a/build-scripts/webpack-dts-generator.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; -const webpack = require("webpack"); -const fs = require('fs'); -const path = require('path'); -const child_process = require('child_process'); - -const legacyModules = ["survey-angular", "survey-jquery", "survey-knockout", "survey-react", "survey-vue"]; - -module.exports = function DtsGeneratorProgressPlugin(options) { - return new webpack.ProgressPlugin(function (progress) { - if (progress === 1) { - console.log("typings start"); - console.log("typescript start"); - const tsConfigPath = options.tsConfigPath || "tsconfig.typing.json"; - const tsCommand = options.tsCommand || "tsc --p"; - let command = tsCommand + " " + tsConfigPath + " --outDir " + path.dirname(options.filePath) + "/typings/"; - if (legacyModules.indexOf(options.moduleName) !== -1) { - command = tsCommand + " " + tsConfigPath + " --outFile " + options.filePath; - } - console.log("tsc command is \"" + command + "\""); - child_process.execSync(command, { stdio: "inherit" }); - console.log("typescript end"); - - let content = "\nexport * from \"./typings/" + options.importName + "\";"; - if (legacyModules.indexOf(options.moduleName) !== -1) { - content = "\ndeclare module \"" + options.moduleName + "\" { import main = require(\"" + options.importName + "\"); export = main; }"; - } - console.log("\"" + content + "\""); - console.log(options.filePath); - if (legacyModules.indexOf(options.moduleName) !== -1) { - fs.writeFile(options.filePath, content, { flag: 'a' }, err => { if (err) { console.error(err); } }); - } else { - fs.writeFile(options.filePath, content, { flag: 'w' }, err => { if (err) { console.error(err); } }); - } - console.log("typings end"); - } - }); -}; diff --git a/build-scripts/webpack.common.js b/build-scripts/webpack.common.js deleted file mode 100644 index a77fae93d1..0000000000 --- a/build-scripts/webpack.common.js +++ /dev/null @@ -1,260 +0,0 @@ -"use strict"; - -var webpack = require("webpack"); -var path = require("path"); -var MiniCssExtractPlugin = require("mini-css-extract-plugin"); -var FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries"); -var RemoveCoreFromName = require("./webpack-remove-core-from-name"); -var TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin"); -const VueLoaderPlugin = require("vue-loader/lib/plugin"); -var GenerateJsonPlugin = require("generate-json-webpack-plugin"); -var DashedNamePlugin = require("./webpack-dashed-name"); -var CamelCaseNamePlugin = require("./webpack-camel-name"); - -var packageJsonWithVersion = require("../package.json"); -var fs = require("fs"); -var replace = require("replace-in-file"); -var svgStoreUtils = require(path.resolve( - __dirname, - "../node_modules/webpack-svgstore-plugin/src/helpers/utils.js" -)); - -module.exports = function (options, packageJson, chunkName, buildFolderName) { - packageJson.version = packageJsonWithVersion.version; - const today = new Date(); - const year = today.getFullYear(); - var banner = [ - "surveyjs - Survey JavaScript library v" + packageJson.version, - "Copyright (c) 2015-" + year + " Devsoft Baltic OÃœ - http://surveyjs.io/", - "License: MIT (http://www.opensource.org/licenses/mit-license.php)", - ].join("\n"); - - var buildPath = __dirname + "/../build/" + (buildFolderName || packageJson.name) + "/"; - var isProductionBuild = options.buildType === "prod"; - - if (!!packageJson.peerDependencies && packageJson.peerDependencies["survey-core"]) { - packageJson.peerDependencies["survey-core"] = packageJson.version; - } - - function createSVGBundle() { - var options = { - fileName: path.resolve( - path.join("./src"), - "./svgbundle.html" - ), - template: path.resolve(__dirname, "./svgbundle.pug"), - svgoOptions: { - plugins: [{ removeTitle: true }], - }, - prefix: "icon-", - }; - - svgStoreUtils.filesMap(path.join("./src/images/**/*.svg"), files => { - const fileContent = svgStoreUtils.createSprite( - svgStoreUtils.parseFiles(files, options), - options.template - ); - fs.writeFileSync(options.fileName, fileContent); - }); - } - - function replaceLines(fileName, regex, to) { - replace.sync( - { - files: fileName, - from: regex, - to: to, - }, - (error, changes) => { - if (error) { - return console.error("Error occurred:", error); - } - console.log("check me : " + fileName); - console.log("Modified files:", changes.join(", ")); - } - ); - } - - function removeLines(fileName, regex) { - replace.sync( - { - files: fileName, - from: regex, - to: "", - }, - (error, changes) => { - if (error) { - return console.error("Error occurred:", error); - } - console.log("check me : " + fileName); - console.log("Modified files:", changes.join(", ")); - } - ); - } - - var packageName = chunkName || packageJson.name; - - var percentage_handler = function handler(percentage, msg) { - if (0 == percentage) { - console.log("Build started... good luck!"); - } else if (1 == percentage) { - if (isProductionBuild) { - if (fs.existsSync(buildPath + "survey.vue.js")) - fs.copyFileSync( - buildPath + "survey.vue.js", - buildPath + "survey-vue.js" - ); - if (fs.existsSync(buildPath + "survey.vue.min.js")) - fs.copyFileSync( - buildPath + "survey.vue.min.js", - buildPath + "survey-vue.min.js" - ); - if (fs.existsSync(__dirname + "/" + packageJson.name + "/README.md")) - fs.copyFileSync( - __dirname + "/" + packageJson.name + "/README.md", - buildPath + "/README.md" - ); - } - } - }; - - var config = { - mode: isProductionBuild ? "production" : "development", - resolve: { - extensions: [".ts", ".js", ".tsx", ".scss"], - plugins: [new TsconfigPathsPlugin({ configFile: options.tsConfigFile || "./tsconfig.json" })], - alias: { - "@coreIconsV1": path.resolve(__dirname, "../build/survey-core/icons/iconsV1.js"), - "@coreIconsV2": path.resolve(__dirname, "../build/survey-core/icons/iconsV2.js"), - }, - }, - optimization: { - minimize: isProductionBuild, - concatenateModules: true - }, - module: { - rules: [ - { - test: /\.(ts|tsx)$/, - loader: "ts-loader", - options: { - transpileOnly: isProductionBuild, - appendTsSuffixTo: [/\.vue$/], - configFile: options.tsConfigFile || 'tsconfig.json' - }, - }, - { - test: /\.vue$/, - use: { - loader: "vue-loader", - options: { - esModule: true, - }, - }, - }, - { - test: /\.css$/, - loader: [ - MiniCssExtractPlugin.loader, - { - loader: "css-loader", - options: { - sourceMap: options.buildType !== "prod", - }, - }, - ], - }, - { - test: /\.s(c|a)ss$/, - loader: [ - MiniCssExtractPlugin.loader, - { - loader: "css-loader", - options: { - sourceMap: options.buildType !== "prod", - }, - }, - { - loader: "sass-loader", - options: { - sourceMap: options.buildType !== "prod", - }, - }, - ], - }, - { - test: /\.html$/, - loader: "html-loader", - }, - { - test: /\.(svg)$/, - use: { - loader: "svg-inline-loader", - options: {}, - }, - }, - ], - }, - output: { - path: buildPath, - filename: "[name]" + (isProductionBuild ? ".min" : "") + ".js", - library: { - root: options.libraryName, - amd: '[dashedname]', - commonjs: '[dashedname]', - }, - libraryTarget: "umd", - globalObject: 'this', - umdNamedDefine: true, - }, - plugins: [ - new webpack.DefinePlugin({ - "process.env.ENVIRONMENT": JSON.stringify(options.buildType), - "process.env.VERSION": JSON.stringify(packageJson.version), - "process.env.RELEASE_DATE": JSON.stringify(new Date().toISOString().slice(0, 10)), - }), - new MiniCssExtractPlugin({ - filename: isProductionBuild ? "[rc-name].min.css" : "[rc-name].css", - }), - new VueLoaderPlugin(), - new webpack.WatchIgnorePlugin([/svgbundle\.html/]), - new webpack.BannerPlugin({ - banner: banner, - }), - new RemoveCoreFromName(), - new FixStyleOnlyEntriesPlugin(), - new DashedNamePlugin(), - new CamelCaseNamePlugin() - ], - }; - - if (!!options.platform) { - config.plugins.unshift(new webpack.ProgressPlugin(percentage_handler)); - config.entry = { - [packageName]: path.resolve( - __dirname, - "../src/entries/" + options.platform + ".ts" - ), - }; - } - - if (isProductionBuild) { - if (!!options.platform) { - config.plugins.push( - new GenerateJsonPlugin( - /*buildPath +*/ "package.json", - packageJson, - undefined, - 2 - ) - ); - } - } else { - config.devtool = "source-map"; - config.plugins = config.plugins.concat([ - new webpack.LoaderOptionsPlugin({ debug: true }), - ]); - } - - return config; -}; \ No newline at end of file diff --git a/devops-accessibility-tests.yml b/devops-accessibility-tests.yml index 3671f9de57..510a963b3b 100644 --- a/devops-accessibility-tests.yml +++ b/devops-accessibility-tests.yml @@ -3,396 +3,343 @@ # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - trigger: batch: true branches: exclude: - - master + - master tags: exclude: - v*.*.* pool: - vmImage: 'windows-latest' + vmImage: "windows-latest" jobs: -- job: Knockout - steps: - - checkout: self - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_knockout_prod - displayName: 'build prod' - - - script: | - npm run accessibility-tests:ci:knockout - displayName: 'Accessibility Tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Knockout_AXE' - OverWrite: true - condition: always() - displayName: 'copy accessibility artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Knockout_AXE/' - ArtifactName: 'Library_Knockout_AXE' - publishLocation: 'Container' - condition: always() - displayName: 'publish accessibility artifacts' - -- job: React - steps: - - checkout: self - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - powershell: | - npm run build_react_prod - npm run build_core - npm run build_i18n - npm run build-plugins - npm run build_react_ui - displayName: 'build prod' - - - script: | - npm run accessibility-tests:ci:react - displayName: 'Accessibility Tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_React_AXE' - OverWrite: true - condition: always() - displayName: 'copy accessibility artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_React_AXE/' - ArtifactName: 'Library_React_AXE' - publishLocation: 'Container' - condition: always() - displayName: 'publish accessibility artifacts' - -- job: Vue - steps: - - checkout: self - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_vue_prod - displayName: 'build prod' - - - script: | - npm run accessibility-tests:ci:vue - displayName: 'Accessibility Tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Vue_AXE' - OverWrite: true - condition: always() - displayName: 'copy accessibility artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Vue_AXE/' - ArtifactName: 'Library_Vue_AXE' - publishLocation: 'Container' - condition: always() - displayName: 'publish accessibility artifacts' - -- job: Angular - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install root' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - powershell: | - npm run build_core - npm run build_i18n_dev - npm run build-plugins - displayName: "Build Core" - - - script: | - cd packages/survey-angular-ui - npm install - displayName: "NPM install packages/survey-angular-ui" - - - script: | - cd packages/survey-angular-ui - npm run build - displayName: "Build Angular" - - - script: | - cd packages/survey-angular-ui/example - npm install - displayName: "NPM install examples/angular-ui" - - - script: | - cd packages/survey-angular-ui - npm run build:example - displayName: "Build Angular Example" - - - script: | - npm run accessibility-tests:ci:angular - displayName: "run accessibility tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Angular_AXE' - OverWrite: true - condition: always() - displayName: 'copy accessibility artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Angular_AXE/' - ArtifactName: 'Library_Angular_AXE' - publishLocation: 'Container' - condition: always() - displayName: 'publish accessibility artifacts' - -- job: Vue3 - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install root' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - powershell: | - npm run build_core - npm run build_i18n_dev - npm run build-plugins - displayName: "Build Core" - - - script: | - cd packages/survey-vue3-ui - npm install - displayName: "NPM install packages/survey-vue3-ui" - - - script: | - cd packages/survey-vue3-ui - npm run build - displayName: "Build Vue3" - - - script: | - cd packages/survey-vue3-ui/example - npm install - displayName: "NPM install Vue3 example" - - - script: | - cd packages/survey-vue3-ui/example - npm run build - displayName: "Build Vue3 Example" - - - script: | - npm run accessibility-tests:ci:vue3 - displayName: "run accessibility tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Vue3_AXE' - OverWrite: true - condition: always() - displayName: 'copy accessibility artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Vue3_AXE/' - ArtifactName: 'Library_Vue3_AXE' - publishLocation: 'Container' - condition: always() - displayName: 'publish accessibility artifacts' \ No newline at end of file + - job: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npm run lint + displayName: "run lint command" + + - script: | + cd packages/survey-core + npm install + displayName: "NPM install packages/survey-core" + + - script: | + cd packages/survey-core + npm run build:all + displayName: "Build core" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/build/survey-core + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/build/survey-core" + ArtifactName: "SurveyJSLibraryBuildCore-AT-$(Build.BuildId)" + publishLocation: "Container" + + - job: React + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-AT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-AT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-react-ui + npm install + displayName: "NPM install packages/survey-react-ui" + + - script: | + cd packages/survey-react-ui + npm run build + displayName: "Build React" + + - script: | + cd packages/survey-react-ui + npm run accessibility-tests:ci + displayName: "run accessibility tests" + + - job: Angular + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-AT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-AT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-angular-ui + npm install + displayName: "NPM install packages/survey-angular-ui" + + - script: | + cd packages/survey-angular-ui + npm run build + displayName: "Build Angular" + + - script: | + cd packages/survey-angular-ui/example + npm install + displayName: "NPM install examples/angular-ui" + + - script: | + cd packages/survey-angular-ui + npm run build:example:prod + displayName: "Build Angular Example" + + - script: | + cd packages/survey-angular-ui + npm run accessibility-tests:ci + displayName: "run accessibility tests" + + - job: Vue3 + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-AT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-AT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-vue3-ui + npm install + displayName: "NPM install packages/survey-vue3-ui" + + - script: | + cd packages/survey-vue3-ui + npm run build + displayName: "Build Vue3" + + - script: | + cd packages/survey-vue3-ui/example + npm install + displayName: "NPM install examples/angular-ui" + + - script: | + cd packages/survey-vue3-ui/example + npm run build + displayName: "Build Vue3 Example" + + - script: | + cd packages/survey-vue3-ui + npm run accessibility-tests:ci + displayName: "run accessibility tests" + + - job: SurveyUI_and_CSSFrameworks + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPM + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + workingDir: $(Build.SourcesDirectory) + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-AT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-AT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-js-ui + npm install + displayName: "NPM install packages/survey-js-ui" + + - script: | + cd packages/survey-js-ui + npm run build + displayName: "Build UI" + + - script: | + cd packages/survey-js-ui + npm run accessibility-tests:ci + displayName: "run accessibility tests" diff --git a/devops-pull-requests-parallel-jobs.yml b/devops-pull-requests-parallel-jobs.yml index d156e30c6e..78b3d87d88 100644 --- a/devops-pull-requests-parallel-jobs.yml +++ b/devops-pull-requests-parallel-jobs.yml @@ -16,409 +16,374 @@ pool: vmImage: "ubuntu-latest" jobs: - -- job: Knockout - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_core - npm run build_knockout_prod - displayName: "Build Knockout" - - - script: | - npm run test:postcss - displayName: "check postcss compatibility" - - - script: | - npm run testsingle - displayName: "run unit tests" - - - script: | - npm run lint - displayName: "eslint check" - - - script: | - npm run test:knockout:single - displayName: "run markup tests" - - - bash: | - npm run testcafe:ko - displayName: "run functional tests" - -- job: React - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_react_prod - npm run build_core - npm run build_i18n - npm run build-plugins - npm run build_react_ui - displayName: "Build React" - - - script: | - npm run test:react:single - displayName: "run markup tests" - - - bash: | - npm run testcafe:react - displayName: "run functional tests" - -- job: Vue - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_vue_prod - displayName: "Build Vue" - - - script: | - npm run test:vue:single - displayName: "run markup tests" - - - bash: | - npm run testcafe:vue - displayName: "Vue functional tests" - -- job: Angular - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install root' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_core - npm run build_i18n - npm run build-plugins - displayName: "Build Core" - - - script: | - cd packages/survey-angular-ui - npm install - displayName: "NPM install packages/survey-angular-ui" - - - script: | - cd packages/survey-angular-ui - npm run build - displayName: "Build Angular" - - - script: | - cd packages/survey-angular-ui/example - npm install - displayName: "NPM install examples/angular-ui" - - - script: | - cd packages/survey-angular-ui - npm run build:example - displayName: "Build Angular Example" - - - script: | - cd packages/survey-angular-ui - npm run test:single - displayName: "run unit and markup tests" - - - bash: | - npm run testcafe:ci:angular - displayName: "run functional tests" - -- job: Vue3 - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install root' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_core - npm run build_i18n - npm run build-plugins - displayName: "Build Core" - - - script: | - cd packages/survey-vue3-ui - npm install - displayName: "NPM install packages/survey-vue3-ui" - - - script: | - cd packages/survey-vue3-ui - npm run build - displayName: "Build Vue3" - - - script: | - cd packages/survey-vue3-ui/example - npm install - displayName: "NPM install examples/angular-ui" - - - script: | - cd packages/survey-vue3-ui/example - npm run build - displayName: "Build Vue3 Example" - - - script: | - cd packages/survey-vue3-ui - npm run test:single - displayName: "run unit and markup tests" - - - bash: | - npm run testcafe:ci:vue3 - displayName: "run functional tests" - -# - job: JqueryUI -# steps: -# - checkout: self -# persistCredentials: true -# clean: true - -# - task: NodeTool@0 -# inputs: -# versionSpec: "16.x" -# displayName: "Install Node.js" - -# - task: CopyFiles@2 -# inputs: -# SourceFolder: "$(Build.SourcesDirectory)/" -# Contents: "package.json" -# TargetFolder: "$(Build.SourcesDirectory)/Temp/" -# OverWrite: true -# displayName: "Copy package.json for cache key" -# - task: Cache@2 -# inputs: -# key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' -# path: $(Build.SourcesDirectory)/node_modules -# cacheHitVar: NPM_CACHE_RESTORED -# displayName: Cache NPM - -# - task: Npm@1 -# displayName: 'NPM install' -# inputs: -# command: install -# verbose: false -# workingDir: $(Build.SourcesDirectory) -# condition: ne(variables.NPM_CACHE_RESTORED, 'true') - -# - script: | -# npm run build_core -# npm run build_i18n -# npm run build-plugins -# displayName: "Build Core" - -# - script: | -# npm run build_jquery_ui_prod -# displayName: "Build jquery-ui" - -# - script: | -# npm run testcafe:jquery-ui:ci -# displayName: "run functional tests" - -- job: SurveyUI_and_CSSFrameworks - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - workingDir: $(Build.SourcesDirectory) - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_core - npm run build_i18n - npm run build-plugins - displayName: "Build Core" - - - script: | - npm run build_js_ui_prod - displayName: "Build survey-js-ui" - - - bash: | - npm run testcafe:survey-js-ui:ci - displayName: "run functional tests" + - job: Core + steps: + - checkout: self + persistCredentials: true + clean: true + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npm run lint + displayName: "run lint command" + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - script: | + cd packages/survey-core + npm install + displayName: "NPM install packages/survey-core" + + - script: | + cd packages/survey-core + npm run build:all + displayName: "Build core" + + - script: | + cd packages/survey-core + npm test + displayName: "run unit test" + + - script: | + cd packages/survey-core + npm run test:postcss + displayName: "check postcss compatibility" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/build/survey-core + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/build/survey-core" + ArtifactName: "SurveyJSLibraryBuildCore-$(Build.BuildId)" + publishLocation: "Container" + + - job: React + dependsOn: Core + steps: + - checkout: self + persistCredentials: true + clean: true + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-react-ui + npm install + displayName: "NPM install packages/survey-react-ui" + + - script: | + cd packages/survey-react-ui + npm run build + displayName: "Build React" + + - script: | + cd packages/survey-react-ui + npm run test + displayName: "run markup tests" + + - bash: | + cd packages/survey-react-ui + npm run testcafe:ci + displayName: "run functional tests" + + - job: Angular + dependsOn: Core + steps: + - checkout: self + persistCredentials: true + clean: true + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-angular-ui + npm install + displayName: "NPM install packages/survey-angular-ui" + + - script: | + cd packages/survey-angular-ui + npm run build + displayName: "Build Angular" + + - script: | + cd packages/survey-angular-ui/example + npm install + displayName: "NPM install examples/angular-ui" + + - script: | + cd packages/survey-angular-ui + npm run build:example:prod + displayName: "Build Angular Example" + + - script: | + cd packages/survey-angular-ui + npm run test + displayName: "run unit and markup tests" + + - bash: | + cd packages/survey-angular-ui + npm run testcafe:ci + displayName: "run functional tests" + + - job: Vue3 + dependsOn: Core + steps: + - checkout: self + persistCredentials: true + clean: true + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-vue3-ui + npm install + displayName: "NPM install packages/survey-vue3-ui" + + - script: | + cd packages/survey-vue3-ui + npm run build + displayName: "Build Vue3" + + - script: | + cd packages/survey-vue3-ui/example + npm install + displayName: "NPM install examples/angular-ui" + + - script: | + cd packages/survey-vue3-ui/example + npm run build + displayName: "Build Vue3 Example" + + - script: | + cd packages/survey-vue3-ui + npm run test + displayName: "run unit and markup tests" + + - bash: | + cd packages/survey-vue3-ui + npm run testcafe:ci + displayName: "run functional tests" + + - job: SurveyUI_and_CSSFrameworks + dependsOn: Core + steps: + - checkout: self + persistCredentials: true + clean: true + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPM + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + workingDir: $(Build.SourcesDirectory) + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-js-ui + npm install + displayName: "NPM install packages/survey-js-ui" + + - script: | + cd packages/survey-js-ui + npm run build + displayName: "Build UI" + + # - script: | + # cd packages/survey-js-ui + # npm run test + # displayName: "run markup tests" + + - bash: | + cd packages/survey-js-ui + npm run testcafe:ci + displayName: "run functional tests" diff --git a/devops-visual-regression-tests.yml b/devops-visual-regression-tests.yml index 0c3b0fa206..98f6eb5014 100644 --- a/devops-visual-regression-tests.yml +++ b/devops-visual-regression-tests.yml @@ -3,534 +3,410 @@ # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - trigger: batch: true branches: exclude: - - master + - master tags: exclude: - v*.*.* pool: - vmImage: 'windows-latest' + vmImage: "windows-latest" jobs: -- job: Knockout - steps: - - checkout: self - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_knockout_prod - displayName: 'build prod' - - - script: | - npm run visual-regression-tests:ci:knockout - displayName: 'Visual Regression Tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Knockout_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Knockout_VRT/' - ArtifactName: 'Library_Knockout_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt artifacts' - -- job: React - steps: - - checkout: self - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - powershell: | - npm run build_react_prod - npm run build_core - npm run build_i18n - npm run build-plugins - npm run build_react_ui - displayName: 'build prod' - - - script: | - npm run visual-regression-tests:ci:react - displayName: 'Visual Regression Tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_React_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_React_VRT/' - ArtifactName: 'Library_React_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt artifacts' - -- job: Vue - steps: - - checkout: self - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_vue_prod - displayName: 'build prod' - - - script: | - npm run visual-regression-tests:ci:vue - displayName: 'Visual Regression Tests' - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Vue_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Vue_VRT/' - ArtifactName: 'Library_Vue_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt artifacts' - -- job: Angular - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install root' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - powershell: | - npm run build_core - npm run build_i18n_dev - npm run build-plugins - displayName: "Build Core" - - - script: | - cd packages/survey-angular-ui - npm install - displayName: "NPM install packages/survey-angular-ui" - - - script: | - cd packages/survey-angular-ui - npm run build - displayName: "Build Angular" - - - script: | - cd packages/survey-angular-ui/example - npm install - displayName: "NPM install examples/angular-ui" - - - script: | - cd packages/survey-angular-ui - npm run build:example - displayName: "Build Angular Example" - - - script: | - npm run visual-regression-tests:ci:angular - displayName: "run vrt tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Angular_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Angular_VRT/' - ArtifactName: 'Library_Angular_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt artifacts' - -- job: Vue3 - steps: - - checkout: self - persistCredentials: true - clean: true - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: "16.x" - displayName: "Install Node.js" - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPMs - - - task: Npm@1 - displayName: 'NPM install root' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - powershell: | - npm run build_core - npm run build_i18n_dev - npm run build-plugins - displayName: "Build Core" - - - script: | - cd packages/survey-vue3-ui - npm install - displayName: "NPM install packages/survey-vue3-ui" - - - script: | - cd packages/survey-vue3-ui - npm run build - displayName: "Build Vue3" - - - script: | - cd packages/survey-vue3-ui/example - npm install - displayName: "NPM install packages/survey-vue3-ui/example" - - - script: | - cd packages/survey-vue3-ui/example - npm run build - displayName: "Build Vue3 Example" - - - script: | - npm run visual-regression-tests:ci:vue3 - displayName: "run vrt tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_Vue3_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_Vue3_VRT/' - ArtifactName: 'Library_Vue3_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt artifacts' - -# - job: JqueryUI -# steps: -# - checkout: self - -# - task: PowerShell@2 -# displayName: 'update Google Chrome to latest' -# inputs: -# targetType: 'inline' -# script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - -# - task: NodeTool@0 -# inputs: -# versionSpec: '16.x' -# displayName: 'Install Node.js' - -# - task: CopyFiles@2 -# inputs: -# SourceFolder: "$(Build.SourcesDirectory)/" -# Contents: "package.json" -# TargetFolder: "$(Build.SourcesDirectory)/Temp/" -# OverWrite: true -# displayName: "Copy package.json for cache key" -# - task: Cache@2 -# inputs: -# key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' -# path: $(Build.SourcesDirectory)/node_modules -# cacheHitVar: NPM_CACHE_RESTORED -# displayName: Cache NPM - -# - task: Npm@1 -# displayName: 'NPM install' -# inputs: -# command: install -# verbose: false -# condition: ne(variables.NPM_CACHE_RESTORED, 'true') - -# - script: | -# npm run build_core -# npm run build_i18n -# npm run build-plugins -# displayName: "Build Core" - -# - script: | -# npm run build_jquery_ui_prod -# displayName: "Build jquery-ui" - -# - script: | -# npm run vrt:jquery-ui:ci -# displayName: "Visual Regression Tests" - -# - task: CopyFiles@2 -# inputs: -# SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' -# Contents: '**' -# TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_JqueryUI_VRT' -# OverWrite: true -# condition: always() -# displayName: 'copy vrt artifacts' - -# - task: PublishBuildArtifacts@1 -# inputs: -# PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_JqueryUI_VRT/' -# ArtifactName: 'Library_JqueryUI_VRT' -# publishLocation: 'Container' -# condition: always() -# displayName: 'publish vrt artifacts' - -- job: SurveyUI_and_CSSFrameworks - steps: - - checkout: self - - - task: PowerShell@2 - displayName: 'update Google Chrome to latest' - inputs: - targetType: 'inline' - script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer' - - - task: NodeTool@0 - inputs: - versionSpec: '16.x' - displayName: 'Install Node.js' - - - task: CopyFiles@2 - inputs: - SourceFolder: "$(Build.SourcesDirectory)/" - Contents: "package.json" - TargetFolder: "$(Build.SourcesDirectory)/Temp/" - OverWrite: true - displayName: "Copy package.json for cache key" - - task: Cache@2 - inputs: - key: 'npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json' - path: $(Build.SourcesDirectory)/node_modules - cacheHitVar: NPM_CACHE_RESTORED - displayName: Cache NPM - - - task: Npm@1 - displayName: 'NPM install' - inputs: - command: install - verbose: false - condition: ne(variables.NPM_CACHE_RESTORED, 'true') - - - - script: | - npx puppeteer browsers install chrome - displayName: "install chrome" - - - script: | - npm run build_core - npm run build_i18n - npm run build-plugins - displayName: "Build Core" - - - script: | - npm run build_js_ui_prod - displayName: "Build survey-js-ui" - - - script: | - npm run vrt:survey-js-ui:ci - displayName: "Visual Regression Tests" - - - task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)/visualRegressionTests' - Contents: '**' - TargetFolder: '$(Build.ArtifactStagingDirectory)/Library_SurveyUI_VRT' - OverWrite: true - condition: always() - displayName: 'copy vrt artifacts' - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)/Library_SurveyUI_VRT/' - ArtifactName: 'Library_JqueryUI_VRT' - publishLocation: 'Container' - condition: always() - displayName: 'publish vrt artifacts' + - job: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npm run lint + displayName: "run lint command" + + - script: | + cd packages/survey-core + npm install + displayName: "NPM install packages/survey-core" + + - script: | + cd packages/survey-core + npm run build:all + displayName: "Build core" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + targetFolder: $(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/build/survey-core + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/SurveyJSLibraryBuild/build/survey-core" + ArtifactName: "SurveyJSLibraryBuildCore-VRT-$(Build.BuildId)" + publishLocation: "Container" + + - job: React + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-VRT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-VRT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-react-ui + npm install + displayName: "NPM install packages/survey-react-ui" + + - script: | + cd packages/survey-react-ui + npm run build + displayName: "Build React" + + - script: | + cd packages/survey-react-ui + npm run vrt:ci + displayName: "Visual Regression Tests" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/visualRegressionTests" + Contents: "**" + TargetFolder: "$(Build.ArtifactStagingDirectory)/Library_React_VRT" + OverWrite: true + condition: always() + displayName: "copy vrt artifacts" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/Library_React_VRT/" + ArtifactName: "Library_React_VRT" + publishLocation: "Container" + condition: always() + displayName: "publish vrt artifacts" + + - job: Angular + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-VRT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-VRT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-angular-ui + npm install + displayName: "NPM install packages/survey-angular-ui" + + - script: | + cd packages/survey-angular-ui + npm run build + displayName: "Build Angular" + + - script: | + cd packages/survey-angular-ui/example + npm install + displayName: "NPM install examples/angular-ui" + + - script: | + cd packages/survey-angular-ui + npm run build:example:prod + displayName: "Build Angular Example" + + - script: | + cd packages/survey-angular-ui + npm run vrt:ci + displayName: "Visual Regression Tests" + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/visualRegressionTests" + Contents: "**" + TargetFolder: "$(Build.ArtifactStagingDirectory)/Library_Angular_VRT" + OverWrite: true + condition: always() + displayName: "copy vrt artifacts" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/Library_Angular_VRT/" + ArtifactName: "Library_Angular_VRT" + publishLocation: "Container" + condition: always() + displayName: "publish vrt artifacts" + + - job: Vue3 + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPMs + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-VRT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-VRT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-vue3-ui + npm install + displayName: "NPM install packages/survey-vue3-ui" + + - script: | + cd packages/survey-vue3-ui + npm run build + displayName: "Build Vue3" + + - script: | + cd packages/survey-vue3-ui/example + npm install + displayName: "NPM install examples/angular-ui" + + - script: | + cd packages/survey-vue3-ui/example + npm run build + displayName: "Build Vue3 Example" + + - script: | + cd packages/survey-vue3-ui + npm run vrt:ci + displayName: "Visual Regression Tests" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/visualRegressionTests" + Contents: "**" + TargetFolder: "$(Build.ArtifactStagingDirectory)/Library_Vue_VRT" + OverWrite: true + condition: always() + displayName: "copy vrt artifacts" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/Library_Vue_VRT/" + ArtifactName: "Library_Vue_VRT" + publishLocation: "Container" + condition: always() + displayName: "publish vrt artifacts" + + - job: SurveyUI_and_CSSFrameworks + dependsOn: Core + steps: + - checkout: self + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Install Node.js" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/" + Contents: "package.json" + TargetFolder: "$(Build.SourcesDirectory)/Temp/" + OverWrite: true + displayName: "Copy package.json for cache key" + - task: Cache@2 + inputs: + key: "npm-cache-library | $(Build.SourcesDirectory)/Temp/package.json" + path: $(Build.SourcesDirectory)/node_modules + cacheHitVar: NPM_CACHE_RESTORED + displayName: Cache NPM + + - task: Npm@1 + displayName: "NPM install root" + inputs: + command: install + verbose: false + workingDir: $(Build.SourcesDirectory) + condition: ne(variables.NPM_CACHE_RESTORED, 'true') + + - script: | + npx puppeteer browsers install chrome + displayName: "install chrome" + + - task: DownloadBuildArtifacts@0 + inputs: + buildType: "current" + downloadType: "single" + artifactName: "SurveyJSLibraryBuildCore-VRT-$(Build.BuildId)" + downloadPath: "$(System.ArtifactsDirectory)" + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.ArtifactsDirectory)/SurveyJSLibraryBuildCore-VRT-$(Build.BuildId) + TargetFolder: "$(Build.SourcesDirectory)/packages/survey-core/build" + + - script: | + cd packages/survey-js-ui + npm install + displayName: "NPM install packages/survey-js-ui" + + - script: | + cd packages/survey-js-ui + npm run build + displayName: "Build UI" + + - script: | + cd packages/survey-js-ui + npm run vrt:ci + displayName: "Visual Regression Tests" + + - task: CopyFiles@2 + inputs: + SourceFolder: "$(Build.SourcesDirectory)/visualRegressionTests" + Contents: "**" + TargetFolder: "$(Build.ArtifactStagingDirectory)/Library_SurveyUI_VRT" + OverWrite: true + condition: always() + displayName: "copy vrt artifacts" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: "$(Build.ArtifactStagingDirectory)/Library_SurveyUI_VRT/" + ArtifactName: "Library_JqueryUI_VRT" + publishLocation: "Container" + condition: always() + displayName: "publish vrt artifacts" diff --git a/examples_test/bootstrap/jquery-ui.html b/examples_test/bootstrap/jquery-ui.html deleted file mode 100644 index bed7bc6ffa..0000000000 --- a/examples_test/bootstrap/jquery-ui.html +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples_test/bootstrap/knockout.html b/examples_test/bootstrap/knockout.html deleted file mode 100644 index 7141b8b343..0000000000 --- a/examples_test/bootstrap/knockout.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples_test/bootstrap/react.html b/examples_test/bootstrap/react.html deleted file mode 100644 index a4b8f59efd..0000000000 --- a/examples_test/bootstrap/react.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples_test/bootstrap/survey-js-ui.html b/examples_test/bootstrap/survey-js-ui.html deleted file mode 100644 index 46b54901b0..0000000000 --- a/examples_test/bootstrap/survey-js-ui.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples_test/bootstrap/vue.html b/examples_test/bootstrap/vue.html deleted file mode 100644 index 931270f768..0000000000 --- a/examples_test/bootstrap/vue.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/examples_test/default/index.js b/examples_test/default/index.js deleted file mode 100644 index aa3989b88f..0000000000 --- a/examples_test/default/index.js +++ /dev/null @@ -1,6 +0,0 @@ -function init() { - //disable observer for survey to prevent loop limited exceptions - Survey.defaultStandardCss.variables.mobileWidth = undefined; - Survey.StylesManager.applyTheme("default"); -} -document.addEventListener("DOMContentLoaded", init); \ No newline at end of file diff --git a/examples_test/default/jquery-ui.html b/examples_test/default/jquery-ui.html deleted file mode 100644 index dfdf3cc80b..0000000000 --- a/examples_test/default/jquery-ui.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples_test/default/knockout.html b/examples_test/default/knockout.html deleted file mode 100644 index b396339592..0000000000 --- a/examples_test/default/knockout.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples_test/default/react.html b/examples_test/default/react.html deleted file mode 100644 index edeaa7845c..0000000000 --- a/examples_test/default/react.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/examples_test/default/survey-js-ui.html b/examples_test/default/survey-js-ui.html deleted file mode 100644 index fbd88a6542..0000000000 --- a/examples_test/default/survey-js-ui.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples_test/default/vue.html b/examples_test/default/vue.html deleted file mode 100644 index a50a54d369..0000000000 --- a/examples_test/default/vue.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - -extends React.Component
{
componentDidUpdate(prevProps: any, prevState: any) {
this.makeBaseElementsReact();
const stateElements = this.getStateElements();
- this.disableStateElementsRerenderEvent((this.prevStateElements ?? []).filter(el => !stateElements.includes(el)));
+ this.disableStateElementsRerenderEvent((this.prevStateElements ?? []).filter(el => !stateElements.find(stateElement => stateElement == el)));
this.prevStateElements = [];
this.getStateElements().forEach((el) => {
el.afterRerender();
diff --git a/packages/survey-react-ui/testCafe/countriesMock.json b/packages/survey-react-ui/testCafe/countriesMock.json
new file mode 100644
index 0000000000..44a0728446
--- /dev/null
+++ b/packages/survey-react-ui/testCafe/countriesMock.json
@@ -0,0 +1,18 @@
+{
+ "RestResponse": {
+ "result": [
+ {
+ "alpha2_code": "US",
+ "name": "United States"
+ },
+ {
+ "alpha2_code": "CU",
+ "name": "Cuba"
+ },
+ {
+ "alpha2_code": "RO",
+ "name": "Romania"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/packages/survey-react-ui/testCafe/resources/big_Dashka.jpg b/packages/survey-react-ui/testCafe/resources/big_Dashka.jpg
new file mode 100644
index 0000000000..697c6bc537
Binary files /dev/null and b/packages/survey-react-ui/testCafe/resources/big_Dashka.jpg differ
diff --git a/packages/survey-react-ui/testCafe/resources/small_Dashka.jpg b/packages/survey-react-ui/testCafe/resources/small_Dashka.jpg
new file mode 100644
index 0000000000..2dbeb92393
Binary files /dev/null and b/packages/survey-react-ui/testCafe/resources/small_Dashka.jpg differ
diff --git a/packages/survey-react-ui/testCafe/resources/stub.txt b/packages/survey-react-ui/testCafe/resources/stub.txt
new file mode 100644
index 0000000000..26fefde539
--- /dev/null
+++ b/packages/survey-react-ui/testCafe/resources/stub.txt
@@ -0,0 +1 @@
+Wombat
\ No newline at end of file
diff --git a/tests/markup/question_react_tests.ts b/packages/survey-react-ui/tests/markup.ts
similarity index 68%
rename from tests/markup/question_react_tests.ts
rename to packages/survey-react-ui/tests/markup.ts
index ac94f45071..a83c80dd43 100644
--- a/tests/markup/question_react_tests.ts
+++ b/packages/survey-react-ui/tests/markup.ts
@@ -1,8 +1,9 @@
-import { testQuestionMarkup } from "./helper";
-import { markupTests } from "./etalon";
+import { testQuestionMarkup } from "../../../tests/markup/helper";
+import { markupTests } from "../../../tests/markup/etalon";
// eslint-disable-next-line surveyjs/no-imports-from-entries
-import { Model as ReactModel, Survey as SurveyReact } from "../../src/entries/react";
+import { Survey as SurveyReact } from "../entries/index";
+import { Model } from "survey-core";
import { act } from "react-dom/test-utils";
import React from "react";
import ReactDOM from "react-dom";
@@ -10,7 +11,7 @@ import ReactDOM from "react-dom";
var platformDescriptor = {
name: "React",
survey: null,
- surveyFactory: (json) => new ReactModel(json),
+ surveyFactory: (json) => new Model(json),
render: (survey, element) => {
var component = React.createElement(SurveyReact, { model: survey }, null);
act(() => {
@@ -21,7 +22,7 @@ var platformDescriptor = {
});
},
getStrFromHtml: (snapshot) => {
- return require("./snapshots/" + snapshot + ".snap.html");
+ return require("../../../tests/markup/snapshots/" + snapshot + ".snap.html");
},
finish: (element) => {
ReactDOM.unmountComponentAtNode(element);
diff --git a/packages/survey-react-ui/tsconfig.json b/packages/survey-react-ui/tsconfig.json
index 40dd2b2552..4b319224fb 100644
--- a/packages/survey-react-ui/tsconfig.json
+++ b/packages/survey-react-ui/tsconfig.json
@@ -14,7 +14,7 @@
"experimentalDecorators": true,
"importHelpers": true,
"moduleResolution": "node",
- "jsx": "react-jsx",
+ "jsx": "react",
"baseUrl": ".",
"declaration": true,
"declarationDir": "build/typings/"
diff --git a/packages/survey-react-ui/tsconfig.tests.json b/packages/survey-react-ui/tsconfig.tests.json
new file mode 100644
index 0000000000..3eefeee6fa
--- /dev/null
+++ b/packages/survey-react-ui/tsconfig.tests.json
@@ -0,0 +1,16 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "baseUrl": ".",
+ "paths": {
+ "survey-core": [
+ "./node_modules/survey-core"
+ ],
+ },
+ "declaration": false,
+ "declarationDir": null,
+ },
+ "include": [
+ "./tests/markup.ts",
+ ]
+}
\ No newline at end of file
diff --git a/packages/survey-react-ui/webpack.config.js b/packages/survey-react-ui/webpack.config.js
index ecb0ba6ebf..70285d73e8 100644
--- a/packages/survey-react-ui/webpack.config.js
+++ b/packages/survey-react-ui/webpack.config.js
@@ -35,7 +35,7 @@ const buildPlatformJson = {
typings: "./typings/entries/index.d.ts",
"peerDependencies": {
- "survey-core": "*",
+ "survey-core": packageJson.version,
"react": "^16.5.0 || ^17.0.1 || ^18.2.0",
"react-dom": "^16.5.0 || ^17.0.1 || ^18.2.0"
}
@@ -106,11 +106,6 @@ module.exports = function (options) {
}
]
},
- // {
- // test: /\.html$/,
- // exclude: [/node_modules/, require.resolve('./index.html')],
- // loader: "html-loader"
- // },
{
test: /\.(svg|png)$/,
use: {
@@ -156,7 +151,6 @@ module.exports = function (options) {
new DashedNamePlugin(),
new webpack.ProgressPlugin(percentage_handler),
new webpack.DefinePlugin({
- "process.env.ENVIRONMENT": JSON.stringify(options.buildType),
"process.env.VERSION": JSON.stringify(packageJson.version)
}),
new MiniCssExtractPlugin({
@@ -174,20 +168,20 @@ module.exports = function (options) {
config.devtool = "source-map";
config.plugins = config.plugins.concat([
new webpack.LoaderOptionsPlugin({ debug: true }),
- // new HtmlWebpackPlugin({
- // filename: "index.html",
- // inject: "body",
- // template: "index.html"
- // }),
+ new HtmlWebpackPlugin({
+ filename: "index.html",
+ inject: "body",
+ template: "index.html"
+ }),
]);
- // config.devServer = {
- // static: {
- // directory: path.join(__dirname, '.'),
- // },
- // //host: "0.0.0.0",
- // compress: false,
- // port: 8082
- // };
+ config.devServer = {
+ static: {
+ directory: path.join(__dirname, '.'),
+ },
+ //host: "0.0.0.0",
+ compress: false,
+ port: 7777
+ };
}
return config;
diff --git a/packages/survey-vue3-ui/CHANGELOG.md b/packages/survey-vue3-ui/CHANGELOG.md
index c48b3ebfa0..83af6ffd76 100644
--- a/packages/survey-vue3-ui/CHANGELOG.md
+++ b/packages/survey-vue3-ui/CHANGELOG.md
@@ -2,6 +2,8 @@
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
+## [1.12.17](https://github.com/surveyjs/survey-library/compare/v1.12.16...v1.12.17) (2024-12-30)
+
## [1.12.16](https://github.com/surveyjs/survey-library/compare/v1.12.15...v1.12.16) (2024-12-24)
## [1.12.15](https://github.com/surveyjs/survey-library/compare/v1.12.14...v1.12.15) (2024-12-17)
diff --git a/packages/survey-vue3-ui/example/package.json b/packages/survey-vue3-ui/example/package.json
index 4c8ecd5ce1..de7b64e36b 100644
--- a/packages/survey-vue3-ui/example/package.json
+++ b/packages/survey-vue3-ui/example/package.json
@@ -11,10 +11,9 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"dependencies": {
- "bootstrap": "^3.3.7",
"showdown": "^1.6.4",
- "survey-core": "../../../build/survey-core",
- "survey-vue3-ui": "../../../build/survey-vue3-ui",
+ "survey-core": "../../survey-core/build",
+ "survey-vue3-ui": "../build",
"surveyjs-widgets": "^1.9.40",
"vue": "3.4.19",
"vue-router": "^4.2.2"
diff --git a/packages/survey-vue3-ui/example/src/components/test/Test.vue b/packages/survey-vue3-ui/example/src/components/test/Test.vue
index 8b7b5de005..f39b637521 100644
--- a/packages/survey-vue3-ui/example/src/components/test/Test.vue
+++ b/packages/survey-vue3-ui/example/src/components/test/Test.vue
@@ -1,16 +1,11 @@