@infra-blocks/types 0.1.1 → 0.2.0

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/README.md CHANGED
@@ -21,4 +21,7 @@ npm run test
21
21
 
22
22
  ### Package publication
23
23
 
24
- Package publication is done manually at the moment.
24
+ This package leverages the [npm-publish-from-label](https://github.com/infrastructure-blocks/npm-publish-from-label-action) action
25
+ as a turnkey, automated mechanism for publishing packages. Refer to its documentation to understand its capabilities.
26
+
27
+ Packages should therefore not be published manually, as these tasks are automated by the CI.
package/lib/index.d.ts CHANGED
@@ -8,6 +8,10 @@ export type Nullable<T> = T | null | undefined;
8
8
  * A type alias for single element predicate functions.
9
9
  */
10
10
  export type Predicate<T> = (item: T) => boolean;
11
+ /**
12
+ * A type alias for functions that return a value of a given type without arguments.
13
+ */
14
+ export type Provider<T> = () => T;
11
15
  /**
12
16
  * A convenient type declaration for handlers used to resolve "error" type events.
13
17
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA2DA;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC;AAED;;;;;;;;;GASG;AACH,wDAAwD;AACxD,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@infra-blocks/types",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Typescript types utility package.",
5
5
  "exports": "./lib/index.js",
6
6
  "engines": {
7
7
  "node": ">=18.0.0"
8
8
  },
9
9
  "files": [
10
- "lib/**/*.{js,d.ts}"
10
+ "lib/**/*.{js,d.ts,map}"
11
11
  ],
12
12
  "type": "module",
13
13
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  "build": "npm run clean && tsc --project tsconfig.build.json",
16
16
  "compile": "tsc",
17
17
  "clean": "rm -rf lib && rm -f infra-blocks-*.tgz",
18
- "lint": "eslint --ext .js,.ts --max-warnings 0 .",
18
+ "lint": "eslint --ext .js,.cjs,.mjs,.ts --max-warnings 0 .",
19
19
  "test": "npm run test:unit",
20
20
  "test:coverage": "c8 npm run test",
21
21
  "test:coverage:lcov": "c8 --reporter=lcov npm run test",
@@ -23,24 +23,17 @@
23
23
  "test:integration": "mocha --config test/integration/.mocharc.js 'test/integration/**/*.spec.ts'"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/chai": "^4.3.5",
27
- "@types/chai-as-promised": "^7.1.5",
26
+ "@infra-blocks/test": "^0.1.1",
28
27
  "@types/mocha": "^10.0.1",
29
- "@types/node": "^18.16.16",
30
- "@types/sinon": "^10.0.15",
31
- "@types/sinon-chai": "^3.2.9",
28
+ "@types/node": "^20.10.3",
32
29
  "@typescript-eslint/eslint-plugin": "^5.59.8",
33
30
  "@typescript-eslint/parser": "^5.59.8",
34
31
  "c8": "^8.0.0",
35
- "chai": "^4.3.7",
36
- "chai-as-promised": "^7.1.1",
37
32
  "eslint": "^8.41.0",
38
33
  "eslint-config-prettier": "^8.8.0",
39
34
  "eslint-plugin-prettier": "^4.2.1",
40
35
  "mocha": "^10.2.0",
41
36
  "prettier": "^2.8.8",
42
- "sinon": "^15.1.0",
43
- "sinon-chai": "^3.7.0",
44
37
  "ts-node": "^10.9.1",
45
38
  "typescript": "^5.0.4"
46
39
  },