@reteps/dockerfmt 0.2.5 → 0.2.6

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/format.js CHANGED
@@ -10,7 +10,7 @@ export const formatDockerfileContents = async (fileContents, options, getWasm) =
10
10
  * Do not await this promise, because it only resolves once the go main()
11
11
  * function has exited. But we need the main function to stay alive to be
12
12
  * able to call the `parse` and `print` function.
13
- */
13
+ */
14
14
  go.run(wasm.instance);
15
15
  const { memory, malloc, free, formatBytes } = wasm.instance.exports;
16
16
  const fileBufferBytes = encoder.encode(fileContents);
package/dist/format.wasm CHANGED
Binary file
package/dist/node.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FormatOptions } from "./format.js";
1
+ import { FormatOptions } from './format.js';
2
2
  export declare const formatDockerfileContents: (fileContents: string, options: FormatOptions) => Promise<string>;
3
3
  export declare const formatDockerfile: (fileName: string, options: FormatOptions) => Promise<string>;
4
4
  export { FormatOptions };
package/dist/node.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
- import { formatDockerfileContents as formatDockerfileContents_ } from "./format.js";
4
+ import { formatDockerfileContents as formatDockerfileContents_, } from './format.js';
5
5
  const getWasm = () => {
6
6
  return fs.readFile(path.resolve(path.dirname(fileURLToPath(import.meta.url)), 'format.wasm'));
7
7
  };
package/package.json CHANGED
@@ -1,18 +1,11 @@
1
1
  {
2
2
  "name": "@reteps/dockerfmt",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1",
7
- "//": "Requires tinygo 0.38.0 or later",
8
- "build-go": "tinygo build -o format.wasm -target wasm --no-debug",
9
- "build-js": "tsc && cp format.wasm wasm_exec.js dist",
10
- "build": "npm run build-go && npm run build-js"
11
- },
12
- "files": [
13
- "dist"
14
- ],
15
- "browser": "dist/format.js",
5
+ "description": "",
6
+ "repository": "git+https://github.com/reteps/dockerfmt/tree/main/js",
7
+ "author": "Peter Stenger <pete@stenger.io>",
8
+ "license": "MIT",
16
9
  "main": "dist/node.js",
17
10
  "types": "dist/node.d.ts",
18
11
  "exports": {
@@ -22,17 +15,25 @@
22
15
  "default": "./dist/node.js"
23
16
  },
24
17
  "./format.wasm": "./dist/format.wasm",
18
+ "./package.json": "./package.json",
25
19
  "./wasm_exec": "./dist/wasm_exec.js",
26
20
  "./wasm_exec.js": "./dist/wasm_exec.js"
27
21
  },
28
- "author": "Peter Stenger <pete@stenger.io>",
29
- "repository": "git+https://github.com/reteps/dockerfmt/tree/main/js",
30
- "license": "MIT",
31
- "description": "",
32
- "devDependencies": {
33
- "@types/node": "^22.14.0"
22
+ "browser": "dist/format.js",
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "scripts": {
27
+ "//": "Requires tinygo 0.38.0 or later",
28
+ "build": "npm run build-go && npm run build-js",
29
+ "build-go": "tinygo build -o format.wasm -target wasm --no-debug -scheduler=none",
30
+ "build-js": "tsc && cp format.wasm wasm_exec.js dist",
31
+ "format": "prettier --write \"**/*.{js,ts,json}\""
34
32
  },
35
- "dependencies": {
33
+ "devDependencies": {
34
+ "@types/node": "^22.14.0",
35
+ "prettier": "^3.5.3",
36
+ "prettier-plugin-pkg": "^0.19.0",
36
37
  "typescript": "^5.8.3"
37
38
  }
38
39
  }