chore: update to version 14.0.11 and align website URLs

This commit is contained in:
2026-01-11 11:34:13 +03:00
parent ef74383349
commit 19c8d69bd8
1499 changed files with 53633 additions and 89 deletions
+5
View File
@@ -0,0 +1,5 @@
export { packageInfo } from './packageInfo.js';
export declare const TextEncoder: {
new (): TextEncoder;
prototype: TextEncoder;
};
+4
View File
@@ -0,0 +1,4 @@
import { extractGlobal } from '@pezkuwi/x-global';
import { TextEncoder as Fallback } from './fallback.js';
export { packageInfo } from './packageInfo.js';
export const TextEncoder = /*#__PURE__*/ extractGlobal('TextEncoder', Fallback);
+5
View File
@@ -0,0 +1,5 @@
export { packageInfo } from './packageInfo.js';
export declare const TextEncoder: {
new (): TextEncoder;
prototype: TextEncoder;
};
+8
View File
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextEncoder = exports.packageInfo = void 0;
const x_global_1 = require("@pezkuwi/x-global");
const fallback_js_1 = require("./fallback.js");
var packageInfo_js_1 = require("./packageInfo.js");
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
exports.TextEncoder = (0, x_global_1.extractGlobal)('TextEncoder', fallback_js_1.TextEncoder);
+3
View File
@@ -0,0 +1,3 @@
export declare class TextEncoder {
encode(value: string): Uint8Array;
}
+14
View File
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextEncoder = void 0;
class TextEncoder {
encode(value) {
const count = value.length;
const u8a = new Uint8Array(count);
for (let i = 0; i < count; i++) {
u8a[i] = value.charCodeAt(i);
}
return u8a;
}
}
exports.TextEncoder = TextEncoder;
+5
View File
@@ -0,0 +1,5 @@
export { packageInfo } from './packageInfo.js';
export declare const TextEncoder: {
new (): TextEncoder;
prototype: TextEncoder;
};
+19
View File
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextEncoder = exports.packageInfo = void 0;
const tslib_1 = require("tslib");
const node_util_1 = tslib_1.__importDefault(require("node:util"));
const x_global_1 = require("@pezkuwi/x-global");
var packageInfo_js_1 = require("./packageInfo.js");
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
class Fallback {
#encoder;
constructor() {
this.#encoder = new node_util_1.default.TextEncoder();
}
// For a Jest 26.0.1 environment, Buffer !== Uint8Array
encode(value) {
return Uint8Array.from(this.#encoder.encode(value));
}
}
exports.TextEncoder = (0, x_global_1.extractGlobal)('TextEncoder', Fallback);
+3
View File
@@ -0,0 +1,3 @@
{
"type": "commonjs"
}
+6
View File
@@ -0,0 +1,6 @@
export declare const packageInfo: {
name: string;
path: string;
type: string;
version: string;
};
@@ -0,0 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.packageInfo = void 0;
exports.packageInfo = { name: '@pezkuwi/x-textencoder', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '14.0.10' };
+1
View File
@@ -0,0 +1 @@
export * from './browser.js';
+4
View File
@@ -0,0 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./browser.js"), exports);
+1
View File
@@ -0,0 +1 @@
export {};
+5
View File
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const x_global_1 = require("@pezkuwi/x-global");
const x_textencoder_1 = require("@pezkuwi/x-textencoder");
(0, x_global_1.exposeGlobal)('TextEncoder', x_textencoder_1.TextEncoder);
+1
View File
@@ -0,0 +1 @@
export {};
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const browser_js_1 = require("./browser.js");
const node_js_1 = require("./node.js");
console.log(new browser_js_1.TextEncoder().encode('abc'));
console.log(new node_js_1.TextEncoder().encode('abc'));
+3
View File
@@ -0,0 +1,3 @@
export declare class TextEncoder {
encode(value: string): Uint8Array;
}
+10
View File
@@ -0,0 +1,10 @@
export class TextEncoder {
encode(value) {
const count = value.length;
const u8a = new Uint8Array(count);
for (let i = 0; i < count; i++) {
u8a[i] = value.charCodeAt(i);
}
return u8a;
}
}
+5
View File
@@ -0,0 +1,5 @@
export { packageInfo } from './packageInfo.js';
export declare const TextEncoder: {
new (): TextEncoder;
prototype: TextEncoder;
};
+14
View File
@@ -0,0 +1,14 @@
import util from 'node:util';
import { extractGlobal } from '@pezkuwi/x-global';
export { packageInfo } from './packageInfo.js';
class Fallback {
#encoder;
constructor() {
this.#encoder = new util.TextEncoder();
}
// For a Jest 26.0.1 environment, Buffer !== Uint8Array
encode(value) {
return Uint8Array.from(this.#encoder.encode(value));
}
}
export const TextEncoder = /*#__PURE__*/ extractGlobal('TextEncoder', Fallback);
+186 -5
View File
@@ -15,12 +15,193 @@
},
"sideEffects": false,
"type": "module",
"version": "14.0.10",
"browser": "browser.js",
"main": "node.js",
"react-native": "react-native.js",
"version": "14.0.11",
"main": "./cjs/node.js",
"module": "./node.js",
"browser": "./cjs/browser.js",
"react-native": "./cjs/react-native.js",
"types": "./node.d.ts",
"exports": {
"./cjs/package.json": "./cjs/package.json",
"./cjs/*": "./cjs/*.js",
".": {
"types": "./node.d.ts",
"react-native": {
"module": {
"types": "./react-native.d.ts",
"default": "./react-native.js"
},
"require": {
"types": "./cjs/react-native.d.ts",
"default": "./cjs/react-native.js"
},
"default": {
"types": "./react-native.d.ts",
"default": "./react-native.js"
}
},
"browser": {
"module": {
"types": "./browser.d.ts",
"default": "./browser.js"
},
"require": {
"types": "./cjs/browser.d.ts",
"default": "./cjs/browser.js"
},
"default": {
"types": "./browser.d.ts",
"default": "./browser.js"
}
},
"node": {
"module": {
"types": "./node.d.ts",
"default": "./node.js"
},
"require": {
"types": "./cjs/node.d.ts",
"default": "./cjs/node.js"
},
"default": {
"types": "./node.d.ts",
"default": "./node.js"
}
}
},
"./browser": {
"module": {
"types": "./browser.d.ts",
"default": "./browser.js"
},
"require": {
"types": "./cjs/browser.d.ts",
"default": "./cjs/browser.js"
},
"default": {
"types": "./browser.d.ts",
"default": "./browser.js"
}
},
"./fallback": {
"module": {
"types": "./fallback.d.ts",
"default": "./fallback.js"
},
"require": {
"types": "./cjs/fallback.d.ts",
"default": "./cjs/fallback.js"
},
"default": {
"types": "./fallback.d.ts",
"default": "./fallback.js"
}
},
"./node": {
"module": {
"types": "./node.d.ts",
"default": "./node.js"
},
"require": {
"types": "./cjs/node.d.ts",
"default": "./cjs/node.js"
},
"default": {
"types": "./node.d.ts",
"default": "./node.js"
}
},
"./package.json": {
"require": "./cjs/package.json",
"default": "./package.json"
},
"./packageInfo.js": {
"module": {
"types": "./packageInfo.d.ts",
"default": "./packageInfo.js"
},
"require": {
"types": "./cjs/packageInfo.d.ts",
"default": "./cjs/packageInfo.js"
},
"default": {
"types": "./packageInfo.d.ts",
"default": "./packageInfo.js"
}
},
"./packageInfo": {
"module": {
"types": "./packageInfo.d.ts",
"default": "./packageInfo.js"
},
"require": {
"types": "./cjs/packageInfo.d.ts",
"default": "./cjs/packageInfo.js"
},
"default": {
"types": "./packageInfo.d.ts",
"default": "./packageInfo.js"
}
},
"./react-native": {
"module": {
"types": "./react-native.d.ts",
"default": "./react-native.js"
},
"require": {
"types": "./cjs/react-native.d.ts",
"default": "./cjs/react-native.js"
},
"default": {
"types": "./react-native.d.ts",
"default": "./react-native.js"
}
},
"./shim.js": {
"module": {
"types": "./shim.d.ts",
"default": "./shim.js"
},
"require": {
"types": "./cjs/shim.d.ts",
"default": "./cjs/shim.js"
},
"default": {
"types": "./shim.d.ts",
"default": "./shim.js"
}
},
"./shim": {
"module": {
"types": "./shim.d.ts",
"default": "./shim.js"
},
"require": {
"types": "./cjs/shim.d.ts",
"default": "./cjs/shim.js"
},
"default": {
"types": "./shim.d.ts",
"default": "./shim.js"
}
},
"./typeCheck": {
"module": {
"types": "./typeCheck.d.ts",
"default": "./typeCheck.js"
},
"require": {
"types": "./cjs/typeCheck.d.ts",
"default": "./cjs/typeCheck.js"
},
"default": {
"types": "./typeCheck.d.ts",
"default": "./typeCheck.js"
}
}
},
"dependencies": {
"@pezkuwi/x-global": "workspace:*",
"@pezkuwi/x-global": "14.0.11",
"tslib": "^2.8.0"
}
}
+6
View File
@@ -0,0 +1,6 @@
export declare const packageInfo: {
name: string;
path: string;
type: string;
version: string;
};
+1
View File
@@ -0,0 +1 @@
export const packageInfo = { name: '@pezkuwi/x-textencoder', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.10' };
+1
View File
@@ -0,0 +1 @@
export * from './browser.js';
+1
View File
@@ -0,0 +1 @@
export * from './browser.js';
+1
View File
@@ -0,0 +1 @@
export {};
+3
View File
@@ -0,0 +1,3 @@
import { exposeGlobal } from '@pezkuwi/x-global';
import { TextEncoder } from '@pezkuwi/x-textencoder';
exposeGlobal('TextEncoder', TextEncoder);
+1
View File
@@ -0,0 +1 @@
export {};
+4
View File
@@ -0,0 +1,4 @@
import { TextEncoder as BrowserTE } from './browser.js';
import { TextEncoder as NodeTE } from './node.js';
console.log(new BrowserTE().encode('abc'));
console.log(new NodeTE().encode('abc'));