@serwist/build 9.0.0-preview.14 → 9.0.0-preview.16

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/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import stringify from 'fast-json-stable-stringify';
2
2
  export { default as stringify } from 'fast-json-stable-stringify';
3
- import assert from 'assert';
3
+ import assert from 'node:assert';
4
4
  import { oneLine } from 'common-tags';
5
- import crypto from 'crypto';
5
+ import crypto from 'node:crypto';
6
6
  import { globSync } from 'glob';
7
7
  import upath from 'upath';
8
8
  import fse from 'fs-extra';
@@ -1,13 +1,11 @@
1
1
  import type { ManifestEntry } from "../types.js";
2
- type AdditionalManifestEntriesTransform = {
3
- (manifest: (ManifestEntry & {
2
+ type AdditionalManifestEntriesTransform = (manifest: (ManifestEntry & {
3
+ size: number;
4
+ })[]) => {
5
+ manifest: (ManifestEntry & {
4
6
  size: number;
5
- })[]): {
6
- manifest: (ManifestEntry & {
7
- size: number;
8
- })[];
9
- warnings: string[];
10
- };
7
+ })[];
8
+ warnings: string[];
11
9
  };
12
10
  export declare const additionalPrecacheEntriesTransform: (additionalPrecacheEntries: (ManifestEntry | string)[]) => AdditionalManifestEntriesTransform;
13
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"additional-precache-entries-transform.d.ts","sourceRoot":"","sources":["../../src/lib/additional-precache-entries-transform.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,KAAK,kCAAkC,GAAG;IACxC,CACE,QAAQ,EAAE,CAAC,aAAa,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,GAC7C;QACD,QAAQ,EAAE,CAAC,aAAa,GAAG;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,EAAE,CAAC;QAC/C,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,kCAAkC,8BAA+B,CAAC,aAAa,GAAG,MAAM,CAAC,EAAE,KAAG,kCAqC1G,CAAC"}
1
+ {"version":3,"file":"additional-precache-entries-transform.d.ts","sourceRoot":"","sources":["../../src/lib/additional-precache-entries-transform.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,KAAK,kCAAkC,GAAG,CAAC,QAAQ,EAAE,CAAC,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,KAAK;IAC5F,QAAQ,EAAE,CAAC,aAAa,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC/C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,kCAAkC,8BAA+B,CAAC,aAAa,GAAG,MAAM,CAAC,EAAE,KAAG,kCAqC1G,CAAC"}
@@ -1,4 +1,4 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
- import crypto from "crypto";
2
+ import crypto from "node:crypto";
3
3
  export declare function getStringHash(input: crypto.BinaryLike): string;
4
4
  //# sourceMappingURL=get-string-hash.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-string-hash.d.ts","sourceRoot":"","sources":["../../src/lib/get-string-hash.ts"],"names":[],"mappings":";AAQA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAI9D"}
1
+ {"version":3,"file":"get-string-hash.d.ts","sourceRoot":"","sources":["../../src/lib/get-string-hash.ts"],"names":[],"mappings":";AAQA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAI9D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/build",
3
- "version": "9.0.0-preview.14",
3
+ "version": "9.0.0-preview.16",
4
4
  "type": "module",
5
5
  "description": "A module that integrates into your build process, helping you generate a manifest of local files that should be precached.",
6
6
  "files": [
@@ -54,17 +54,17 @@
54
54
  "source-map": "0.8.0-beta.0",
55
55
  "upath": "2.0.1",
56
56
  "zod": "3.22.4",
57
- "@serwist/core": "9.0.0-preview.14"
57
+ "@serwist/core": "9.0.0-preview.16"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/common-tags": "1.8.4",
61
61
  "@types/fs-extra": "11.0.4",
62
- "@types/node": "20.11.26",
62
+ "@types/node": "20.11.30",
63
63
  "@types/stringify-object": "4.0.5",
64
- "type-fest": "4.12.0",
65
- "typescript": "5.5.0-dev.20240312",
66
- "@serwist/constants": "9.0.0-preview.14",
67
- "@serwist/utils": "9.0.0-preview.14"
64
+ "type-fest": "4.13.1",
65
+ "typescript": "5.5.0-dev.20240323",
66
+ "@serwist/constants": "9.0.0-preview.16",
67
+ "@serwist/utils": "9.0.0-preview.16"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "typescript": ">=5.0.0"
@@ -6,7 +6,7 @@
6
6
  https://opensource.org/licenses/MIT.
7
7
  */
8
8
 
9
- import assert from "assert";
9
+ import assert from "node:assert";
10
10
  import stringify from "fast-json-stable-stringify";
11
11
  import fse from "fs-extra";
12
12
  import type { RawSourceMap } from "source-map";
@@ -9,13 +9,9 @@
9
9
  import type { ManifestEntry } from "../types.js";
10
10
  import { errors } from "./errors.js";
11
11
 
12
- type AdditionalManifestEntriesTransform = {
13
- (
14
- manifest: (ManifestEntry & { size: number })[],
15
- ): {
16
- manifest: (ManifestEntry & { size: number })[];
17
- warnings: string[];
18
- };
12
+ type AdditionalManifestEntriesTransform = (manifest: (ManifestEntry & { size: number })[]) => {
13
+ manifest: (ManifestEntry & { size: number })[];
14
+ warnings: string[];
19
15
  };
20
16
 
21
17
  export const additionalPrecacheEntriesTransform = (additionalPrecacheEntries: (ManifestEntry | string)[]): AdditionalManifestEntriesTransform => {
@@ -6,7 +6,7 @@
6
6
  https://opensource.org/licenses/MIT.
7
7
  */
8
8
 
9
- import crypto from "crypto";
9
+ import crypto from "node:crypto";
10
10
 
11
11
  import type { FileDetails } from "../types.js";
12
12
 
@@ -6,7 +6,7 @@
6
6
  https://opensource.org/licenses/MIT.
7
7
  */
8
8
 
9
- import assert from "assert";
9
+ import assert from "node:assert";
10
10
 
11
11
  import type { FileDetails, GetManifestOptions, GetManifestResult } from "../types.js";
12
12
  import { errors } from "./errors.js";
@@ -6,7 +6,7 @@
6
6
  https://opensource.org/licenses/MIT.
7
7
  */
8
8
 
9
- import crypto from "crypto";
9
+ import crypto from "node:crypto";
10
10
 
11
11
  export function getStringHash(input: crypto.BinaryLike): string {
12
12
  const md5 = crypto.createHash("md5");
@@ -145,7 +145,7 @@ export async function transformManifest({
145
145
  let size = 0;
146
146
  for (const manifestEntry of transformedManifest as (ManifestEntry & { size?: number })[]) {
147
147
  size += manifestEntry.size || 0;
148
- // biome-ignore lint/performance/noDelete: I don't understand this part yet.
148
+ // biome-ignore lint/performance/noDelete: These values are no longer necessary.
149
149
  delete manifestEntry.size;
150
150
  }
151
151