Socket
Socket
Sign inDemoInstall

get-intrinsic

Package Overview
Dependencies
3
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 1.1.2

27

CHANGELOG.md

@@ -8,2 +8,29 @@ # Changelog

## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08
### Fixed
- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16)
### Commits
- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d)
- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5)
- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de)
- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d)
- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932)
- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8)
- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496)
- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97)
- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d)
- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd)
- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5)
- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20)
- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359)
## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03

@@ -10,0 +37,0 @@

4

index.js

@@ -205,2 +205,3 @@ 'use strict';

var $strSlice = bind.call(Function.call, String.prototype.slice);
var $exec = bind.call(Function.call, RegExp.prototype.exec);

@@ -261,2 +262,5 @@ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */

if ($exec(/^%?[^%]*%?$/g, name) === null) {
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
}
var parts = stringToPath(name);

@@ -263,0 +267,0 @@ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';

34

package.json
{
"name": "get-intrinsic",
"version": "1.1.1",
"version": "1.1.2",
"description": "Get and robustly cache all JS language-level intrinsics at first require time",

@@ -16,2 +16,5 @@ "main": "index.js",

"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"prelint": "evalmd README.md",

@@ -49,18 +52,20 @@ "lint": "eslint --ext=.js,.mjs .",

"devDependencies": {
"@ljharb/eslint-config": "^17.5.0",
"aud": "^1.1.3",
"auto-changelog": "^2.2.1",
"@ljharb/eslint-config": "^21.0.0",
"aud": "^2.0.0",
"auto-changelog": "^2.4.0",
"call-bind": "^1.0.2",
"es-abstract": "^1.18.0-next.2",
"es-value-fixtures": "^1.0.0",
"eslint": "^7.19.0",
"es-abstract": "^1.20.1",
"es-value-fixtures": "^1.4.1",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"foreach": "^2.0.5",
"has-bigints": "^1.0.1",
"for-each": "^0.3.3",
"make-async-function": "^1.0.0",
"make-async-generator-function": "^1.0.0",
"make-generator-function": "^2.0.0",
"mock-property": "^1.0.0",
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"object-inspect": "^1.9.0",
"tape": "^5.1.1"
"object-inspect": "^1.12.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.5.3"
},

@@ -78,4 +83,9 @@ "auto-changelog": {

"has": "^1.0.3",
"has-symbols": "^1.0.1"
"has-symbols": "^1.0.3"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}
# get-intrinsic <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]

@@ -56,3 +58,3 @@ [![dev dependency status][dev-deps-svg]][dev-deps-url]

[package-url]: https://npmjs.org/package/get-intrinsic
[npm-version-svg]: http://versionbadg.es/ljharb/get-intrinsic.svg
[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg
[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg

@@ -67,1 +69,5 @@ [deps-url]: https://david-dm.org/ljharb/get-intrinsic

[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic
[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic
[actions-url]: https://github.com/ljharb/get-intrinsic/actions

@@ -6,3 +6,3 @@ 'use strict';

var test = require('tape');
var forEach = require('foreach');
var forEach = require('for-each');
var debug = require('object-inspect');

@@ -12,2 +12,3 @@ var generatorFns = require('make-generator-function')();

var asyncGenFns = require('make-async-generator-function')();
var mockProperty = require('mock-property');

@@ -17,3 +18,3 @@ var callBound = require('call-bind/callBound');

var $gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
var defineProperty = require('es-abstract/test/helpers/defineProperty');
var DefinePropertyOrThrow = require('es-abstract/2021/DefinePropertyOrThrow');

@@ -72,2 +73,14 @@ var $isProto = callBound('%Object.prototype.isPrototypeOf%');

t['throws'](
function () { GetIntrinsic('%Array.prototype%garbage%'); },
SyntaxError,
'Throws with extra percent signs'
);
t['throws'](
function () { GetIntrinsic('%Array.prototype%push%'); },
SyntaxError,
'Throws with extra percent signs, even on an existing intrinsic'
);
forEach(v.nonStrings, function (nonString) {

@@ -130,4 +143,4 @@ t['throws'](

], function (name) {
defineProperty(Object.prototype, 'toString', {
value: function toString() {
DefinePropertyOrThrow(Object.prototype, 'toString', {
'[[Value]]': function toString() {
return original.apply(this, arguments);

@@ -139,3 +152,3 @@ }

defineProperty(Object.prototype, 'toString', { value: original });
DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original });
st.end();

@@ -153,11 +166,12 @@ });

], function (name) {
// eslint-disable-next-line no-extend-native
Object.prototype.propertyIsEnumerable = function propertyIsEnumerable() {
return original.apply(this, arguments);
};
var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', {
value: function propertyIsEnumerable() {
return original.apply(this, arguments);
}
});
st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable');
restore();
});
// eslint-disable-next-line no-extend-native
Object.prototype.propertyIsEnumerable = original;
st.end();

@@ -164,0 +178,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc