+14
| language: node_js | ||
| node_js: | ||
| - '0.10' | ||
| branches: | ||
| only: | ||
| - master | ||
| notifications: | ||
| email: | ||
| - rod@vagg.org | ||
| script: npm test | ||
| env: | ||
| global: | ||
| - SAUCE_USER=traversty-sauce | ||
| - secure: "J0j5e2PUKNJ19udPSwCoVIUAWyRcXt9c/crrJhLRV5XXoVYuPSTJ+qWgfb83zvejtjfC5AdY59kzfJnTaIi14y9Ciz5nitpLbAHYWdcVSmiwf9qSuqJ2S+s5aDaMfLWl3CXeqt7FGiMsb6J2OZZJzg0HKKOeMyvf6drahvDnsrA=" |
| require('./noconflict.js') | ||
| require('./setup.js') | ||
| require('./core-test.js') | ||
| require('./engines-test.js') |
| #!/usr/bin/env node | ||
| const user = process.env.SAUCE_USER | ||
| , key = process.env.SAUCE_KEY | ||
| , path = require('path') | ||
| , brtapsauce = require('brtapsauce') | ||
| , capabilities = [ | ||
| { browserName: 'chrome' , platform: 'Windows XP', version: '' } | ||
| , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } | ||
| , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } | ||
| , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } | ||
| , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } | ||
| , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } | ||
| , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } | ||
| , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } | ||
| , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } | ||
| , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } | ||
| , { browserName: 'opera' , platform: 'Windows 7' , version: '' } | ||
| , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } | ||
| , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } | ||
| , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } | ||
| ] | ||
| if (!user) | ||
| throw new Error('Must set a SAUCE_USER env var') | ||
| if (!key) | ||
| throw new Error('Must set a SAUCE_KEY env var') | ||
| brtapsauce({ | ||
| name : 'Traversty' | ||
| , user : user | ||
| , key : key | ||
| , brsrc : path.join(__dirname, 'browserify.js') | ||
| , capabilities : capabilities | ||
| , options : { timeout: 60 * 6 } | ||
| }) |
+3
-4
@@ -10,6 +10,6 @@ { | ||
| , "latedef": false | ||
| , "newcap": true | ||
| , "newcap": false | ||
| , "noarg": true | ||
| , "noempty": true | ||
| , "nonew": true | ||
| , "nonew": false | ||
| , "plusplus": false | ||
@@ -22,3 +22,3 @@ , "quotmark": true | ||
| , "trailing": true | ||
| , "maxlen": 120 | ||
| , "maxlen": 0 | ||
| , "asi": true | ||
@@ -28,3 +28,2 @@ , "boss": true | ||
| , "eqnull": true | ||
| , "es5": true | ||
| , "esnext": true | ||
@@ -31,0 +30,0 @@ , "evil": true |
+12
-5
| { | ||
| "name" : "traversty" | ||
| , "description" : "Library agnostic utility for DOM collection management and traversal" | ||
| , "version" : "1.0.4" | ||
| , "version" : "1.0.5" | ||
| , "homepage" : "https://github.com/rvagg/traversty" | ||
@@ -17,7 +17,14 @@ , "authors" : [ | ||
| , "devDependencies" : { | ||
| "buster" : "*" | ||
| , "uglify-js" : "*" | ||
| , "colors-tmpl" : "*" | ||
| "bustermove" : "*" | ||
| , "qwery" : "*" | ||
| , "qwery-pseudos" : "*" | ||
| , "sizzle" : "*" | ||
| , "nwmatcher" : "*" | ||
| , "brtapsauce" : "*" | ||
| } | ||
| , "license" : "MIT" | ||
| } | ||
| , "scripts" : { | ||
| "test-local" : "brtapsauce-local test/browserify.js" | ||
| , "test" : "test/sauce.js" | ||
| } | ||
| } |
+9
-1
@@ -1,5 +0,13 @@ | ||
| # Traversty — headache-free DOM collection management and traversal | ||
| # Traversty | ||
| **DOM collection management and traversal** | ||
| Traversty is a library-agnostic DOM utility for traversal and element collection manipulation. Traversty doesn't provide any DOM manipulation features; instead, Traversty is used for managing collections of DOM elements and navigating the DOM. | ||
| [](https://nodei.co/npm/traversty/) | ||
| [](https://travis-ci.org/rvagg/traversty) | ||
| *Tests run against [Qwery](https://github.com/ded/qwery), [Sizzle](http://sizzlejs.com/), [NWMatcher](http://javascript.nwbox.com/NWMatcher/) and native `querySelectorAll()` and `matchesSelector()` where available.* | ||
| **Current file size:** 15.8 kB raw, 5.7 kB min, **2.1 kB gzip** | ||
@@ -6,0 +14,0 @@ |
@@ -1,5 +0,10 @@ | ||
| /*global Q:true, T:true, traversty:true, buster:true, assert:true, __matchesSelector:true*/ | ||
| var buster = require('bustermove') | ||
| , assert = buster.assert | ||
| , Q = require('qwery') | ||
| , T = require('../traversty') | ||
| , setup = require('./setup') | ||
| buster.testCase('traversty', { | ||
| 'noConflict': function () { | ||
| assert.equals(traversty(), 'success') | ||
| assert.equals(window.traversty(), 'success') | ||
| assert.isFunction(T().up) | ||
@@ -32,3 +37,3 @@ } | ||
| if (__matchesSelector) { // defined in setup.js | ||
| if (setup.__matchesSelector) { // defined in setup.js | ||
| // T("#fixtures") has #fixtures element (only) | ||
@@ -35,0 +40,0 @@ assert.equals((t = T('#fixtures')).length, 1) |
+14
-4
@@ -1,2 +0,10 @@ | ||
| /*global traversalTests:true, filterTests:true, buster:true, T:true, Q:true, Sizzle:true, NW:true, zest:true, sel:true, loadES5Basic:true, __matchesSelector:true*/ | ||
| var buster = require('bustermove') | ||
| , assert = buster.assert | ||
| , setup = require('./setup') | ||
| , Q = require('qwery') | ||
| , Sizzle = require('sizzle') | ||
| , NW = require('nwmatcher') | ||
| , T = require('../traversty') | ||
| , traversalTests = require('./traversal') | ||
| , filterTests = require('./filters') | ||
@@ -48,9 +56,11 @@ var own = Object.prototype.hasOwnProperty | ||
| // we also don't want to run native tests in older browsers that don't support it | ||
| if (window.__matchesSelector) engineTest(null, 'Native') | ||
| if (setup.__matchesSelector) engineTest(null, 'Native') | ||
| engineTest(Q, 'Qwery') | ||
| engineTest(Sizzle, 'Sizzle') | ||
| engineTest(NW.Dom, 'NW') | ||
| engineTest(zest, 'Zest') | ||
| // can't browserify, needs jade !?!? engineTest(zest, 'Zest') | ||
| // Sel must be last because it requires es5-basic which extends natives and we don't | ||
| // want that impacting any other tests in unexpected ways | ||
| engineTest(sel, 'Sel', function() { loadES5Basic() }) | ||
| // es5-basic causes too many browserify problems | ||
| // engineTest(sel, 'Sel', function() { loadES5Basic() }) |
+5
-3
@@ -1,5 +0,7 @@ | ||
| /*global Q:true, T:true, assert:true*/ | ||
| // note: `T` is `traversty` and `Q` is `qwery` (selector engine), see setup.js | ||
| var buster = require('bustermove') | ||
| , assert = buster.assert | ||
| , Q = require('qwery') | ||
| , T = require('../traversty') | ||
| this.filterTests = { | ||
| module.exports = { | ||
| 'first()': { | ||
@@ -6,0 +8,0 @@ 'first() of many': function () { |
@@ -1,1 +0,1 @@ | ||
| function traversty() { return 'success' } | ||
| window.traversty = function traversty() { return 'success' } |
+16
-15
@@ -1,15 +0,17 @@ | ||
| /*global qwery:true, traversty:true, buster:true, Q:true*/ | ||
| var buster = require('bustermove') | ||
| , referee = buster.referee | ||
| , Q = require('qwery') | ||
| this.Q = qwery | ||
| this.T = traversty.noConflict() | ||
| this.__matchesSelector = (function (el, pfx, name, i, ms) { | ||
| while (i < pfx.length) | ||
| if (el[ms = pfx[i++] + name]) return ms | ||
| return false | ||
| }(document.documentElement, [ 'msM', 'webkitM', 'mozM', 'oM', 'm' ], 'atchesSelector', 0)) | ||
| require('qwery-pseudos') | ||
| module.exports.__matchesSelector = (function (el, pfx, name, i, ms) { | ||
| while (i < pfx.length) | ||
| if (el[ms = pfx[i++] + name]) return ms | ||
| return false | ||
| }(document.documentElement, [ 'msM', 'webkitM', 'mozM', 'oM', 'm' ], 'atchesSelector', 0)) | ||
| //assert.equals.message += ": ${2}"; | ||
| //assert.same.message += ": ${2}"; | ||
| buster.assertions.add("hasExactElements", { | ||
| referee.add('hasExactElements', { | ||
| assert: function (actual, expectedSelector) { | ||
@@ -32,8 +34,7 @@ var i | ||
| } | ||
| , assertMessage: "Expected ${actual} to be ${elements} (selector: ${1}): ${2}" | ||
| , assertMessage: 'Expected ${actual} to be ${elements} (selector: ${1}): ${2}' | ||
| }) | ||
| buster.assertions.add("isExactElement", { | ||
| referee.add('isExactElement', { | ||
| assert: function (actual, expectedSelector) { | ||
| var i | ||
| this.element = Q(expectedSelector)[0] | ||
@@ -43,6 +44,6 @@ this.actual = actual | ||
| } | ||
| , assertMessage: "Expected ${actual} to be ${element} (selector: ${1}): ${2}" | ||
| , assertMessage: 'Expected ${actual} to be ${element} (selector: ${1}): ${2}' | ||
| }) | ||
| buster.assertions.add("hasExactElementsUnordered", { | ||
| referee.add('hasExactElementsUnordered', { | ||
| assert: function (actual, expectedSelector) { | ||
@@ -60,3 +61,3 @@ var i, j, found = 0 | ||
| } | ||
| , assertMessage: "Expected ${actual} to be ${elements} (selector: ${1}): ${2}" | ||
| , assertMessage: 'Expected ${actual} to be ${elements} (selector: ${1}): ${2}' | ||
| }) | ||
@@ -63,0 +64,0 @@ |
@@ -1,5 +0,7 @@ | ||
| /*global Q:true, T:true, assert:true*/ | ||
| // note: `T` is `traversty` and `Q` is `qwery` (selector engine), see setup.js | ||
| var buster = require('bustermove') | ||
| , assert = buster.assert | ||
| , Q = require('qwery') | ||
| , T = require('../traversty') | ||
| this.traversalTests = { | ||
| module.exports = { | ||
| 'Simple no-arg traversal': { | ||
@@ -6,0 +8,0 @@ |
-22
| var config = module.exports | ||
| config['Traversty Tests'] = { | ||
| environment: 'browser' | ||
| , sources: [ | ||
| 'test/vendor/qwery.js' | ||
| , 'test/vendor/qwery_pseudos.js' | ||
| , 'test/vendor/sizzle.js' | ||
| , 'test/vendor/nwmatcher.js' | ||
| , 'test/vendor/zest.js' | ||
| , 'test/vendor/es5-basic_mod.js' | ||
| , 'test/vendor/sel.js' | ||
| , 'test/noconflict.js' | ||
| , 'traversty.js' | ||
| , 'test/setup.js' | ||
| , 'test/traversal.js' | ||
| , 'test/filters.js' | ||
| ] | ||
| , tests: [ | ||
| 'test/*-test.js' | ||
| ] | ||
| } |
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
753418
0.37%42
5%18393
0.16%632
1.28%6
100%108
1.89%