@bagaar/ember-graphql-mocking 0.6.0 → 0.7.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/CHANGELOG.md +17 -0
- package/README.md +10 -1
- package/index.js +3 -3
- package/package.json +33 -29
- package/public/mockServiceWorker.js +3 -3
- package/config/environment.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
## v0.7.0 (2023-02-22)
|
|
8
|
+
|
|
9
|
+
#### :boom: Breaking Change
|
|
10
|
+
* [#104](https://github.com/Bagaar/ember-graphql-mocking/pull/104) Update `msw` to v1 and make it a peer dependency ([@gvdp](https://github.com/gvdp))
|
|
11
|
+
|
|
12
|
+
#### :rocket: Enhancement
|
|
13
|
+
* [#104](https://github.com/Bagaar/ember-graphql-mocking/pull/104) Update `msw` to v1 and make it a peer dependency ([@gvdp](https://github.com/gvdp))
|
|
14
|
+
* [#100](https://github.com/Bagaar/ember-graphql-mocking/pull/100) Speed up requiring `index.js` file ([@bertdeblock](https://github.com/bertdeblock))
|
|
15
|
+
|
|
16
|
+
#### :memo: Documentation
|
|
17
|
+
* [#106](https://github.com/Bagaar/ember-graphql-mocking/pull/106) Update compatibility and installation section ([@bertdeblock](https://github.com/bertdeblock))
|
|
18
|
+
|
|
19
|
+
#### Committers: 2
|
|
20
|
+
- Bert De Block ([@bertdeblock](https://github.com/bertdeblock))
|
|
21
|
+
- [@gvdp](https://github.com/gvdp)
|
|
22
|
+
|
|
6
23
|
## v0.6.0 (2022-09-05)
|
|
7
24
|
|
|
8
25
|
#### :boom: Breaking Change
|
package/README.md
CHANGED
|
@@ -11,11 +11,20 @@ Ember addon for mocking GraphQL requests using [Mock Service Worker (MSW)](https
|
|
|
11
11
|
- Ember.js v3.28 or above
|
|
12
12
|
- Ember CLI v3.28 or above
|
|
13
13
|
- Node.js v14 or above
|
|
14
|
+
- MSW v1 or above
|
|
14
15
|
|
|
15
16
|
## Installation
|
|
16
17
|
|
|
17
18
|
```shell
|
|
18
|
-
|
|
19
|
+
npm install -D @bagaar/ember-graphql-mocking msw
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```shell
|
|
23
|
+
pnpm add -D @bagaar/ember-graphql-mocking msw
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```shell
|
|
27
|
+
yarn add -D @bagaar/ember-graphql-mocking msw
|
|
19
28
|
```
|
|
20
29
|
|
|
21
30
|
## Usage
|
package/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const funnel = require('broccoli-funnel');
|
|
4
|
-
const mergeTrees = require('broccoli-merge-trees');
|
|
5
|
-
|
|
6
3
|
module.exports = {
|
|
7
4
|
name: require('./package').name,
|
|
8
5
|
|
|
@@ -14,6 +11,9 @@ module.exports = {
|
|
|
14
11
|
return;
|
|
15
12
|
}
|
|
16
13
|
|
|
14
|
+
const funnel = require('broccoli-funnel');
|
|
15
|
+
const mergeTrees = require('broccoli-merge-trees');
|
|
16
|
+
|
|
17
17
|
return mergeTrees([tree, funnel(host.trees.public)], {
|
|
18
18
|
overwrite: true,
|
|
19
19
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bagaar/ember-graphql-mocking",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Ember addon for mocking GraphQL requests using Mock Service Worker (MSW).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "ember build --environment=production",
|
|
17
|
-
"lint": "
|
|
18
|
-
"lint:fix": "npm
|
|
17
|
+
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
|
|
18
|
+
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
|
|
19
19
|
"lint:hbs": "ember-template-lint .",
|
|
20
20
|
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
21
21
|
"lint:js": "eslint . --cache",
|
|
22
22
|
"lint:js:fix": "eslint . --fix",
|
|
23
23
|
"prepare": "husky install",
|
|
24
24
|
"start": "ember serve",
|
|
25
|
-
"test": "npm
|
|
25
|
+
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
|
|
26
26
|
"test:ember": "ember test",
|
|
27
27
|
"test:ember-compatibility": "ember try:each"
|
|
28
28
|
},
|
|
@@ -31,60 +31,64 @@
|
|
|
31
31
|
"@commitlint/config-conventional"
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"ember-source": "^3.28.0 || ^4.0.0",
|
|
36
|
+
"msw": "^1.0.1"
|
|
37
|
+
},
|
|
34
38
|
"dependencies": {
|
|
35
39
|
"broccoli-funnel": "^3.0.5",
|
|
36
40
|
"broccoli-merge-trees": "^4.2.0",
|
|
37
|
-
"ember-auto-import": "^2.
|
|
41
|
+
"ember-auto-import": "^2.5.0",
|
|
38
42
|
"ember-cli-babel": "^7.26.11",
|
|
39
43
|
"graphql": "^16.6.0",
|
|
40
|
-
"lodash.merge": "^4.6.2"
|
|
41
|
-
"msw": "^0.47.0"
|
|
44
|
+
"lodash.merge": "^4.6.2"
|
|
42
45
|
},
|
|
43
46
|
"devDependencies": {
|
|
44
|
-
"@commitlint/cli": "^17.
|
|
45
|
-
"@commitlint/config-conventional": "^17.
|
|
47
|
+
"@commitlint/cli": "^17.4.4",
|
|
48
|
+
"@commitlint/config-conventional": "^17.4.4",
|
|
46
49
|
"@ember/optional-features": "^2.0.0",
|
|
47
|
-
"@ember/
|
|
48
|
-
"@
|
|
50
|
+
"@ember/string": "^3.0.1",
|
|
51
|
+
"@ember/test-helpers": "^2.9.3",
|
|
52
|
+
"@embroider/test-setup": "^2.0.2",
|
|
49
53
|
"@glimmer/component": "^1.1.2",
|
|
50
54
|
"@glimmer/tracking": "^1.1.2",
|
|
51
55
|
"@release-it-plugins/lerna-changelog": "^5.0.0",
|
|
52
56
|
"babel-eslint": "^10.1.0",
|
|
53
57
|
"broccoli-asset-rev": "^3.0.0",
|
|
58
|
+
"concurrently": "^7.6.0",
|
|
54
59
|
"ember-apollo-client": "^4.1.0",
|
|
55
|
-
"ember-cli": "~4.
|
|
60
|
+
"ember-cli": "~4.10.0",
|
|
56
61
|
"ember-cli-dependency-checker": "^3.3.1",
|
|
57
|
-
"ember-cli-htmlbars": "^6.
|
|
62
|
+
"ember-cli-htmlbars": "^6.2.0",
|
|
58
63
|
"ember-cli-inject-live-reload": "^2.1.0",
|
|
59
64
|
"ember-cli-sri": "^2.1.1",
|
|
60
65
|
"ember-cli-terser": "^4.0.2",
|
|
61
|
-
"ember-disable-prototype-extensions": "^1.1.3",
|
|
62
66
|
"ember-fetch": "^8.1.2",
|
|
63
67
|
"ember-load-initializers": "^2.1.2",
|
|
64
68
|
"ember-page-title": "^7.0.0",
|
|
65
|
-
"ember-qunit": "^
|
|
66
|
-
"ember-resolver": "^
|
|
67
|
-
"ember-source": "~4.
|
|
69
|
+
"ember-qunit": "^6.1.1",
|
|
70
|
+
"ember-resolver": "^10.0.0",
|
|
71
|
+
"ember-source": "~4.10.0",
|
|
68
72
|
"ember-source-channel-url": "^3.0.0",
|
|
69
|
-
"ember-template-lint": "^
|
|
73
|
+
"ember-template-lint": "^5.3.1",
|
|
70
74
|
"ember-try": "^2.0.0",
|
|
71
75
|
"eslint": "^7.32.0",
|
|
72
|
-
"eslint-config-prettier": "^8.
|
|
73
|
-
"eslint-plugin-ember": "^11.
|
|
74
|
-
"eslint-plugin-
|
|
76
|
+
"eslint-config-prettier": "^8.6.0",
|
|
77
|
+
"eslint-plugin-ember": "^11.4.3",
|
|
78
|
+
"eslint-plugin-n": "^15.6.1",
|
|
75
79
|
"eslint-plugin-prettier": "^4.2.1",
|
|
76
|
-
"eslint-plugin-qunit": "^7.3.
|
|
77
|
-
"husky": "^8.0.
|
|
80
|
+
"eslint-plugin-qunit": "^7.3.4",
|
|
81
|
+
"husky": "^8.0.3",
|
|
78
82
|
"loader.js": "^4.7.0",
|
|
79
|
-
"
|
|
80
|
-
"prettier": "^2.
|
|
81
|
-
"qunit": "^2.19.
|
|
83
|
+
"msw": "^1.0.1",
|
|
84
|
+
"prettier": "^2.8.3",
|
|
85
|
+
"qunit": "^2.19.3",
|
|
82
86
|
"qunit-dom": "^2.0.0",
|
|
83
|
-
"release-it": "^15.
|
|
84
|
-
"webpack": "^5.
|
|
87
|
+
"release-it": "^15.6.0",
|
|
88
|
+
"webpack": "^5.75.0"
|
|
85
89
|
},
|
|
86
90
|
"engines": {
|
|
87
|
-
"node": "14.* || >=
|
|
91
|
+
"node": "14.* || 16.* || >= 18"
|
|
88
92
|
},
|
|
89
93
|
"publishConfig": {
|
|
90
94
|
"access": "public",
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
/* tslint:disable */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Mock Service Worker (0.
|
|
5
|
+
* Mock Service Worker (1.0.1).
|
|
6
6
|
* @see https://github.com/mswjs/msw
|
|
7
7
|
* - Please do NOT modify this file.
|
|
8
8
|
* - Please do NOT serve this file on production.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const INTEGRITY_CHECKSUM = '
|
|
11
|
+
const INTEGRITY_CHECKSUM = '3d6b9f06410d179a7f7404d4bf4c3c70'
|
|
12
12
|
const activeClientIds = new Set()
|
|
13
13
|
|
|
14
14
|
self.addEventListener('install', function () {
|
|
@@ -174,7 +174,7 @@ async function handleRequest(event, requestId) {
|
|
|
174
174
|
async function resolveMainClient(event) {
|
|
175
175
|
const client = await self.clients.get(event.clientId)
|
|
176
176
|
|
|
177
|
-
if (client
|
|
177
|
+
if (client?.frameType === 'top-level') {
|
|
178
178
|
return client
|
|
179
179
|
}
|
|
180
180
|
|