lzma1 0.0.2 → 0.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/package.json CHANGED
@@ -1,14 +1,19 @@
1
1
  {
2
2
  "name": "lzma1",
3
- "version": "0.0.2",
3
+ "type": "module",
4
+ "version": "0.0.4",
4
5
  "license": "Apache-2.0",
5
- "author": "Filip Seman <filip.seman@pm.me>",
6
+ "authors": [
7
+ "Filip Seman <filip.seman@pm.me>",
8
+ "Nathan Rugg <nmrugg@gmail.com> - Original library"
9
+ ],
6
10
  "description": "A JavaScript implementation of the Lempel-Ziv-Markov (LZMA) chain compression algorithm",
7
11
  "funding": "https://github.com/sponsors/xseman",
8
12
  "homepage": "https://github.com/xseman/lzma1#readme",
9
13
  "keywords": [
10
14
  "lzma",
11
15
  "lzma1",
16
+ "lzma alone",
12
17
  "compression",
13
18
  "decompression"
14
19
  ],
@@ -17,37 +22,36 @@
17
22
  "url": "git+https://github.com/xseman/lzma1.git"
18
23
  },
19
24
  "scripts": {
20
- "test": "node --test --test-reporter=spec --loader=tsx ./*.test.ts",
21
- "test:watch": "node --test --watch --test-reporter=spec --loader=tsx ./*.test.ts",
25
+ "prebuild": "tsc --build --clean",
26
+ "build": "tsc",
27
+ "fmt": "dprint fmt",
28
+ "fmt:check": "dprint check",
22
29
  "typecheck": "tsc --noEmit",
23
- "prebuild": "make prebuild",
24
- "build": "make build",
25
- "postbuild": "make postbuild",
26
- "preversion": "git checkout develop",
27
- "version": "git commit -am ${npm_package_version}",
28
- "postversion": "npm run build && git flow release start v${npm_package_version}"
30
+ "version": "git checkout develop && npm test",
31
+ "postversion": "echo 'Now run npm run build && npm publish'",
32
+ "test": "TS_NODE_TRANSPILE_ONLY=true node --no-warnings --test --test-reporter=spec --loader=ts-node/esm ./*.test.ts",
33
+ "test:watch": "TS_NODE_TRANSPILE_ONLY=true node --no-warnings --test --watch --test-reporter=spec --loader=ts-node/esm ./*.test.ts"
29
34
  },
35
+ "dependencies": {},
30
36
  "devDependencies": {
31
- "@types/node": ">=16.17",
32
- "dprint": "~0.35.0",
33
- "tsx": "~3.12.0",
34
- "typescript": "~5.0.0"
37
+ "@types/node": ">=18.8",
38
+ "dprint": "~0.47.0",
39
+ "ts-node": "~10.9.0",
40
+ "typescript": "^5.7.0"
35
41
  },
36
- "type": "module",
37
- "main": "./lib/cjs/lzma.js",
38
- "module": "./lib/esm/lzma.js",
42
+ "types": "./dist/lzma.d.ts",
43
+ "module": "./dist/lzma.js",
39
44
  "exports": {
40
45
  ".": {
41
- "import": "./lib/esm/lzma.js",
42
- "require": "./lib/cjs/lzma.js",
43
- "types": "./lib/esm/lzma.d.ts"
46
+ "import": "./dist/lzma.js"
44
47
  }
45
48
  },
46
49
  "files": [
47
- "lib"
50
+ "dist",
51
+ "!dist/*.test.*"
48
52
  ],
49
53
  "engines": {
50
- "node": ">=14.16",
54
+ "node": ">=18.8",
51
55
  "npm": ">=7.0"
52
56
  }
53
57
  }
package/lib/cjs/lzma.d.ts DELETED
@@ -1,61 +0,0 @@
1
- /**
2
- * s - dictionary size
3
- * f - fb
4
- * m - matchFinder
5
- *
6
- * NOTE: Because some values are always the same, they have been removed.
7
- * lc is always 3
8
- * lp is always 0
9
- * pb is always 2
10
- */
11
- declare const ModeMap: {
12
- readonly 1: {
13
- readonly s: 16;
14
- readonly f: 64;
15
- readonly m: 0;
16
- };
17
- readonly 2: {
18
- readonly s: 20;
19
- readonly f: 64;
20
- readonly m: 0;
21
- };
22
- readonly 3: {
23
- readonly s: 19;
24
- readonly f: 64;
25
- readonly m: 1;
26
- };
27
- readonly 4: {
28
- readonly s: 20;
29
- readonly f: 64;
30
- readonly m: 1;
31
- };
32
- readonly 5: {
33
- readonly s: 21;
34
- readonly f: 128;
35
- readonly m: 1;
36
- };
37
- readonly 6: {
38
- readonly s: 22;
39
- readonly f: 128;
40
- readonly m: 1;
41
- };
42
- readonly 7: {
43
- readonly s: 23;
44
- readonly f: 128;
45
- readonly m: 1;
46
- };
47
- readonly 8: {
48
- readonly s: 24;
49
- readonly f: 255;
50
- readonly m: 1;
51
- };
52
- readonly 9: {
53
- readonly s: 25;
54
- readonly f: 255;
55
- readonly m: 1;
56
- };
57
- };
58
- type Modes = keyof typeof ModeMap;
59
- export declare function compress(data: string | Uint8Array | ArrayBuffer, mode?: Modes): Int8Array;
60
- export declare function decompress(bytearray: Uint8Array | ArrayBuffer): Int8Array | string;
61
- export {};