getta 1.0.0 → 1.0.2
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 +5 -9
- package/dist/cjs/index.cjs +665 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +31 -24
- package/src/main.test.ts +2 -1
- /package/dist/{main → esm}/index.mjs +0 -0
- /package/dist/{main → esm}/index.mjs.map +0 -0
package/package.json
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "getta",
|
|
3
3
|
"description": "An isomorphic rest client based on the Fetch API.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"author": "Dylan Aubrey",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/badbatch/getta",
|
|
8
8
|
"repository": "https://github.com/badbatch/getta",
|
|
9
9
|
"bugs": "https://github.com/badbatch/getta/issues",
|
|
10
10
|
"type": "module",
|
|
11
|
-
"
|
|
12
|
-
|
|
11
|
+
"exports": {
|
|
12
|
+
"types": "./dist/types/index.d.ts",
|
|
13
|
+
"import": "./dist/esm/index.mjs",
|
|
14
|
+
"require": "./dist/cjs/index.cjs"
|
|
15
|
+
},
|
|
13
16
|
"publishConfig": {
|
|
14
17
|
"access": "public"
|
|
15
18
|
},
|
|
16
19
|
"dependencies": {
|
|
17
|
-
"cacheability": "^4.0.
|
|
20
|
+
"cacheability": "^4.0.14",
|
|
18
21
|
"query-string": "^8.1.0",
|
|
19
22
|
"ts-md5": "^1.3.1"
|
|
20
23
|
},
|
|
@@ -27,33 +30,35 @@
|
|
|
27
30
|
"@babel/cli": "^7.21.5",
|
|
28
31
|
"@babel/core": "^7.21.8",
|
|
29
32
|
"@babel/eslint-parser": "^7.21.8",
|
|
30
|
-
"@babel/plugin-proposal-
|
|
31
|
-
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
|
32
|
-
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
33
|
+
"@babel/plugin-proposal-decorators": "^7.23.3",
|
|
33
34
|
"@babel/plugin-syntax-import-assertions": "^7.20.0",
|
|
35
|
+
"@babel/plugin-transform-class-properties": "^7.23.3",
|
|
36
|
+
"@babel/plugin-transform-export-namespace-from": "^7.23.4",
|
|
37
|
+
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
|
|
34
38
|
"@babel/plugin-transform-runtime": "^7.21.4",
|
|
35
39
|
"@babel/preset-env": "^7.21.5",
|
|
36
40
|
"@babel/preset-react": "^7.18.6",
|
|
37
41
|
"@babel/preset-typescript": "^7.21.5",
|
|
38
42
|
"@babel/runtime": "^7.21.5",
|
|
39
|
-
"@cachemap/core": "^5.0.
|
|
40
|
-
"@cachemap/map": "^5.0.
|
|
43
|
+
"@cachemap/core": "^5.0.4",
|
|
44
|
+
"@cachemap/map": "^5.0.2",
|
|
41
45
|
"@commitlint/cli": "^17.6.3",
|
|
42
46
|
"@commitlint/config-conventional": "^17.6.3",
|
|
43
47
|
"@commitlint/prompt-cli": "^17.6.3",
|
|
44
48
|
"@jest/globals": "^29.5.0",
|
|
45
|
-
"@repodog/babel-config": "^1.1.
|
|
46
|
-
"@repodog/cli": "^1.
|
|
47
|
-
"@repodog/commitlint-config": "^1.1.
|
|
48
|
-
"@repodog/eslint-config": "^1.1.
|
|
49
|
-
"@repodog/eslint-config-jest": "^1.1.
|
|
50
|
-
"@repodog/jest-config": "^1.1.
|
|
49
|
+
"@repodog/babel-config": "^1.1.11",
|
|
50
|
+
"@repodog/cli": "^1.2.5",
|
|
51
|
+
"@repodog/commitlint-config": "^1.1.6",
|
|
52
|
+
"@repodog/eslint-config": "^1.1.17",
|
|
53
|
+
"@repodog/eslint-config-jest": "^1.1.10",
|
|
54
|
+
"@repodog/jest-config": "^1.1.11",
|
|
51
55
|
"@repodog/markdownlint-config": "^1.1.5",
|
|
52
56
|
"@repodog/prettier-config": "^1.1.5",
|
|
53
|
-
"@repodog/rollup-config": "^1.1.
|
|
54
|
-
"@repodog/syncpack-config": "^1.
|
|
55
|
-
"@repodog/ts-config": "^1.1.
|
|
57
|
+
"@repodog/rollup-config": "^1.1.8",
|
|
58
|
+
"@repodog/syncpack-config": "^1.2.2",
|
|
59
|
+
"@repodog/ts-config": "^1.1.6",
|
|
56
60
|
"@rollup/plugin-babel": "^6.0.3",
|
|
61
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
57
62
|
"@rollup/plugin-image": "^3.0.2",
|
|
58
63
|
"@rollup/plugin-json": "^6.0.0",
|
|
59
64
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
@@ -73,13 +78,15 @@
|
|
|
73
78
|
"eslint-import-resolver-typescript": "^3.5.5",
|
|
74
79
|
"eslint-plugin-import": "^2.27.5",
|
|
75
80
|
"eslint-plugin-jest": "^27.2.1",
|
|
81
|
+
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
76
82
|
"eslint-plugin-prettier": "^4.2.1",
|
|
77
83
|
"eslint-plugin-sort-class-members": "^1.18.0",
|
|
78
84
|
"eslint-plugin-sort-destructure-keys": "^1.5.0",
|
|
79
85
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
80
86
|
"eslint-plugin-typescript-sort-keys": "^2.3.0",
|
|
81
87
|
"eslint-plugin-unicorn": "^46.0.1",
|
|
82
|
-
"
|
|
88
|
+
"fast-check": "^3.14.0",
|
|
89
|
+
"fetch-mocked": "^0.0.17",
|
|
83
90
|
"generate-changelog": "^1.8.0",
|
|
84
91
|
"husky": "^8.0.3",
|
|
85
92
|
"identity-obj-proxy": "^3.0.0",
|
|
@@ -96,10 +103,9 @@
|
|
|
96
103
|
"rollup-plugin-copy": "^3.4.0",
|
|
97
104
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
98
105
|
"suppress-experimental-warnings": "^1.1.17",
|
|
99
|
-
"syncpack": "^
|
|
106
|
+
"syncpack": "^12.0.0-alpha.0",
|
|
100
107
|
"type-fest": "^3.10.0",
|
|
101
108
|
"typescript": "^5.0.3",
|
|
102
|
-
"vitest": "^0.34.6",
|
|
103
109
|
"zod": "^3.22.4"
|
|
104
110
|
},
|
|
105
111
|
"keywords": [
|
|
@@ -114,15 +120,16 @@
|
|
|
114
120
|
"clean:dist": "del-cli ./dist",
|
|
115
121
|
"commit": "commit",
|
|
116
122
|
"compile": "pnpm run /^compile:.*/",
|
|
117
|
-
"compile:
|
|
123
|
+
"compile:cjs": "MODULE_SYSTEM=cjs rollup -c ./rollup.config.cjs",
|
|
124
|
+
"compile:esm": "rollup -c ./rollup.config.cjs",
|
|
118
125
|
"compile:types": "tsc --project ./tsconfig.build.json",
|
|
119
126
|
"cut:changelog": "changelog",
|
|
120
127
|
"cut:post-version": "pnpm run build",
|
|
121
128
|
"lint": "eslint . --ext .ts,.cjs",
|
|
122
129
|
"repodog": "repodog",
|
|
123
|
-
"syncpack": "syncpack",
|
|
130
|
+
"syncpack": "syncpack format && syncpack list-mismatches && syncpack lint-semver-ranges",
|
|
124
131
|
"test": "node --require=suppress-experimental-warnings --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
125
132
|
"type-check": "tsc --noEmit",
|
|
126
|
-
"validate": "
|
|
133
|
+
"validate": "pnpm run syncpack && pnpm run build && pnpm run lint && pnpm run type-check && pnpm run test"
|
|
127
134
|
}
|
|
128
135
|
}
|
package/src/main.test.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jest } from '@jest/globals';
|
|
2
|
-
import { mockFetch } from 'fetch-mocked';
|
|
2
|
+
import { mockFetch, polyfillFetch } from 'fetch-mocked';
|
|
3
3
|
import { performance } from 'node:perf_hooks';
|
|
4
4
|
import { Md5 } from 'ts-md5';
|
|
5
5
|
import { PRD_136_7317 } from './__testUtils__/data/index.ts';
|
|
@@ -21,6 +21,7 @@ import { delay } from './helpers/delay/index.ts';
|
|
|
21
21
|
import { Getta, createRestClient } from './main.ts';
|
|
22
22
|
import { type FetchResponse, type ResponseDataWithErrors, type ShortcutProperties } from './types.ts';
|
|
23
23
|
|
|
24
|
+
polyfillFetch();
|
|
24
25
|
const mockedFetch = mockFetch(jest.fn);
|
|
25
26
|
|
|
26
27
|
describe('Getta', () => {
|
|
File without changes
|
|
File without changes
|