Browse Source

Merge pull request #238 from pressbooks/pba-751-jQueryUpgrade

Fix jQuery deprecation warnings
pull/239/head
Oscar Arzola 4 years ago committed by GitHub
parent
commit
946e503503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 102
      .github/workflows/.pipeline.yml
  2. 68
      .travis.yml
  3. 4
      assets/scripts/routes/common.js
  4. 6
      dist/mix-manifest.json
  5. 2
      dist/scripts/aldine.js
  6. 60
      dist/scripts/aldine.js.LICENSE.txt
  7. 2
      dist/scripts/catalog-admin.js
  8. 24
      dist/scripts/catalog-admin.js.LICENSE.txt
  9. 2
      dist/styles/aldine.css

102
.github/workflows/.pipeline.yml

@ -0,0 +1,102 @@
name: CI workflow
on:
push:
branches: [ dev, main ]
tags:
- '*.*.*'
pull_request:
branches: [ dev ]
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
php: [ 7.3 ]
os: [ ubuntu-18.04 ]
wordpress: [ 5.6.2, 5.7.2 ]
name: Test - PHP ${{ matrix.php }} - WP ${{ matrix.wordpress }}
env:
WP_VERSION: ${{ matrix.wordpress }}
WP_MULTISITE: 1
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: '10'
- name: Install OS dependencies
run: sudo apt-get install libxml2-utils ghostscript poppler-utils
- name: Start required services
run: sudo systemctl start mysql.service
- name: Cache PHP dependencies
uses: actions/cache@v1
with:
path: vendor
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: phpcs, composer:v1
coverage: pcov
- name: Install dependencies
run: |
node -v
npm install
npm run install-build-tools
export PATH="$HOME/.composer/vendor/bin:$PATH"
composer install --no-interaction
composer global require "phpunit/phpunit:7.5.20"
- name: Run Lint
run: composer standards
- name: Install WP tests
run: bash bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wordpress }}
- name: Run Coverage
run: composer require pcov/clobber; vendor/bin/pcov clobber; vendor/bin/phpunit --configuration phpunit.xml --coverage-clover coverage.xml
- name: Run Frontend Tests
run: |
npm run test
- name: Run PHP Tests
run: vendor/bin/phpunit
- name: Upload Coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
- name: Prepare Build
if: startsWith(github.ref, 'refs/tags/')
run: |
export GITHUB_BUILD_PATH=${{github.workspace}}
export GITHUB_REPO_SLUG="$(basename ${{github.workspace}})"
export GITHUB_TAG="$(basename ${{github.ref}})"
echo "File to be created : $GITHUB_BUILD_PATH/$GITHUB_REPO_SLUG-$GITHUB_TAG.zip"
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
mv wp-cli.phar /usr/local/bin/wp
wp package install wp-cli/dist-archive-command
npm run build:production
composer install --no-dev --optimize-autoloader
cd ..
wp dist-archive $GITHUB_REPO_SLUG $GITHUB_BUILD_PATH/$GITHUB_REPO_SLUG-$GITHUB_TAG.zip
cd $GITHUB_BUILD_PATH
ls $GITHUB_BUILD_PATH
- name: Deploy
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files:
${{github.workspace}}/*.zip

68
.travis.yml

@ -1,68 +0,0 @@
dist: bionic
services:
- mysql
language: php
sudo: required
notifications:
email:
on_success: never
on_failure: change
slack:
secure: EN5LZc4Ba3w48Nb9Xdh6WITgUf0qphkb3ZEDxTrBSfaSZuHAOqhQ2dDdfT8ds1vBkGTE80JVGXa2YDNDIyqK8JY1mR3V3MzeZMWLwfspPQj0/t8g/GFzc99M87dIEPZofCvj/CoRVGNG3rghe8TftAcf233rKvTSWtbADOvmfq6v/cedeh4/W1DgkrA5dcmTwpqyoOLzWbSXEMpwUxHfX88UHxNO2+IS9nvVXNf2CJ8C2dltEbRwFfKB20b/jIXvjgrmR9T2Al9M5qWXjpewssEU4hcEP8gPETx1l0VbIqq182ar9I2OKjmIYLuaVvgSp56TnPs+DBPnUOVDQZ3ykdXH8mzzPT9IhChZJEYMz+D0l9Jb6saWhqxzDMJ30fXt67HYgCO6kWfCZOpefwukoOZC7bZtnL98s0qTYHL5nt+h7+522XDAm8B5a0sKzvnV7IF30YlPdt/eHkEQF14954x4yGZO2Q3M0kR6I/roaJ4HQh1P2h0yswyRucIHFgGd4f1QQ64VOpUyJ4rNybVfcAn/zPuXjcjucxmNbyrf7vk8kCgCfF11ejO0aSYzjVjO+jE5Edkur9kmRbwMcc+HOb79eZhPT9ISMo8Bz/QhbbvCOlSDgagGrP3h+Zy17JIYmHJJJojdANjMtu9tf7sUrfTza6+r46Thnuwpxf+kdbM=
branches:
only:
- dev
- hotfix
- "/^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$/"
php:
- 7.3
env:
- TRAVIS_NODE_VERSION="10"
matrix:
allow_failures:
- php: nightly
cache:
apt: true
directories:
- "$HOME/.composer/cache"
- node_modules
- vendor
before_install:
- composer self-update 1.10.17
- source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION
install:
- node -v
- npm install
- composer install -o --prefer-dist --no-interaction
before_script:
- if php -v | grep -q 'Xdebug'; then phpenv config-rm xdebug.ini; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then pecl install pcov; fi
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
script:
- npm run install-build-tools
- npm run test
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.3" ]]; then composer require pcov/clobber; vendor/bin/pcov clobber; vendor/bin/phpunit --configuration phpunit.xml --coverage-clover coverage.xml; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} != "7.3" ]]; then vendor/bin/phpunit --configuration phpunit.xml; fi
- composer standards
after_success:
- bash <(curl -s https://codecov.io/bash)
before_deploy:
- export TRAVIS_PROJECT_SLUG="$(basename $TRAVIS_BUILD_DIR)"
- curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
- chmod +x wp-cli.phar
- sudo mv wp-cli.phar /usr/local/bin/wp
- wp package install wp-cli/dist-archive-command
- npm run build:production
- composer install --no-dev --optimize-autoloader
- cd ../
- wp dist-archive $TRAVIS_PROJECT_SLUG $TRAVIS_BUILD_DIR/$TRAVIS_PROJECT_SLUG-$TRAVIS_TAG.zip
- cd $TRAVIS_BUILD_DIR
deploy:
provider: releases
skip_cleanup: true
api_key: $GITHUB_ACCESS_TOKEN
file: pressbooks-aldine-$TRAVIS_TAG.zip
on:
tags: true
repo: pressbooks/pressbooks-aldine

4
assets/scripts/routes/common.js

@ -20,11 +20,11 @@ export default {
let anchorUponArrival = document.location.hash;
setTimeout( function () {
$( anchorUponArrival ).scrollTo( { duration: 1500 } );
$( anchorUponArrival ).focus();
$( anchorUponArrival ).trigger( 'focus' );
}, 100 );
}
} );
$( '.js-header-nav-toggle' ).click( event => {
$( '.js-header-nav-toggle' ).on( 'click', event => {
event.preventDefault();
$( '.header__nav' ).toggleClass( 'header__nav--active' );
} );

6
dist/mix-manifest.json vendored

@ -1,9 +1,9 @@
{
"/scripts/aldine.js": "/scripts/aldine.js?id=406c85ac4a3597cff962",
"/styles/aldine.css": "/styles/aldine.css?id=834982deb17473a14117",
"/scripts/aldine.js": "/scripts/aldine.js?id=24a75fe45555163733a7",
"/styles/aldine.css": "/styles/aldine.css?id=76e97fa4ea15ad04df17",
"/styles/editor.css": "/styles/editor.css?id=c45cb52a8c16b5642bf6",
"/scripts/call-to-action.js": "/scripts/call-to-action.js?id=14b2ac09b5fc52660522",
"/scripts/catalog-admin.js": "/scripts/catalog-admin.js?id=cd9e3b3256101628f1d9",
"/scripts/catalog-admin.js": "/scripts/catalog-admin.js?id=2eac08aee521dcb38f28",
"/scripts/customizer.js": "/scripts/customizer.js?id=379b2c9a57b903659698",
"/scripts/customizer-toggle.js": "/scripts/customizer-toggle.js?id=21056ebdee6d334bd081",
"/scripts/page-section.js": "/scripts/page-section.js?id=b62a3319a10d83a36aea"

2
dist/scripts/aldine.js vendored

File diff suppressed because one or more lines are too long

60
dist/scripts/aldine.js.LICENSE.txt vendored

@ -0,0 +1,60 @@
/*!
* Isotope v3.0.6
*
* Licensed GPLv3 for open source use
* or Isotope Commercial License for commercial use
*
* https://isotope.metafizzy.co
* Copyright 2010-2018 Metafizzy
*/
/*!
* Masonry layout mode
* sub-classes Masonry
* https://masonry.desandro.com
*/
/*!
* Masonry v4.2.1
* Cascading grid layout library
* https://masonry.desandro.com
* MIT License
* by David DeSandro
*/
/*!
* Outlayer v2.1.1
* the brains and guts of a layout library
* MIT license
*/
/*!
* Sizzle CSS Selector Engine v2.3.5
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2020-03-14
*/
/*!
* getSize v2.0.3
* measure size of elements
* MIT license
*/
/*!
* jQuery JavaScript Library v3.5.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2020-05-04T22:49Z
*/

2
dist/scripts/catalog-admin.js vendored

File diff suppressed because one or more lines are too long

24
dist/scripts/catalog-admin.js.LICENSE.txt vendored

@ -0,0 +1,24 @@
/*!
* Sizzle CSS Selector Engine v2.3.5
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://js.foundation/
*
* Date: 2020-03-14
*/
/*!
* jQuery JavaScript Library v3.5.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2020-05-04T22:49Z
*/

2
dist/styles/aldine.css vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save