fix(build): modernize project tooling and tighten TypeScript typings
This commit is contained in:
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"@git.zone/cli": {
|
||||||
|
"projectType": "npm",
|
||||||
|
"module": {
|
||||||
|
"githost": "code.foss.global",
|
||||||
|
"gitscope": "push.rocks",
|
||||||
|
"gitrepo": "smartbuffer",
|
||||||
|
"shortDescription": "binary data utilities",
|
||||||
|
"npmPackagename": "@push.rocks/smartbuffer",
|
||||||
|
"license": "MIT",
|
||||||
|
"description": "A robust TypeScript library for managing binary data by converting between Base64 strings and Uint8Array, validating buffer-like objects, and ensuring data purity.",
|
||||||
|
"keywords": [
|
||||||
|
"ArrayBuffer",
|
||||||
|
"Uint8Array",
|
||||||
|
"base64 conversion",
|
||||||
|
"binary data handling",
|
||||||
|
"buffer validation",
|
||||||
|
"TypeScript",
|
||||||
|
"data transformation",
|
||||||
|
"ESM",
|
||||||
|
"utilities",
|
||||||
|
"npm"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"release": {
|
||||||
|
"registries": [
|
||||||
|
"https://verdaccio.lossless.digital",
|
||||||
|
"https://registry.npmjs.org"
|
||||||
|
],
|
||||||
|
"accessLevel": "public"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@git.zone/tsdoc": {
|
||||||
|
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||||
|
},
|
||||||
|
"@ship.zone/szci": {
|
||||||
|
"npmGlobalTools": [],
|
||||||
|
"npmRegistryUrl": "registry.npmjs.org"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-05-01 - 3.0.6 - fix(build)
|
||||||
|
modernize project tooling and tighten TypeScript typings
|
||||||
|
|
||||||
|
- migrate project metadata to the current @git.zone and @ship.zone configuration format
|
||||||
|
- update build, test, and documentation scripts to the newer toolchain
|
||||||
|
- replace tapbundle test imports with @git.zone/tstest and export tap.start() for the updated test runner
|
||||||
|
- enable noImplicitAny and node types while refining buffer utility parameter types from any to unknown
|
||||||
|
|
||||||
## 2025-04-12 - 3.0.5 - fix(documentation)
|
## 2025-04-12 - 3.0.5 - fix(documentation)
|
||||||
Enhance documentation with extensive usage examples, update project metadata, and remove obsolete CI configuration
|
Enhance documentation with extensive usage examples, update project metadata, and remove obsolete CI configuration
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2022 Lossless GmbH (hello@lossless.com)
|
Copyright (c) 2022 Task Venture Capital GmbH <hello@task.vc>
|
||||||
Copyright 2011 Jon Leighton
|
Copyright 2011 Jon Leighton
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
@@ -17,4 +17,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|||||||
+16
-9
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"gitzone": {
|
"@git.zone/cli": {
|
||||||
"projectType": "npm",
|
"projectType": "npm",
|
||||||
"module": {
|
"module": {
|
||||||
"githost": "code.foss.global",
|
"githost": "code.foss.global",
|
||||||
"gitscope": "push.rocks",
|
"gitscope": "push.rocks",
|
||||||
"gitrepo": "smartbuffer",
|
"gitrepo": "smartbuffer",
|
||||||
"description": "A robust TypeScript library for managing binary data by converting between Base64 strings and Uint8Array, validating buffer-like objects, and ensuring data purity.",
|
"shortDescription": "binary data utilities",
|
||||||
"npmPackagename": "@push.rocks/smartbuffer",
|
"npmPackagename": "@push.rocks/smartbuffer",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "push.rocks",
|
"description": "A robust TypeScript library for managing binary data by converting between Base64 strings and Uint8Array, validating buffer-like objects, and ensuring data purity.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ArrayBuffer",
|
"ArrayBuffer",
|
||||||
"Uint8Array",
|
"Uint8Array",
|
||||||
@@ -21,13 +21,20 @@
|
|||||||
"utilities",
|
"utilities",
|
||||||
"npm"
|
"npm"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"release": {
|
||||||
|
"registries": [
|
||||||
|
"https://verdaccio.lossless.digital",
|
||||||
|
"https://registry.npmjs.org"
|
||||||
|
],
|
||||||
|
"accessLevel": "public"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmci": {
|
"@git.zone/tsdoc": {
|
||||||
"npmGlobalTools": [],
|
|
||||||
"npmAccessLevel": "public"
|
|
||||||
},
|
|
||||||
"tsdoc": {
|
|
||||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||||
|
},
|
||||||
|
"@ship.zone/szci": {
|
||||||
|
"npmGlobalTools": [],
|
||||||
|
"npmRegistryUrl": "registry.npmjs.org"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-10
@@ -6,19 +6,20 @@
|
|||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"author": "Lossless GmbH",
|
"author": "Task Venture Capital GmbH <hello@task.vc>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/ --web)",
|
"test": "tstest test/ --web",
|
||||||
"build": "(tsbuild --web --allowimplicitany)"
|
"format": "gitzone format",
|
||||||
|
"build": "tsbuild --web",
|
||||||
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^2.1.25",
|
"@git.zone/tsbuild": "^4.4.0",
|
||||||
"@git.zone/tsbundle": "^2.0.5",
|
"@git.zone/tsbundle": "^2.10.1",
|
||||||
"@git.zone/tsrun": "^1.2.46",
|
"@git.zone/tsrun": "^2.0.3",
|
||||||
"@git.zone/tstest": "^1.0.44",
|
"@git.zone/tstest": "^3.6.3",
|
||||||
"@push.rocks/tapbundle": "^5.0.8",
|
"@types/node": "^25.6.0"
|
||||||
"@types/node": "^20.11.20"
|
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
@@ -32,6 +33,8 @@
|
|||||||
"dist_ts_web/**/*",
|
"dist_ts_web/**/*",
|
||||||
"assets/**/*",
|
"assets/**/*",
|
||||||
"cli.js",
|
"cli.js",
|
||||||
|
".smartconfig.json",
|
||||||
|
"license",
|
||||||
"npmextra.json",
|
"npmextra.json",
|
||||||
"readme.md"
|
"readme.md"
|
||||||
],
|
],
|
||||||
@@ -48,7 +51,7 @@
|
|||||||
"npm"
|
"npm"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"uint8array-extras": "^1.1.0"
|
"uint8array-extras": "^1.5.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://code.foss.global/push.rocks/smartbuffer",
|
"homepage": "https://code.foss.global/push.rocks/smartbuffer",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Generated
+3359
-5353
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
import { expect, expectAsync, tap } from '@push.rocks/tapbundle';
|
import { expect, tap } from '@git.zone/tstest/tapbundle';
|
||||||
import * as smartbuffer from '../ts/index.js';
|
import * as smartbuffer from '../ts/index.js';
|
||||||
|
|
||||||
tap.test('first test', async () => {
|
tap.test('first test', async () => {
|
||||||
@@ -18,4 +18,4 @@ tap.test('should recognize different buffer like objects', async () => {
|
|||||||
expect(smartbuffer.isBufferLike(testUint8Array)).toBeTrue();
|
expect(smartbuffer.isBufferLike(testUint8Array)).toBeTrue();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.start();
|
export default tap.start();
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartbuffer',
|
name: '@push.rocks/smartbuffer',
|
||||||
version: '3.0.5',
|
version: '3.0.6',
|
||||||
description: 'A robust TypeScript library for managing binary data by converting between Base64 strings and Uint8Array, validating buffer-like objects, and ensuring data purity.'
|
description: 'A robust TypeScript library for managing binary data by converting between Base64 strings and Uint8Array, validating buffer-like objects, and ensuring data purity.'
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -10,13 +10,13 @@ export function base64ToUint8Array(base64: string): Uint8Array {
|
|||||||
return plugins.uInt8ArrayExtras.base64ToUint8Array(base64);
|
return plugins.uInt8ArrayExtras.base64ToUint8Array(base64);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isUint8Array = (obj: any): obj is Uint8Array => {
|
export const isUint8Array = (obj: unknown): obj is Uint8Array => {
|
||||||
return plugins.uInt8ArrayExtras.isUint8Array(obj);
|
return plugins.uInt8ArrayExtras.isUint8Array(obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
export function isBufferLike(obj: any): obj is ArrayBufferLike | Buffer {
|
export function isBufferLike(obj: unknown): obj is ArrayBufferLike | Buffer {
|
||||||
// Check for ArrayBufferLike objects in any environment
|
// Check for ArrayBufferLike objects in any environment
|
||||||
if (obj && typeof obj.byteLength === 'number') {
|
if (obj && typeof (obj as { byteLength?: unknown }).byteLength === 'number') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ import * as uInt8ArrayExtras from 'uint8array-extras';
|
|||||||
|
|
||||||
export {
|
export {
|
||||||
uInt8ArrayExtras,
|
uInt8ArrayExtras,
|
||||||
}
|
};
|
||||||
|
|||||||
+4
-4
@@ -5,10 +5,10 @@
|
|||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "NodeNext",
|
"module": "NodeNext",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
|
"noImplicitAny": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"verbatimModuleSyntax": true
|
"verbatimModuleSyntax": true,
|
||||||
|
"types": ["node"]
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": ["dist_*/**/*.d.ts"]
|
||||||
"dist_*/**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user