map-anything 2.1.0 → 2.1.1

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/index.cjs CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  /**
6
4
  * Map each value of an object with provided function, just like `Array.map`
7
5
  */
@@ -4,8 +4,8 @@
4
4
  export declare function mapObject<T extends Record<string | number | symbol, unknown>, MapFunction extends (value: T[keyof T], propName: keyof T, array: T[keyof T][]) => any>(target: T, mapFunction: MapFunction): {
5
5
  [key in keyof T]: ReturnType<typeof mapFunction>;
6
6
  };
7
- export declare type KeyOfMap<M extends Map<unknown, unknown>> = M extends Map<infer K, unknown> ? K : never;
8
- export declare type ValueOfMap<M extends Map<unknown, unknown>> = M extends Map<unknown, infer V> ? V : never;
7
+ export type KeyOfMap<M extends Map<unknown, unknown>> = M extends Map<infer K, unknown> ? K : never;
8
+ export type ValueOfMap<M extends Map<unknown, unknown>> = M extends Map<unknown, infer V> ? V : never;
9
9
  /**
10
10
  * Map each value of a map with provided function, just like `Array.map`
11
11
  */
package/package.json CHANGED
@@ -2,16 +2,16 @@
2
2
  "name": "map-anything",
3
3
  "sideEffects": false,
4
4
  "type": "module",
5
- "version": "2.1.0",
5
+ "version": "2.1.1",
6
6
  "description": "Array.map but for objects with good TypeScript support. A small and simple integration.",
7
7
  "module": "./dist/index.es.js",
8
8
  "main": "./dist/index.cjs",
9
9
  "types": "./dist/types/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
+ "types": "./dist/types/index.d.ts",
12
13
  "import": "./dist/index.es.js",
13
- "require": "./dist/index.cjs",
14
- "types": "./dist/types/index.d.ts"
14
+ "require": "./dist/index.cjs"
15
15
  }
16
16
  },
17
17
  "files": [
@@ -23,22 +23,22 @@
23
23
  "scripts": {
24
24
  "test": "vitest run",
25
25
  "lint": "tsc --noEmit && eslint ./src --ext .ts",
26
- "build": "rollup -c ./scripts/build.js",
26
+ "build": "rollup --bundleConfigAsCjs -c ./scripts/build.js",
27
27
  "release": "npm run lint && del dist && npm run build && np"
28
28
  },
29
29
  "devDependencies": {
30
- "@typescript-eslint/eslint-plugin": "^5.10.1",
31
- "@typescript-eslint/parser": "^5.10.1",
30
+ "@typescript-eslint/eslint-plugin": "^5.59.2",
31
+ "@typescript-eslint/parser": "^5.59.2",
32
32
  "del-cli": "^4.0.1",
33
- "eslint": "^8.7.0",
34
- "eslint-config-prettier": "^8.3.0",
33
+ "eslint": "^8.40.0",
34
+ "eslint-config-prettier": "^8.8.0",
35
35
  "eslint-plugin-tree-shaking": "^1.10.0",
36
- "np": "^7.6.0",
37
- "prettier": "^2.5.1",
38
- "rollup": "^2.66.1",
39
- "rollup-plugin-typescript2": "^0.31.1",
40
- "typescript": "^4.5.5",
41
- "vitest": "^0.2.3"
36
+ "np": "^7.7.0",
37
+ "prettier": "^2.8.8",
38
+ "rollup": "^3.21.5",
39
+ "rollup-plugin-typescript2": "^0.34.1",
40
+ "typescript": "^4.9.5",
41
+ "vitest": "^0.31.0"
42
42
  },
43
43
  "keywords": [
44
44
  "map-object",