@reflex-stack/tsp 0.1.1 → 0.1.3

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.
@@ -1,11 +1,11 @@
1
1
  {
2
- "name": "@reflex-stack/tsp-example-package",
3
- "version": "0.1.0",
2
+ "name": "@reflex-stack/tsp-example",
3
+ "version": "0.1.3",
4
+ "type": "module",
4
5
  "author": "Alexis Bouhet",
5
- "license": "MIT",
6
+ "licence": "MIT",
6
7
  "main": "./dist/index.js",
7
8
  "types": "./dist/index.d.ts",
8
- "type": "module",
9
9
  "exports": {
10
10
  ".": {
11
11
  "types": "./dist/index.d.ts",
@@ -17,8 +17,13 @@
17
17
  }
18
18
  },
19
19
  "tsp": {
20
+ "runtime": "node",
20
21
  "src": "./src",
21
22
  "dist": "./dist",
23
+ "tests": "./tests",
24
+ "test-files": [
25
+ "test.js"
26
+ ],
22
27
  "tmp": "./tmp",
23
28
  "reports": "./reports",
24
29
  "generate-json-report": false,
@@ -30,6 +35,13 @@
30
35
  "publish": "tsp build && tsp test --noIntro && tsp publish --noIntro"
31
36
  },
32
37
  "dependencies": {
33
- "@reflex-stack/tsp": "0.1.0"
38
+ "@reflex-stack/tsp": "0.1.2",
39
+ "terser": "^5.37.0",
40
+ "typescript": "^5.7.3"
41
+ },
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git@github.com:reflex-stack/tsp.git",
45
+ "directory": "tests/example-package"
34
46
  }
35
47
  }
@@ -0,0 +1 @@
1
+ <svg width="34.6" height="15" xmlns="http://www.w3.org/2000/svg"><style> text { fill: white; font-family: Consolas, Monaco, "Lucida Console", monospace; font-size: 14px; }</style><text y="14">248b</text></svg>
@@ -0,0 +1 @@
1
+ <svg width="34.6" height="15" xmlns="http://www.w3.org/2000/svg"><style> text { fill: black; font-family: Consolas, Monaco, "Lucida Console", monospace; font-size: 14px; }</style><text y="14">248b</text></svg>
@@ -0,0 +1 @@
1
+ <svg width="34.6" height="15" xmlns="http://www.w3.org/2000/svg"><style> text { fill: white; font-family: Consolas, Monaco, "Lucida Console", monospace; font-size: 14px; }</style><text y="14">144b</text></svg>
@@ -0,0 +1 @@
1
+ <svg width="34.6" height="15" xmlns="http://www.w3.org/2000/svg"><style> text { fill: black; font-family: Consolas, Monaco, "Lucida Console", monospace; font-size: 14px; }</style><text y="14">144b</text></svg>
@@ -0,0 +1 @@
1
+ <svg width="34.6" height="15" xmlns="http://www.w3.org/2000/svg"><style> text { fill: white; font-family: Consolas, Monaco, "Lucida Console", monospace; font-size: 14px; }</style><text y="14">392b</text></svg>
@@ -0,0 +1 @@
1
+ <svg width="34.6" height="15" xmlns="http://www.w3.org/2000/svg"><style> text { fill: black; font-family: Consolas, Monaco, "Lucida Console", monospace; font-size: 14px; }</style><text y="14">392b</text></svg>
@@ -0,0 +1,25 @@
1
+ // Import your code from dist directory, tests are not built on purpose
2
+ import { rootDep, doStuff } from "../dist/index.js"
3
+ import { doSubmoduleStuff } from "../dist/submodule/index.js"
4
+ // Import small testing lib from tsp
5
+ import { describe, it, expect, startTest } from "@reflex-stack/tsp/tests"
6
+
7
+ const endTest = startTest()
8
+
9
+ describe("Main module", () => {
10
+ it("Should has root dependency", () => {
11
+ expect(rootDep).toBe("root dependency")
12
+ })
13
+ it("Should call doStuff", () => {
14
+ expect(doStuff()).toBe("Do stuff common dependency")
15
+ })
16
+ })
17
+
18
+ describe("Sub module", () => {
19
+ it("Should call doSubmoduleStuff", () => {
20
+ const subModuleStuff = doSubmoduleStuff()
21
+ expect(subModuleStuff).toBe("Do submodule stuff submodule dependency common dependency")
22
+ })
23
+ })
24
+
25
+ endTest()
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "../tsconfig.json",
3
+ "exclude": ["../node_modules", "../dist", "../src"],
4
+ "include": ["./**/*"]
5
+ }
@@ -1,18 +1,36 @@
1
1
  {
2
2
  "compilerOptions": {
3
- // Input and output
4
- "allowJs": false,
5
- // Compiler options
6
- "strict": false,
7
- //
8
- "target" : "ES2023",
9
- "lib": ["DOM", "ES2023"],
10
- //
3
+ // Compilation level target
4
+ // If using a bundler in your project it should be the previous or current year
5
+ "target" : "es2023",
6
+ // Allow types to be resolved in tests
7
+ "checkJs": true,
8
+ "allowJs": true,
9
+ // TS libs used, include needed lib.
10
+ // It should contain the target and "DOM" if it runs in the browser
11
+ // https://www.typescriptlang.org/tsconfig/#lib
12
+ "lib": ["es2023"],
13
+ // Module config, you should not change it
11
14
  "module": "NodeNext",
12
15
  "isolatedModules": false,
13
16
  "allowImportingTsExtensions": false,
14
- //
17
+ // Compiler config
18
+ "strict": false,
19
+ "checkJs": true,
15
20
  "useDefineForClassFields" : true,
16
21
  "allowSyntheticDefaultImports": true,
17
- }
18
- }
22
+ // ---
23
+ // Feel free to configure this file for your needs
24
+ // https://www.typescriptlang.org/tsconfig/
25
+ // ---
26
+ // Forbidden props are :
27
+ // - rootDir
28
+ // - outDir
29
+ // - declaration
30
+ // - noEmitOnError
31
+ // - pretty
32
+ },
33
+ // Compile only from src, avoid looping in dist
34
+ "exclude": ["node_modules", "dist"],
35
+ "include": ["src/**/*"],
36
+ }