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

@khanacademy/perseus-core

Package Overview
Dependencies
Maintainers
1
Versions
282
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanacademy/perseus-core - npm Package Compare versions

Comparing version 0.0.0-PR745-20231003224747 to 0.0.0-PR745-20231004184637

dist/utils/add-library-version-to-perseus-debug.d.ts

4

CHANGELOG.md
# @khanacademy/perseus-core
## 0.0.0-PR745-20231003224747
## 0.0.0-PR745-20231004184637
### Patch Changes
- dc6c6973: Print package name and version when loaded in the page
- 9473a2b8: Print package name and version when loaded in the page

@@ -9,0 +9,0 @@ ## 1.1.0

@@ -18,10 +18,26 @@ import { addLibraryVersionToPerseusDebug as addLibraryVersionToPerseusDebug$1 } from '@khanacademy/perseus-core';

}
const s = `${prefix}${libraryVersion}`;
if (globalThis) {
const formattedVersion = `${prefix}${libraryVersion}`;
if (typeof globalThis !== "undefined") {
var _globalThis$__perseus;
globalThis.__perseus_debug__ = (_globalThis$__perseus = globalThis.__perseus_debug__) != null ? _globalThis$__perseus : {};
globalThis.__perseus_debug__[libraryName] = s;
const existingVersionEntry = globalThis.__perseus_debug__[libraryName];
if (existingVersionEntry) {
// If we already have an entry and it doesn't match the registered
// version, we morph the entry into an array and log a warning.
if (existingVersionEntry !== formattedVersion) {
// Existing entry might be an array already (oops, at least 2
// versions of the library already loaded!).
const allVersions = Array.isArray(existingVersionEntry) ? existingVersionEntry : [existingVersionEntry];
allVersions.push(formattedVersion);
globalThis.__perseus_debug__[libraryName] = allVersions;
// eslint-disable-next-line no-console
console.warn(`Multiple versions of ${libraryName} loaded on this page: ${allVersions.sort().join(", ")}`);
}
} else {
globalThis.__perseus_debug__[libraryName] = formattedVersion;
}
} else {
// eslint-disable-next-line no-console
console.warn(`globalThis not found found (${s})`);
console.warn(`globalThis not found found (${formattedVersion})`);
}

@@ -28,0 +44,0 @@ };

export type { PerseusAnalyticsEvent, AnalyticsEventHandlerFn } from "./analytics";
export type { KEScore, KeypadContextRendererInterface, RendererInterface, } from "./types";
export { addLibraryVersionToPerseusDebug } from "./utils/add-library-version-To-perseus-debug";
export { addLibraryVersionToPerseusDebug } from "./utils/add-library-version-to-perseus-debug";
export { libVersion } from "./version";

@@ -22,10 +22,26 @@ 'use strict';

}
const s = "".concat(prefix).concat(libraryVersion);
if (globalThis) {
const formattedVersion = "".concat(prefix).concat(libraryVersion);
if (typeof globalThis !== "undefined") {
var _globalThis$__perseus;
globalThis.__perseus_debug__ = (_globalThis$__perseus = globalThis.__perseus_debug__) !== null && _globalThis$__perseus !== void 0 ? _globalThis$__perseus : {};
globalThis.__perseus_debug__[libraryName] = s;
const existingVersionEntry = globalThis.__perseus_debug__[libraryName];
if (existingVersionEntry) {
// If we already have an entry and it doesn't match the registered
// version, we morph the entry into an array and log a warning.
if (existingVersionEntry !== formattedVersion) {
// Existing entry might be an array already (oops, at least 2
// versions of the library already loaded!).
const allVersions = Array.isArray(existingVersionEntry) ? existingVersionEntry : [existingVersionEntry];
allVersions.push(formattedVersion);
globalThis.__perseus_debug__[libraryName] = allVersions;
// eslint-disable-next-line no-console
console.warn("Multiple versions of ".concat(libraryName, " loaded on this page: ").concat(allVersions.sort().join(", ")));
}
} else {
globalThis.__perseus_debug__[libraryName] = formattedVersion;
}
} else {
// eslint-disable-next-line no-console
console.warn("globalThis not found found (".concat(s, ")"));
console.warn("globalThis not found found (".concat(formattedVersion, ")"));
}

@@ -32,0 +48,0 @@ };

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "0.0.0-PR745-20231003224747",
"version": "0.0.0-PR745-20231004184637",
"publishConfig": {

@@ -9,0 +9,0 @@ "access": "public"

@@ -9,4 +9,4 @@ export type {PerseusAnalyticsEvent, AnalyticsEventHandlerFn} from "./analytics";

// Careful, `version.ts` uses this function so it _must_ be imported above it
export {addLibraryVersionToPerseusDebug} from "./utils/add-library-version-To-perseus-debug";
export {addLibraryVersionToPerseusDebug} from "./utils/add-library-version-to-perseus-debug";
export {libVersion} from "./version";

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