Skip to content

Commit ed60cb4

Browse files
author
Adrián González Rus
committed
fix: fix pr issues
1 parent e580fe2 commit ed60cb4

4 files changed

Lines changed: 13 additions & 33 deletions

File tree

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ ENV['ember-cli-workbox'] = {
4949
```javascript
5050
// ember-cli-build.js
5151
const app = new EmberAddon(defaults, {
52-
importScriptsTransform(importScripts) {
53-
return importScripts.map((importScript) => `https://example-cdn.com/${importScript}`);
54-
},
52+
'ember-cli-workbox': {
53+
importScriptsTransform(importScripts) {
54+
return importScripts.map((importScript) => `https://example-cdn.com/${importScript}`);
55+
}
56+
}
5557
});
5658
```
5759

addon/services/service-worker.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,8 @@ export default class ServiceWorker extends EventedService {
5050
}
5151

5252
async register(swFile) {
53-
let path = `${this.config.rootURL}${swFile}`;
54-
55-
if (path[0] === '/') {
56-
path = window.location.origin + path;
57-
}
58-
5953
try {
60-
const registration = await this.sw.register(path);
54+
const registration = await this.sw.register(`${this.config.rootURL}${swFile}`);
6155

6256
return this._onRegistration(registration);
6357
} catch (error) {

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"merge-coverage": "cp coverage/ember/coverage-final.json coverage/ember.json && cp coverage/node/coverage-final.json coverage/node.json && nyc merge coverage coverage/coverage-final.json",
2121
"check-coverage": "istanbul check-coverage coverage/coverage-final.json --statements 60 --functions 60 --branches 60 --lines 60",
2222
"commit": "git-cz",
23-
"posttest": "npm run report-coverage && npm run check-coverage && npm run validate-coverage",
23+
"pretest": "npm run clean-coverage",
24+
"posttest": "npm run merge-coverage && npm run report-coverage && npm run check-coverage && npm run validate-coverage",
2425
"report-coverage": "istanbul report --include=coverage/coverage-final.json text",
2526
"validate-coverage": "test \"$(cat coverage/ember/coverage-summary.json | json total.lines.total)\" -gt 0",
2627
"semantic-release": "semantic-release"

yarn.lock

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5141,7 +5141,7 @@ debug@^3.0.1, debug@^3.1.0, debug@^3.1.1:
51415141
dependencies:
51425142
ms "^2.1.1"
51435143

5144-
debuglog@*, debuglog@^1.0.1:
5144+
debuglog@^1.0.1:
51455145
version "1.0.1"
51465146
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
51475147
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
@@ -8239,7 +8239,7 @@ import-lazy@^2.1.0:
82398239
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
82408240
integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=
82418241

8242-
imurmurhash@*, imurmurhash@^0.1.4:
8242+
imurmurhash@^0.1.4:
82438243
version "0.1.4"
82448244
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
82458245
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
@@ -9503,11 +9503,6 @@ lodash._baseflatten@^3.0.0:
95039503
lodash.isarguments "^3.0.0"
95049504
lodash.isarray "^3.0.0"
95059505

9506-
lodash._baseindexof@*:
9507-
version "3.1.0"
9508-
resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
9509-
integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=
9510-
95119506
lodash._baseuniq@~4.6.0:
95129507
version "4.6.0"
95139508
resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
@@ -9516,16 +9511,11 @@ lodash._baseuniq@~4.6.0:
95169511
lodash._createset "~4.0.0"
95179512
lodash._root "~3.0.0"
95189513

9519-
lodash._bindcallback@*, lodash._bindcallback@^3.0.0:
9514+
lodash._bindcallback@^3.0.0:
95209515
version "3.0.1"
95219516
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
95229517
integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4=
95239518

9524-
lodash._cacheindexof@*:
9525-
version "3.0.2"
9526-
resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
9527-
integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=
9528-
95299519
lodash._createassigner@^3.0.0:
95309520
version "3.1.1"
95319521
resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11"
@@ -9535,19 +9525,12 @@ lodash._createassigner@^3.0.0:
95359525
lodash._isiterateecall "^3.0.0"
95369526
lodash.restparam "^3.0.0"
95379527

9538-
lodash._createcache@*:
9539-
version "3.1.2"
9540-
resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
9541-
integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=
9542-
dependencies:
9543-
lodash._getnative "^3.0.0"
9544-
95459528
lodash._createset@~4.0.0:
95469529
version "4.0.3"
95479530
resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
95489531
integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=
95499532

9550-
lodash._getnative@*, lodash._getnative@^3.0.0:
9533+
lodash._getnative@^3.0.0:
95519534
version "3.9.1"
95529535
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
95539536
integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=
@@ -9695,7 +9678,7 @@ lodash.omit@^4.1.0:
96959678
resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60"
96969679
integrity sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=
96979680

9698-
lodash.restparam@*, lodash.restparam@^3.0.0:
9681+
lodash.restparam@^3.0.0:
96999682
version "3.6.1"
97009683
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
97019684
integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=

0 commit comments

Comments
 (0)