From 3caf327ac98d01d2bc0d03c9c2ca7ca4cb10f12c Mon Sep 17 00:00:00 2001 From: Vlad Filippov Date: Mon, 4 May 2020 15:37:30 -0400 Subject: [PATCH] v2.2.0 --- .travis.yml | 8 ++---- CHANGELOG | 5 ++++ README.md | 58 ++++++++++++++++++++-------------------- appveyor.yml | 29 ++++++++++---------- docs/jasmine-examples.md | 27 +++++++++++++++++++ docs/jasmine-options.md | 16 +++++++++++ package-lock.json | 28 +++++++++---------- package.json | 2 +- 8 files changed, 109 insertions(+), 64 deletions(-) diff --git a/.travis.yml b/.travis.yml index 50053b2..8731d8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,11 @@ -sudo: required - language: node_js node_js: - "8" - - "9" - "10" + - "12" matrix: fast_finish: true -cache: - directories: - - node_modules +cache: npm diff --git a/CHANGELOG b/CHANGELOG index a1962e6..16a2ca2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +v2.2.0: + date: 2020-05-04 + changes: + - Dependency updates + - options.sandboxArgs; passing options to puppeteer v2.1.3: date: 2019-07-31 changes: diff --git a/README.md b/README.md index 60fce6c..4515e2c 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,6 @@ Example `sandboxArgs` object: } ``` - #### options.summary Type: `Boolean` Default: `false` @@ -287,70 +286,70 @@ grunt.initConfig({ }); ``` -#### Sample RequireJS/NPM Template usage +#### Passing options to sandbox (puppeteer) + +See [puppeteer launch options](https://pptr.dev/#?product=Puppeteer&version=v3.0.1&show=api-puppeteerlaunchoptions) for a complete list of arguments. ```js // Example configuration grunt.initConfig({ jasmine: { - yourTask: { + customTemplate: { src: 'src/**/*.js', options: { specs: 'spec/*Spec.js', - template: require('grunt-template-jasmine-requirejs') + helpers: 'spec/*Helper.js', + template: 'custom.tmpl', + sandboxArgs: { + args: ['--no-sandbox'], + timeout: 3000, + defaultViewport: { + isMobile: true + } + } } } } }); ``` -NPM Templates are just node modules, so you can write and treat them as such. - -Please see the [grunt-template-jasmine-requirejs](https://github.com/jsoverson/grunt-template-jasmine-requirejs) documentation -for more information on the RequireJS template. - -#### Keeping temp files in an existing directory - -Supplying a custom temp directory +#### Sample RequireJS/NPM Template usage ```js // Example configuration grunt.initConfig({ jasmine: { - pivotal: { + yourTask: { src: 'src/**/*.js', options: { - keepRunner: true, - tempDir: 'bin/jasmine/', specs: 'spec/*Spec.js', - helpers: 'spec/*Helper.js' + template: require('grunt-template-jasmine-requirejs') } } } }); ``` -#### Passing options to sandbox (puppeteer) +NPM Templates are just node modules, so you can write and treat them as such. -See [puppeteer launch options](https://pptr.dev/#?product=Puppeteer&version=v3.0.1&show=api-puppeteerlaunchoptions) for a complete list of arguments. +Please see the [grunt-template-jasmine-requirejs](https://github.com/jsoverson/grunt-template-jasmine-requirejs) documentation +for more information on the RequireJS template. + +#### Keeping temp files in an existing directory + +Supplying a custom temp directory ```js // Example configuration grunt.initConfig({ jasmine: { - customTemplate: { + pivotal: { src: 'src/**/*.js', options: { + keepRunner: true, + tempDir: 'bin/jasmine/', specs: 'spec/*Spec.js', - helpers: 'spec/*Helper.js', - template: 'custom.tmpl', - sandboxArgs: { - args: ['--no-sandbox'], - timeout: 3000, - defaultViewport: { - isMobile: true - } - } + helpers: 'spec/*Helper.js' } } } @@ -360,6 +359,7 @@ grunt.initConfig({ ## Release History + * 2020-05-04   v2.2.0   Dependency updates options.sandboxArgs; passing options to puppeteer * 2019-07-31   v2.1.3   Fix security deps Update Puppeteer * 2018-11-14   v2.0.3   [object Object] Build only should pass if the buildSpecrunner runs without error * 2018-08-13   v2.0.2   Fix noSandbox option. Fix startTime, and timing issues. @@ -400,4 +400,4 @@ grunt.initConfig({ Task submitted by [Jarrod Overson](http://jarrodoverson.com) -*This file was generated on Wed Jul 31 2019 12:27:22.* +*This file was generated on Mon May 04 2020 15:38:37.* diff --git a/appveyor.yml b/appveyor.yml index 95fd776..8850cfe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,28 +1,29 @@ -clone_depth: 10 +clone_depth: 5 version: "{build}" -# What combinations to test environment: matrix: - - nodejs_version: "8" - platform: x86 - - nodejs_version: "9" - platform: x86 - - nodejs_version: "10" - platform: x86 + - NODEJS_VERSION: "8" + PLATFORM: x86 + - NODEJS_VERSION: "8" + PLATFORM: x64 + - NODEJS_VERSION: "10" + PLATFORM: x64 + - NODEJS_VERSION: "12" + PLATFORM: x64 install: - - ps: Install-Product node $env:nodejs_version $env:platform - - npm install + - ps: Install-Product node $env:NODEJS_VERSION $env:PLATFORM + - npm ci test_script: - # Output useful info for debugging - - node --version && npm --version + - node --version + - npm --version # We test multiple Windows shells because of prior stdout buffering issues # filed against Grunt. https://github.com/joyent/node/issues/3584 - ps: "npm test # PowerShell" # Pass comment to PS for easier debugging - - cmd: npm test + - npm test build: off @@ -30,4 +31,4 @@ matrix: fast_finish: true cache: - - node_modules -> package.json + - '%APPDATA%\npm-cache\ -> appveyor.yml,package.json,package-lock.json' diff --git a/docs/jasmine-examples.md b/docs/jasmine-examples.md index 0e6788c..a14f96d 100644 --- a/docs/jasmine-examples.md +++ b/docs/jasmine-examples.md @@ -66,6 +66,33 @@ grunt.initConfig({ }); ``` +## Passing options to sandbox (puppeteer) + +See [puppeteer launch options](https://pptr.dev/#?product=Puppeteer&version=v3.0.1&show=api-puppeteerlaunchoptions) for a complete list of arguments. + +```js +// Example configuration +grunt.initConfig({ + jasmine: { + customTemplate: { + src: 'src/**/*.js', + options: { + specs: 'spec/*Spec.js', + helpers: 'spec/*Helper.js', + template: 'custom.tmpl', + sandboxArgs: { + args: ['--no-sandbox'], + timeout: 3000, + defaultViewport: { + isMobile: true + } + } + } + } + } +}); +``` + ## Sample RequireJS/NPM Template usage ```js diff --git a/docs/jasmine-options.md b/docs/jasmine-options.md index b019b37..bf859bc 100644 --- a/docs/jasmine-options.md +++ b/docs/jasmine-options.md @@ -113,6 +113,22 @@ Default: `'full'` * `short` only displays a success or failure character for each test (useful with large suites) * `none` displays nothing +## options.sandboxArgs +Type: `Object` +Default: `{ args: [] }` + +Pass arugments to puppeteer launcher. For the list of available options, please look at [puppeteer launch options](https://pptr.dev/#?product=Puppeteer&version=v3.0.1&show=api-puppeteerlaunchoptions). + +Example `sandboxArgs` object: +```js +{ + args: { + '=-allow-file-access-from-files' + }, + executeablePath: '/some/other/path/to/chrome' +} +``` + ## options.summary Type: `Boolean` Default: `false` diff --git a/package-lock.json b/package-lock.json index 23e5468..a06a539 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1726,12 +1726,12 @@ } }, "grunt-contrib-internal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-internal/-/grunt-contrib-internal-3.1.0.tgz", - "integrity": "sha512-4mvSLcf+vsYA1mhoC/Oomx1I9VoK9ZOxNBOraGmvPd4K6kvTOW3LoArElHOPL97rNA4pUZgrsPGupWmFYLJzNw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/grunt-contrib-internal/-/grunt-contrib-internal-4.0.1.tgz", + "integrity": "sha512-cOj5Q3CflqJg7jTwlGAUs+Uj3MDUxqheKUQc8B0+ioUqkCrNr68ez7uBuHHMUE1eW4ooTHFQ0bEzxeKRa2q3wA==", "dev": true, "requires": { - "read-package-json": "^2.0.13" + "read-package-json": "^2.1.0" } }, "grunt-contrib-nodeunit": { @@ -2823,6 +2823,12 @@ "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==" }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true + }, "npm-package-arg": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz", @@ -3462,16 +3468,16 @@ } }, "read-package-json": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.13.tgz", - "integrity": "sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.1.tgz", + "integrity": "sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A==", "dev": true, "requires": { "glob": "^7.1.1", "graceful-fs": "^4.1.2", "json-parse-better-errors": "^1.0.1", "normalize-package-data": "^2.0.0", - "slash": "^1.0.0" + "npm-normalize-package-bin": "^1.0.0" } }, "read-pkg": { @@ -3768,12 +3774,6 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true - }, "slice-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", diff --git a/package.json b/package.json index 46272c9..a567207 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "devDependencies": { "grunt": "^1.0.4", "grunt-contrib-connect": "^2.0.0", - "grunt-contrib-internal": "^3.1.0", + "grunt-contrib-internal": "^4.0.1", "grunt-contrib-nodeunit": "^2.0.0", "grunt-contrib-watch": "^1.1.0" },