@prairielearn/compiled-assets 2.0.2 → 2.0.4

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @prairielearn/compiled-assets
2
2
 
3
+ ## 2.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 098f581da: Upgrade all dependencies
8
+ - Updated dependencies [098f581da]
9
+ - @prairielearn/html@3.0.4
10
+
11
+ ## 2.0.3
12
+
13
+ ### Patch Changes
14
+
15
+ - 2b003b4d9: Upgrade all dependencies
16
+ - Updated dependencies [2b003b4d9]
17
+ - @prairielearn/html@3.0.3
18
+
3
19
  ## 2.0.2
4
20
 
5
21
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prairielearn/compiled-assets",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "main": "dist/index.js",
5
5
  "bin": "dist/cli.js",
6
6
  "repository": {
@@ -14,9 +14,9 @@
14
14
  "test": "mocha --no-config --require ts-node/register src/index.test.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@prairielearn/html": "^3.0.2",
18
- "commander": "^10.0.1",
19
- "esbuild": "^0.17.19",
17
+ "@prairielearn/html": "^3.0.4",
18
+ "commander": "^11.0.0",
19
+ "esbuild": "^0.18.17",
20
20
  "express": "^4.18.2",
21
21
  "express-static-gzip": "^2.1.7",
22
22
  "fs-extra": "^11.1.1",
@@ -26,12 +26,12 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "@prairielearn/tsconfig": "^0.0.0",
29
- "@types/node": "^18.16.16",
29
+ "@types/node": "^18.17.1",
30
30
  "chai": "^4.3.7",
31
31
  "get-port": "^5.1.1",
32
32
  "mocha": "^10.2.0",
33
- "node-fetch": "^2.6.11",
33
+ "node-fetch": "^2.6.12",
34
34
  "ts-node": "^10.9.1",
35
- "typescript": "^5.1.3"
35
+ "typescript": "^5.1.6"
36
36
  }
37
37
  }
package/src/cli.ts CHANGED
@@ -15,7 +15,7 @@ type CompressedSizes = Record<string, Record<string, number>>;
15
15
 
16
16
  async function writeCompressedAssets(
17
17
  destination: string,
18
- manifest: Record<string, string>
18
+ manifest: Record<string, string>,
19
19
  ): Promise<CompressedSizes> {
20
20
  const compressedSizes: CompressedSizes = {};
21
21
  await Promise.all(
@@ -31,7 +31,7 @@ async function writeCompressedAssets(
31
31
  gzip: gzipCompressed.length,
32
32
  brotli: brotliCompressed.length,
33
33
  };
34
- })
34
+ }),
35
35
  );
36
36
  return compressedSizes;
37
37
  }
package/src/index.test.ts CHANGED
@@ -70,7 +70,7 @@ async function testProject(options: CompiledAssetsOptions) {
70
70
  },
71
71
  {
72
72
  unsafeCleanup: true,
73
- }
73
+ },
74
74
  );
75
75
  }
76
76
 
package/src/index.ts CHANGED
@@ -123,7 +123,7 @@ export function handler(): RequestHandler {
123
123
  (proxyRes) => {
124
124
  res.writeHead(proxyRes.statusCode ?? 500, proxyRes.headers);
125
125
  proxyRes.pipe(res, { end: true });
126
- }
126
+ },
127
127
  );
128
128
  req.pipe(proxyReq, { end: true });
129
129
  };
@@ -201,7 +201,7 @@ async function buildAssets(sourceDirectory: string, buildDirectory: string) {
201
201
  function makeManifest(
202
202
  metafile: Metafile,
203
203
  sourceDirectory: string,
204
- buildDirectory: string
204
+ buildDirectory: string,
205
205
  ): Record<string, string> {
206
206
  const manifest: Record<string, string> = {};
207
207
  Object.entries(metafile.outputs).forEach(([outputPath, meta]) => {
@@ -216,7 +216,7 @@ function makeManifest(
216
216
 
217
217
  export async function build(
218
218
  sourceDirectory: string,
219
- buildDirectory: string
219
+ buildDirectory: string,
220
220
  ): Promise<AssetsManifest> {
221
221
  // Remove existing assets to ensure that no stale assets are left behind.
222
222
  await fs.remove(buildDirectory);
package/tsconfig.json CHANGED
@@ -3,6 +3,6 @@
3
3
  "compilerOptions": {
4
4
  "outDir": "./dist",
5
5
  "rootDir": "./src",
6
- "types": ["mocha"],
7
- },
6
+ "types": ["mocha"]
7
+ }
8
8
  }