From 051cda848cdcb60672db2973382a4e92dd511e49 Mon Sep 17 00:00:00 2001 From: shivam Date: Thu, 13 Mar 2025 09:39:25 +0530 Subject: [PATCH 1/5] [fix]:resolved javascript linting errors in polyfill.js and sync.js --- lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js | 2 +- lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js b/lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js index bcd54eff93b8..5e7c546d7e72 100644 --- a/lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js +++ b/lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js @@ -55,7 +55,7 @@ var debug = logger( 'pkg-deps:sync' ); * @returns {ObjectArray} resolved dependencies * * @example -* var pkgs = [ '/foo/bar/baz' ]; +* var pkgs = [ '/path/to/package' ]; * * var deps = pkgDeps( pkgs ); * // returns [{...}] diff --git a/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js b/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js index 4693932eccfe..23cab0ce1cfe 100644 --- a/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js +++ b/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js @@ -22,7 +22,7 @@ var nativeClass = require( '@stdlib/utils/native-class' ); var getProto = require( './proto.js' ); - +var Object = require( '@stdlib/utils/global-object' ); // MAIN // From 32825717c2a0b1e9e21f471819d7df4fefe52ab2 Mon Sep 17 00:00:00 2001 From: shivam Date: Thu, 13 Mar 2025 10:06:18 +0530 Subject: [PATCH 2/5] [fix]: resolved javascript linting errors --- lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js b/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js index 23cab0ce1cfe..20414090b1e1 100644 --- a/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js +++ b/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js @@ -42,7 +42,7 @@ function getPrototypeOf( obj ) { // May break if the constructor has been tampered with... return obj.constructor.prototype; } - if ( obj instanceof Object ) { + if ( Object.prototype.isPrototypeOf(obj) ) { return Object.prototype; } // Return `null` for objects created via `Object.create( null )`. Also return `null` for cross-realm objects on browsers that lack `__proto__` support, such as IE < 11. From 83fda48accd2b410b31814037c74125133947cfa Mon Sep 17 00:00:00 2001 From: shivam Date: Thu, 13 Mar 2025 17:38:33 +0530 Subject: [PATCH 3/5] [fix]: resolve lint issue in javascipt --- lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js | 2 +- lib/node_modules/@stdlib/math/base/special/roundn/src/addon.c | 2 +- .../@stdlib/utils/get-prototype-of/lib/polyfill.js | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js b/lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js index 5e7c546d7e72..472225d17d9e 100644 --- a/lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js +++ b/lib/node_modules/@stdlib/_tools/pkgs/deps/lib/sync.js @@ -58,7 +58,7 @@ var debug = logger( 'pkg-deps:sync' ); * var pkgs = [ '/path/to/package' ]; * * var deps = pkgDeps( pkgs ); -* // returns [{...}] +* // throws */ function pkgDeps( pkgs, options ) { var results; diff --git a/lib/node_modules/@stdlib/math/base/special/roundn/src/addon.c b/lib/node_modules/@stdlib/math/base/special/roundn/src/addon.c index e968d8c03a81..2eacea472cd7 100644 --- a/lib/node_modules/@stdlib/math/base/special/roundn/src/addon.c +++ b/lib/node_modules/@stdlib/math/base/special/roundn/src/addon.c @@ -19,4 +19,4 @@ #include "stdlib/math/base/special/roundn.h" #include "stdlib/math/base/napi/binary.h" -STDLIB_MATH_BASE_NAPI_MODULE_DI_D( stdlib_base_roundn ) +STDLIB_MATH_BASE_NAPI_MODULE_D_D( stdlib_base_roundn ) diff --git a/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js b/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js index 20414090b1e1..00911111d89d 100644 --- a/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js +++ b/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js @@ -22,7 +22,8 @@ var nativeClass = require( '@stdlib/utils/native-class' ); var getProto = require( './proto.js' ); -var Object = require( '@stdlib/utils/global-object' ); +var Object = require( '@stdlib/utils/global-object' ).Object; + // MAIN // From b42d42e7aa0294e7beb6e951c68bdcb28890f487 Mon Sep 17 00:00:00 2001 From: shivam Date: Thu, 13 Mar 2025 18:03:22 +0530 Subject: [PATCH 4/5] [fix]: resolved lint error in javascript --- .../math/base/special/roundn/src/addon.c | 2 +- .../@stdlib/utils/global-object/lib/main.js | 160 ++++++++++++++++++ 2 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 lib/node_modules/@stdlib/utils/global-object/lib/main.js diff --git a/lib/node_modules/@stdlib/math/base/special/roundn/src/addon.c b/lib/node_modules/@stdlib/math/base/special/roundn/src/addon.c index 2eacea472cd7..d636a9b7df48 100644 --- a/lib/node_modules/@stdlib/math/base/special/roundn/src/addon.c +++ b/lib/node_modules/@stdlib/math/base/special/roundn/src/addon.c @@ -19,4 +19,4 @@ #include "stdlib/math/base/special/roundn.h" #include "stdlib/math/base/napi/binary.h" -STDLIB_MATH_BASE_NAPI_MODULE_D_D( stdlib_base_roundn ) +STDLIB_MATH_BASE_NAPI_MODULE_D_D( stdlib_base_roundn ); diff --git a/lib/node_modules/@stdlib/utils/global-object/lib/main.js b/lib/node_modules/@stdlib/utils/global-object/lib/main.js new file mode 100644 index 000000000000..909a38a7102a --- /dev/null +++ b/lib/node_modules/@stdlib/utils/global-object/lib/main.js @@ -0,0 +1,160 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MAIN // + +/** +* Returns the global object. +* +* @returns {Object} global object +* +* @example +* var g = getGlobal(); +* // returns +*/ +function getGlobal() { + // Check for global: + if ( typeof global !== 'undefined' ) { + return global; + } + // Check for self (e.g., web workers): + if ( typeof self !== 'undefined' ) { + return self; + } + // Check for window: + if ( typeof window !== 'undefined' ) { + return window; + } + // Fall back to Function constructor: + try { + return Function( 'return this' )(); + } catch ( err ) { + // Empty... + } + return {}; +} + + +// EXPORTS // + +module.exports = getGlobal; +EOF + +# Create index.js +cat > lib/index.js << 'EOF' +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Return the global object. +* +* @module @stdlib/utils/global-object +* +* @example +* var getGlobal = require( '@stdlib/utils/global-object' ); +* +* var g = getGlobal(); +* // returns +*/ + +// MODULES // + +var getGlobal = require( './main.js' ); + + +// EXPORTS // + +module.exports = getGlobal; +EOF + +# Create package.json +cat > package.json << 'EOF' +{ + "name": "@stdlib/utils/global-object", + "version": "0.0.0", + "description": "Return the global object.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "keywords": [ + "stdlib", + "stdutils", + "utils", + "util", + "utilities", + "utility", + "global", + "window", + "self", + "object" + ] +} +EOF + + +mkdir -p docs examples test From 31839749586938baa28cd2038fff7429b472d10c Mon Sep 17 00:00:00 2001 From: shivam Date: Fri, 14 Mar 2025 11:36:01 +0530 Subject: [PATCH 5/5] [fix]: resolved lint error in javascript --- .../utils/get-prototype-of/lib/polyfill.js | 2 +- .../@stdlib/utils/global-object/lib/main.js | 160 ------------------ 2 files changed, 1 insertion(+), 161 deletions(-) delete mode 100644 lib/node_modules/@stdlib/utils/global-object/lib/main.js diff --git a/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js b/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js index 00911111d89d..bf5d67a9549b 100644 --- a/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js +++ b/lib/node_modules/@stdlib/utils/get-prototype-of/lib/polyfill.js @@ -22,7 +22,7 @@ var nativeClass = require( '@stdlib/utils/native-class' ); var getProto = require( './proto.js' ); -var Object = require( '@stdlib/utils/global-object' ).Object; +var Object = require( '@stdlib/utils/global' ).Object; // MAIN // diff --git a/lib/node_modules/@stdlib/utils/global-object/lib/main.js b/lib/node_modules/@stdlib/utils/global-object/lib/main.js deleted file mode 100644 index 909a38a7102a..000000000000 --- a/lib/node_modules/@stdlib/utils/global-object/lib/main.js +++ /dev/null @@ -1,160 +0,0 @@ -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -// MAIN // - -/** -* Returns the global object. -* -* @returns {Object} global object -* -* @example -* var g = getGlobal(); -* // returns -*/ -function getGlobal() { - // Check for global: - if ( typeof global !== 'undefined' ) { - return global; - } - // Check for self (e.g., web workers): - if ( typeof self !== 'undefined' ) { - return self; - } - // Check for window: - if ( typeof window !== 'undefined' ) { - return window; - } - // Fall back to Function constructor: - try { - return Function( 'return this' )(); - } catch ( err ) { - // Empty... - } - return {}; -} - - -// EXPORTS // - -module.exports = getGlobal; -EOF - -# Create index.js -cat > lib/index.js << 'EOF' -/** -* @license Apache-2.0 -* -* Copyright (c) 2018 The Stdlib Authors. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -'use strict'; - -/** -* Return the global object. -* -* @module @stdlib/utils/global-object -* -* @example -* var getGlobal = require( '@stdlib/utils/global-object' ); -* -* var g = getGlobal(); -* // returns -*/ - -// MODULES // - -var getGlobal = require( './main.js' ); - - -// EXPORTS // - -module.exports = getGlobal; -EOF - -# Create package.json -cat > package.json << 'EOF' -{ - "name": "@stdlib/utils/global-object", - "version": "0.0.0", - "description": "Return the global object.", - "license": "Apache-2.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "main": "./lib", - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": {}, - "homepage": "https://github.com/stdlib-js/stdlib", - "repository": { - "type": "git", - "url": "git://github.com/stdlib-js/stdlib.git" - }, - "bugs": { - "url": "https://github.com/stdlib-js/stdlib/issues" - }, - "dependencies": {}, - "devDependencies": {}, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "keywords": [ - "stdlib", - "stdutils", - "utils", - "util", - "utilities", - "utility", - "global", - "window", - "self", - "object" - ] -} -EOF - - -mkdir -p docs examples test