diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2004851 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,10 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + ci: + uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5fe844e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: ~> 1.0 - -env: - global: - - COMPOSER_ROOT_VERSION="4.x-dev" - - REQUIRE_RECIPE="4.x-dev" - -import: - - silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-fixed.yml diff --git a/client/src/components/HistoryViewer/HistoryViewer.js b/client/src/components/HistoryViewer/HistoryViewer.js index 15caac4..bdde2e3 100644 --- a/client/src/components/HistoryViewer/HistoryViewer.js +++ b/client/src/components/HistoryViewer/HistoryViewer.js @@ -235,14 +235,14 @@ class HistoryViewer extends Component { // Currently previewMode === MODE_VERSION is disabled as it displays incorrect relations. schemaVersionReplacements[':date'] = currentVersion.lastEdited; - + const schemaCompareReplacements = { ':id': recordId, ':class': recordClass, ':from': versionFrom.version || 0, ':to': versionTo.version || 0, }; - + const schemaSearch = compare ? /:id|:class|:from|:to/g : /:id|:class|:version|:date/g; const schemaReplacements = compare ? schemaCompareReplacements : schemaVersionReplacements; diff --git a/client/src/legacy/VersionedEditForm/VersionedEditForm.js b/client/src/legacy/VersionedEditForm/VersionedEditForm.js index 7497666..f386bef 100644 --- a/client/src/legacy/VersionedEditForm/VersionedEditForm.js +++ b/client/src/legacy/VersionedEditForm/VersionedEditForm.js @@ -20,6 +20,7 @@ jQuery.entwine('ss', ($) => { 'Are you sure you want to remove your record from the published site?\n\nThis record will still be available in the CMS as draft.' ); + // eslint-disable-next-line no-alert if (confirm(message)) { // Add a loading indicator and continue this.parents('form:first').addClass('loading'); @@ -49,6 +50,7 @@ jQuery.entwine('ss', ($) => { 'Warning: This record will be unpublished before being sent to the archive.\n\nAre you sure you want to proceed?' ); + // eslint-disable-next-line no-alert if (confirm(message)) { // Add a loading indicator and continue this.parents('form:first').addClass('loading'); diff --git a/composer.json b/composer.json index 75921e7..c2c1568 100755 --- a/composer.json +++ b/composer.json @@ -20,16 +20,13 @@ } ], "require": { - "silverstripe/framework": "^4", "silverstripe/graphql": "^4 | >= 3.5.1", - "silverstripe/versioned-snapshots": "1.x-dev", - "silverstripe/versioned-admin": "^1", - "silverstripe/admin": "^1.7", - "silverstripe/vendor-plugin": "^1" + "silverstripe/versioned-snapshots": "^1", + "silverstripe/versioned-admin": "^1.7", + "silverstripe/vendor-plugin": "^1.6" }, "require-dev": { - "silverstripe/versioned": "^1", - "silverstripe/recipe-testing": "^1 || ^2" + "silverstripe/recipe-testing": "^2" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c2f58ad..2fdf2b1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,17 +1,17 @@ - - - - tests/ - - - + + + + src/ - - tests/ - - - + + + tests/ + + + + + tests/ + +