dom-accessibility-api
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -0,1 +1,11 @@ | ||
# dom-accessibility-api changelog | ||
## 0.4.3 | ||
### Patch Changes | ||
- [`b421d9e`](https://github.com/eps1lon/dom-accessibility-api/commit/b421d9e9709adf0f72e09cb5d7ea2a32ceefd8eb) [#168](https://github.com/eps1lon/dom-accessibility-api/pull/168) Thanks [@eps1lon](https://github.com/eps1lon)! - fix: Use relative paths in exports field | ||
Fixes a crash when using ES modules in Node. | ||
## 0.4.2 | ||
@@ -2,0 +12,0 @@ |
@@ -6,5 +6,5 @@ "use strict"; | ||
var _from = _interopRequireDefault(require("core-js-pure/features/array/from")); | ||
var _array = _interopRequireDefault(require("./polyfills/array.from")); | ||
var _set = _interopRequireDefault(require("core-js-pure/stable/set")); | ||
var _SetLike = _interopRequireDefault(require("./polyfills/SetLike")); | ||
@@ -17,10 +17,16 @@ var _getRole = _interopRequireDefault(require("./getRole")); | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } | ||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } | ||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } | ||
/** | ||
@@ -109,3 +115,3 @@ * Small utility that handles all the JS quirks with `this` which is important | ||
function queryChildNodes(node) { | ||
return (0, _from.default)(node.childNodes).concat(idRefs(node, "aria-owns")); | ||
return (0, _array.default)(node.childNodes).concat(idRefs(node, "aria-owns")); | ||
} | ||
@@ -155,3 +161,3 @@ /** | ||
var root = _arr[_i]; | ||
elements.push.apply(elements, _toConsumableArray((0, _from.default)(root.querySelectorAll(selectors)))); | ||
elements.push.apply(elements, _toConsumableArray((0, _array.default)(root.querySelectorAll(selectors)))); | ||
} | ||
@@ -235,3 +241,3 @@ | ||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var consultedNodes = new _set.default(); | ||
var consultedNodes = new _SetLike.default(); | ||
@@ -252,8 +258,7 @@ if (prohibitsNaming(root)) { | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
var _iterator = _createForOfIteratorHelper(queryChildNodes(node)), | ||
_step; | ||
try { | ||
for (var _iterator = queryChildNodes(node)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
for (_iterator.s(); !(_step = _iterator.n()).done;) { | ||
var child = _step.value; | ||
@@ -271,14 +276,5 @@ var result = computeTextAlternative(child, { | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
_iterator.e(err); | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator.return != null) { | ||
_iterator.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
} | ||
_iterator.f(); | ||
} | ||
@@ -344,3 +340,3 @@ | ||
consultedNodes.add(input); | ||
return (0, _from.default)(labels).map(function (element) { | ||
return (0, _array.default)(labels).map(function (element) { | ||
return computeTextAlternative(element, { | ||
@@ -432,3 +428,3 @@ isEmbeddedInLabel: true, | ||
return (0, _from.default)(selectedOptions).map(function (selectedOption) { | ||
return (0, _array.default)(selectedOptions).map(function (selectedOption) { | ||
return computeTextAlternative(selectedOption, { | ||
@@ -435,0 +431,0 @@ isEmbeddedInLabel: context.isEmbeddedInLabel, |
@@ -6,8 +6,12 @@ "use strict"; | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } | ||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } | ||
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } | ||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } | ||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | ||
@@ -14,0 +18,0 @@ |
{ | ||
"name": "dom-accessibility-api", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"main": "dist/index.js", | ||
"type": "commonjs", | ||
"exports": { | ||
"import": "dist/index.mjs", | ||
"require": "dist/index.js" | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
}, | ||
@@ -15,5 +15,3 @@ "license": "MIT", | ||
}, | ||
"dependencies": { | ||
"core-js-pure": "^3.6.4" | ||
}, | ||
"dependencies": {}, | ||
"files": [ | ||
@@ -26,3 +24,3 @@ ".browserslistrc", | ||
"build:clean": "rimraf dist", | ||
"build:source": "babel sources --extensions \".ts\" --ignore \"**/__tests__/**/*\" --out-dir dist/ --out-file-extension=.mjs --source-maps", | ||
"build:source": "cross-env BABEL_ENV=esm babel sources --extensions \".ts\" --ignore \"**/__tests__/**/*\" --out-dir dist/ --out-file-extension=.mjs --source-maps", | ||
"build:source:cjs": "cross-env BABEL_ENV=cjs babel sources --extensions \".ts\" --ignore \"**/__tests__/**/*\" --out-dir dist/ --out-file-extension=.js --source-maps", | ||
@@ -32,5 +30,3 @@ "build:types": "tsc -p tsconfig.json --emitDeclarationOnly", | ||
"lint": "eslint --report-unused-disable-directives \"sources/**/*.ts\"", | ||
"prepublishOnly": "yarn build:source", | ||
"release:prepare": "yarn changeset version", | ||
"release": "yarn changeset publish", | ||
"release": "yarn build && yarn changeset publish", | ||
"test": "jest", | ||
@@ -50,15 +46,16 @@ "test:ci": "jest --ci --config jest.ci.config.js --runInBand", | ||
"@babel/cli": "^7.8.4", | ||
"@babel/core": "^7.8.7", | ||
"@babel/core": "^7.9.0", | ||
"@babel/plugin-proposal-class-properties": "^7.8.3", | ||
"@babel/plugin-transform-modules-commonjs": "^7.9.0", | ||
"@babel/preset-env": "^7.8.7", | ||
"@babel/preset-typescript": "^7.8.3", | ||
"@babel/preset-env": "^7.9.0", | ||
"@babel/preset-typescript": "^7.9.0", | ||
"@changesets/changelog-github": "^0.2.2", | ||
"@changesets/cli": "^2.6.1", | ||
"@testing-library/dom": "^7.0.4", | ||
"@testing-library/dom": "^7.1.0", | ||
"@types/jest": "^25.1.4", | ||
"@typescript-eslint/eslint-plugin": "^2.23.0", | ||
"@typescript-eslint/parser": "^2.23.0", | ||
"@typescript-eslint/eslint-plugin": "^2.24.0", | ||
"@typescript-eslint/parser": "^2.24.0", | ||
"concurrently": "^5.1.0", | ||
"cross-env": "^7.0.2", | ||
"cypress": "^4.1.0", | ||
"cypress": "^4.2.0", | ||
"eslint": "^6.8.0", | ||
@@ -72,5 +69,5 @@ "jest": "^25.1.0", | ||
"minimatch": "^3.0.4", | ||
"mocha": "^7.1.0", | ||
"mocha": "^7.1.1", | ||
"mocha-sugar-free": "^1.4.0", | ||
"prettier": "^1.19.1", | ||
"prettier": "^2.0.1", | ||
"q": "^1.5.1", | ||
@@ -77,0 +74,0 @@ "request": "^2.88", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
174459
0
44
1451
32
- Removedcore-js-pure@^3.6.4
- Removedcore-js-pure@3.37.1(transitive)