Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/loader-utils

Package Overview
Dependencies
Maintainers
10
Versions
319
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/loader-utils - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

6

dist/es5/lib/library-utils/library-utils.js

@@ -22,3 +22,3 @@ "use strict";

var LATEST = 'beta';
var VERSION = typeof "2.0.0" !== 'undefined' ? "2.0.0" : LATEST;
var VERSION = typeof "2.0.2" !== 'undefined' ? "2.0.2" : LATEST;
var loadLibraryPromises = {};

@@ -70,6 +70,2 @@

if (!_globals.isBrowser) {
return "modules/".concat(moduleName, "/dist/libs/").concat(library);
}
if (options.CDN) {

@@ -76,0 +72,0 @@ (0, _assert["default"])(options.CDN.startsWith('http'));

@@ -24,6 +24,2 @@ "use strict";

function requireFromFile(filename) {
if (filename.startsWith('http')) {
throw new Error("require from remote script not supported in Node.js: ".concat(filename));
}
if (!filename.startsWith('/')) {

@@ -30,0 +26,0 @@ filename = "".concat(process.cwd(), "/").concat(filename);

2

dist/es5/lib/validate-loader-version.js

@@ -12,3 +12,3 @@ "use strict";

var VERSION = typeof "2.0.0" !== 'undefined' ? "2.0.0" : '';
var VERSION = typeof "2.0.2" !== 'undefined' ? "2.0.2" : '';

@@ -15,0 +15,0 @@ function validateLoaderVersion(loader) {

@@ -5,3 +5,3 @@ import { global, isBrowser, isWorker } from '../env-utils/globals';

const LATEST = 'beta';
const VERSION = typeof "2.0.0" !== 'undefined' ? "2.0.0" : LATEST;
const VERSION = typeof "2.0.2" !== 'undefined' ? "2.0.2" : LATEST;
const loadLibraryPromises = {};

@@ -23,6 +23,2 @@ export async function loadLibrary(libraryUrl, moduleName = null, options = {}) {

if (!isBrowser) {
return "modules/".concat(moduleName, "/dist/libs/").concat(library);
}
if (options.CDN) {

@@ -29,0 +25,0 @@ assert(options.CDN.startsWith('http'));

@@ -10,6 +10,2 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

export function requireFromFile(filename) {
if (filename.startsWith('http')) {
throw new Error("require from remote script not supported in Node.js: ".concat(filename));
}
if (!filename.startsWith('/')) {

@@ -16,0 +12,0 @@ filename = "".concat(process.cwd(), "/").concat(filename);

import assert from './env-utils/assert';
const VERSION = typeof "2.0.0" !== 'undefined' ? "2.0.0" : '';
const VERSION = typeof "2.0.2" !== 'undefined' ? "2.0.2" : '';
export function validateLoaderVersion(loader, coreVersion = VERSION) {

@@ -4,0 +4,0 @@ assert(loader, 'no loader provided');

@@ -7,3 +7,3 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";

var LATEST = 'beta';
var VERSION = typeof "2.0.0" !== 'undefined' ? "2.0.0" : LATEST;
var VERSION = typeof "2.0.2" !== 'undefined' ? "2.0.2" : LATEST;
var loadLibraryPromises = {};

@@ -54,6 +54,2 @@ export function loadLibrary(_x) {

if (!isBrowser) {
return "modules/".concat(moduleName, "/dist/libs/").concat(library);
}
if (options.CDN) {

@@ -60,0 +56,0 @@ assert(options.CDN.startsWith('http'));

@@ -11,6 +11,2 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

export function requireFromFile(filename) {
if (filename.startsWith('http')) {
throw new Error("require from remote script not supported in Node.js: ".concat(filename));
}
if (!filename.startsWith('/')) {

@@ -17,0 +13,0 @@ filename = "".concat(process.cwd(), "/").concat(filename);

import assert from './env-utils/assert';
var VERSION = typeof "2.0.0" !== 'undefined' ? "2.0.0" : '';
var VERSION = typeof "2.0.2" !== 'undefined' ? "2.0.2" : '';
export function validateLoaderVersion(loader) {

@@ -4,0 +4,0 @@ var coreVersion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : VERSION;

{
"name": "@loaders.gl/loader-utils",
"version": "2.0.1",
"version": "2.0.2",
"description": "Framework-independent loaders for 3D graphics formats",

@@ -42,3 +42,3 @@ "license": "MIT",

},
"gitHead": "ae0763bd05bbe9b14aedf2a99e5873db16739bb7"
"gitHead": "3ed0131b299641c35dc5cdf3655406632a8f90d0"
}

@@ -39,9 +39,2 @@ // __VERSION__ is injected by babel-plugin-version-inline

// Load from local files, not from CDN scripts in Node.js
// TODO - needs to locate the modules directory when installed!
if (!isBrowser) {
return `modules/${moduleName}/dist/libs/${library}`;
}
// In browser, load from external scripts
if (options.CDN) {

@@ -52,3 +45,3 @@ assert(options.CDN.startsWith('http'));

// TODO - loading inside workers requires paths relative to worker script location...
// Note - Worker loading requires paths relative to worker script "location"?
if (isWorker) {

@@ -55,0 +48,0 @@ return `../src/libs/${library}`;

@@ -14,5 +14,2 @@ // Fork of https://github.com/floatdrop/require-from-string/blob/master/index.js

export function requireFromFile(filename) {
if (filename.startsWith('http')) {
throw new Error(`require from remote script not supported in Node.js: ${filename}`);
}
if (!filename.startsWith('/')) {

@@ -27,4 +24,3 @@ filename = `${process.cwd()}/${filename}`;

// - `filename` - Type: string - Default: '' - Optional filename.
// - `options.appendPaths` Type: Array List of paths, that will be appended to module paths.
// Useful, when you want to be able require modules from these paths.
// - `options.appendPaths` Type: Array List of paths, that will be appended to module paths. Useful, when you want to be able require modules from these paths.
// - `options.prependPaths` Type: Array Same as appendPaths, but paths will be prepended.

@@ -31,0 +27,0 @@ export function requireFromString(code, filename = '', options = {}) {

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc