@ferscloud/fers-calculation 0.2.61 → 0.2.63

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/README.md CHANGED
@@ -20,17 +20,26 @@ npm install @ferscloud/fers-calculation
20
20
  **Vite**
21
21
 
22
22
  ```bash
23
- npm i -D vite-plugin-wasm vite-plugin-top-level-await
23
+ npm i -D vite-plugin-wasm
24
24
  ```
25
25
 
26
26
  ```ts
27
27
  // vite.config.ts
28
28
  import wasm from "vite-plugin-wasm";
29
- import topLevelAwait from "vite-plugin-top-level-await";
30
29
 
31
- export default { plugins: [wasm(), topLevelAwait()] };
30
+ // The package initialises with a top-level await, so the build target has to
31
+ // be one that supports it. `esnext` needs no second plugin.
32
+ export default {
33
+ plugins: [wasm()],
34
+ build: { target: "esnext" },
35
+ };
32
36
  ```
33
37
 
38
+ `esnext` keeps the top-level await in the output, which needs Chrome, Edge or
39
+ Firefox 89+, or Safari 15+. If you still have `vite-plugin-top-level-await` in
40
+ your config from an earlier version of this README, drop it — recent
41
+ `@swc/core` releases make it fail at `vite build`.
42
+
34
43
  **Next.js / webpack**
35
44
 
36
45
  ```js
@@ -202,6 +211,10 @@ const credit = fersAttributionHtml(res);
202
211
  exported. All of them accept the envelope, the parsed model or the results
203
212
  bundle, and all return nothing for a Pro result or an error envelope.
204
213
 
214
+ On 0.2.61 this subpath resolved only under a bundler; plain Node ESM needed
215
+ `/badge.js`. From 0.2.62 the package ships an `exports` map and both forms work
216
+ everywhere.
217
+
205
218
  Using the free tier in an application? Please display the credit. It is the
206
219
  only thing the free tier asks of you.
207
220
 
@@ -129,7 +129,7 @@ exports.wasm_init = wasm_init;
129
129
  function __wbg_get_imports() {
130
130
  const import0 = {
131
131
  __proto__: null,
132
- __wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
132
+ __wbg___wbindgen_throw_5d9e815e6fdf150f: function(arg0, arg1) {
133
133
  throw new Error(getStringFromWasm0(arg0, arg1));
134
134
  },
135
135
  __wbg_error_757e9472f8410341: function(arg0, arg1) {
@@ -147,7 +147,7 @@ function __wbg_get_imports() {
147
147
  const ret = new Error();
148
148
  return ret;
149
149
  },
150
- __wbg_now_8b265300afd5f2b9: function() {
150
+ __wbg_now_d1fb6650485d7f3e: function() {
151
151
  const ret = Date.now();
152
152
  return ret;
153
153
  },
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferscloud/fers-calculation",
3
- "version": "0.2.61",
3
+ "version": "0.2.63",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",