@fast-china/utils 2.1.6 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +4 -2
- package/README.zh.md +4 -2
- package/THIRD_PARTY_LICENSES.md +26 -0
- package/dist/crypto/index.mjs +2240 -33
- package/dist/crypto/index.mjs.map +1 -1
- package/dist/dom/index.mjs +2 -0
- package/dist/env/index.mjs +4 -4
- package/dist/env/index.mjs.map +1 -1
- package/dist/index.d.mts +1918 -32
- package/dist/index.global.min.js +2 -2
- package/dist/index.global.min.js.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/internal/runtime.mjs +21 -1
- package/dist/internal/runtime.mjs.map +1 -1
- package/dist/logger/index.mjs +2 -2
- package/dist/logger/index.mjs.map +1 -1
- package/dist/storage/index.mjs +2 -2
- package/dist/storage/index.mjs.map +1 -1
- package/dist/string/index.mjs +2 -2
- package/dist/string/index.mjs.map +1 -1
- package/dist/vue/index.mjs +15 -0
- package/dist/vue/now.mjs +2 -2
- package/dist/vue/now.mjs.map +1 -1
- package/package.json +4 -6
- package/dist/array/index.d.mts +0 -94
- package/dist/async/index.d.mts +0 -145
- package/dist/base64/index.d.mts +0 -106
- package/dist/color/index.d.mts +0 -89
- package/dist/crypto/index.d.mts +0 -327
- package/dist/date/index.d.mts +0 -190
- package/dist/dom/style.d.mts +0 -29
- package/dist/env/index.d.mts +0 -62
- package/dist/function/index.d.mts +0 -13
- package/dist/identity/index.d.mts +0 -77
- package/dist/internal/text.d.mts +0 -15
- package/dist/logger/index.d.mts +0 -90
- package/dist/number/index.d.mts +0 -89
- package/dist/object/index.d.mts +0 -114
- package/dist/storage/index.d.mts +0 -115
- package/dist/string/index.d.mts +0 -141
- package/dist/vue/breakpoints.d.mts +0 -21
- package/dist/vue/element-size.d.mts +0 -25
- package/dist/vue/emits.d.mts +0 -23
- package/dist/vue/event-listener.d.mts +0 -16
- package/dist/vue/expose.d.mts +0 -11
- package/dist/vue/func.d.mts +0 -13
- package/dist/vue/index.d.mts +0 -15
- package/dist/vue/install.d.mts +0 -50
- package/dist/vue/now.d.mts +0 -13
- package/dist/vue/props.d.mts +0 -22
- package/dist/vue/render.d.mts +0 -11
- package/dist/vue/resize-observer.d.mts +0 -15
- package/dist/vue/slots.d.mts +0 -18
- package/dist/vue/window-size.d.mts +0 -16
- package/dist/vue/with.d.mts +0 -11
- package/docs/API.md +0 -155
- package/docs/API.zh-CN.md +0 -154
- package/docs/DEVELOPMENT_RELEASE.zh-CN.md +0 -65
- package/docs/RUNTIME_CONTRACT.md +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Fast.Utils are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [2.1.8] - 2026-09-14
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Resolved uni-app injected `uni` and App-Plus `plus` identifiers at call time, with `globalThis` property fallbacks, so supported runtime APIs remain detectable when the host does not expose them as global object properties.
|
|
10
|
+
|
|
11
|
+
## [2.1.7] - 2026-09-14
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Bundled CryptoJS into the ESM package output to avoid CommonJS subpath resolution failures in strict ESM and uni-app toolchains while preserving module-level tree-shaking.
|
|
16
|
+
|
|
5
17
|
## [2.1.6] - 2026-09-13
|
|
6
18
|
|
|
7
19
|
### Added
|
|
@@ -120,6 +132,8 @@ All notable changes to Fast.Utils are documented in this file.
|
|
|
120
132
|
|
|
121
133
|
- Added authenticated ciphertext validation, bounded crypto parameters and payloads, unbiased Web Crypto randomness, prototype-safe query/object transforms, and namespace-scoped Storage cleanup.
|
|
122
134
|
|
|
135
|
+
[2.1.8]: https://github.com/China-xiaoFang/Fast.Utils/compare/v2.1.7...v2.1.8
|
|
136
|
+
[2.1.7]: https://github.com/China-xiaoFang/Fast.Utils/compare/v2.1.6...v2.1.7
|
|
123
137
|
[2.1.6]: https://github.com/China-xiaoFang/Fast.Utils/compare/v2.1.5...v2.1.6
|
|
124
138
|
[2.1.5]: https://github.com/China-xiaoFang/Fast.Utils/compare/v2.1.4...v2.1.5
|
|
125
139
|
[2.1.4]: https://github.com/China-xiaoFang/Fast.Utils/compare/v2.1.3...v2.1.4
|
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ configureStorage({
|
|
|
59
59
|
});
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
The active global configuration is immutable. Repeating the same configuration is idempotent; a conflicting configuration throws. The `crypto` option on `set/get` overrides only that operation and must match when writing and reading the same entry; it does not mutate global configuration. A custom `codec` may be supplied instead of global `crypto`. In uni-app, `Local` automatically
|
|
62
|
+
The active global configuration is immutable. Repeating the same configuration is idempotent; a conflicting configuration throws. The `crypto` option on `set/get` overrides only that operation and must match when writing and reading the same entry; it does not mutate global configuration. A custom `codec` may be supplied instead of global `crypto`. In uni-app, `Local` automatically resolves the runtime-injected `uni` object and uses its synchronous Storage API; `Session` throws because uni-app has no sessionStorage equivalent. `clear()` removes only keys inside the active prefix.
|
|
63
63
|
|
|
64
64
|
## Base64
|
|
65
65
|
|
|
@@ -133,6 +133,8 @@ Base64 and Crypto text decoding/decryption functions return the primitive-string
|
|
|
133
133
|
|
|
134
134
|
Store passwords with `HashPasswordPBKDF2SHA256` and `VerifyPasswordPBKDF2SHA256`. MD5, SHA-1, AES-CBC, and AES-ECB do not provide password-storage or authenticated-encryption guarantees. See the [API reference](./docs/API.md#crypto) for the complete method list and security boundaries.
|
|
135
135
|
|
|
136
|
+
CryptoJS is bundled into the ESM and CDN artifacts for the compatibility hash and AES APIs. Consumers do not install or resolve `crypto-js` subpaths; applications that do not use Crypto APIs can still remove the independent crypto module through Tree Shaking.
|
|
137
|
+
|
|
136
138
|
## Vue 3
|
|
137
139
|
|
|
138
140
|
```ts
|
|
@@ -162,7 +164,7 @@ The `object` module includes dependency-free deep cloning and equality plus pred
|
|
|
162
164
|
- The package-manager entry is pure ESM; the CDN entry is a separately minified IIFE.
|
|
163
165
|
- ES2022 modern browsers and WebViews.
|
|
164
166
|
- Vue 3.5.11 or newer through a required peer dependency.
|
|
165
|
-
- uni-app through
|
|
167
|
+
- uni-app through call-time detection of runtime-injected `uni` and App-Plus `plus`, with global-property fallbacks.
|
|
166
168
|
- No import-time access to `window`, Storage, or `uni`; unsupported calls fail explicitly.
|
|
167
169
|
- Web Crypto, URL, Intl, TextEncoder, and related platform capabilities are not polyfilled.
|
|
168
170
|
|
package/README.zh.md
CHANGED
|
@@ -59,7 +59,7 @@ configureStorage({
|
|
|
59
59
|
});
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
激活后的全局配置不可变;相同配置重复调用保持幂等,不同配置会抛错。`set/get` 的 `crypto` 选项只覆盖单次操作,读写同一条目时必须保持一致,不会改变全局配置。自定义 `codec` 与全局 `crypto` 不能同时使用。uni-app 中 `Local`
|
|
62
|
+
激活后的全局配置不可变;相同配置重复调用保持幂等,不同配置会抛错。`set/get` 的 `crypto` 选项只覆盖单次操作,读写同一条目时必须保持一致,不会改变全局配置。自定义 `codec` 与全局 `crypto` 不能同时使用。uni-app 中 `Local` 会自动解析运行时注入的 `uni` 对象并使用其同步 Storage API;由于没有等价的 sessionStorage,`Session` 会明确抛错。`clear()` 只清理当前前缀。
|
|
63
63
|
|
|
64
64
|
## Base64
|
|
65
65
|
|
|
@@ -133,6 +133,8 @@ Base64 与 Crypto 的文本解码/解密入口返回原始字符串类型 `Decod
|
|
|
133
133
|
|
|
134
134
|
密码存储使用 `HashPasswordPBKDF2SHA256` 和 `VerifyPasswordPBKDF2SHA256`。MD5、SHA-1、AES-CBC 与 AES-ECB 不提供密码存储或认证加密保证。完整方法列表和安全边界见 [API 文档](./docs/API.zh-CN.md#crypto)。
|
|
135
135
|
|
|
136
|
+
兼容哈希与 AES API 使用的 CryptoJS 已内联到 ESM 和 CDN 产物,消费项目无需安装或解析 `crypto-js` 子路径;未使用 Crypto API 的应用仍可通过 Tree Shaking 移除独立的加密模块。
|
|
137
|
+
|
|
136
138
|
## Vue 3
|
|
137
139
|
|
|
138
140
|
```ts
|
|
@@ -162,7 +164,7 @@ useEventListener(document, "visibilitychange", () => console.log(document.visibi
|
|
|
162
164
|
- 包管理器入口为纯 ESM;CDN 入口为单独压缩的 IIFE。
|
|
163
165
|
- 面向 ES2022 现代浏览器与 WebView。
|
|
164
166
|
- Vue 3.5.11 及以上版本通过必须安装的 Peer Dependency 接入。
|
|
165
|
-
-
|
|
167
|
+
- 调用时检测运行时注入的 `uni` 和 App-Plus `plus`,并兼容对应全局属性。
|
|
166
168
|
- 导入阶段不访问 `window`、Storage 或 `uni`;不支持的调用明确失败。
|
|
167
169
|
- 不注入 Web Crypto、URL、Intl、TextEncoder 等 Polyfill。
|
|
168
170
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Third-Party Licenses
|
|
2
|
+
|
|
3
|
+
## CryptoJS
|
|
4
|
+
|
|
5
|
+
CryptoJS is licensed under the MIT License.
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2009-2013 Jeff Mott
|
|
8
|
+
Copyright (c) 2013-2016 Evan Vosberg
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in
|
|
18
|
+
all copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
26
|
+
THE SOFTWARE.
|