Skip to content

Commit

Permalink
feat: sync workbox version with workbox-window
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya parsa committed Mar 17, 2019
1 parent 613efdc commit 9a3632a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/workbox/lib/defaults.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
// General
workboxVersion: '4.0.0-0',
workboxVersion: require('workbox-window/package.json').version,
workboxURL: undefined,
importScripts: [],
autoRegister: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
},
"dependencies": {
"@nuxtjs/pwa-utils": "3.0.0-beta.12",
"workbox-window": "4.0.0"
"workbox-window": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion test/__snapshots__/pwa.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Array [
`;

exports[`pwa sw.js 1`] = `
"importScripts('https://cdn.jsdelivr.net/npm/workbox-cdn@4.0.0-0/workbox/workbox-sw.js', 'custom-sw.js')
"importScripts('https://cdn.jsdelivr.net/npm/workbox-cdn/workbox/workbox-sw.js', 'custom-sw.js')
// --------------------------------------------------
// Configure
Expand Down
2 changes: 1 addition & 1 deletion test/pwa.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ describe('pwa', () => {
test('sw.js', async () => {
const swContents = await fs.readFile(path.resolve(nuxt.options.generate.dir, 'sw.js'), 'utf-8')

expect(swContents).toMatchSnapshot()
expect(swContents.replace(/@[^/]*/, '')).toMatchSnapshot()
})
})

0 comments on commit 9a3632a

Please sign in to comment.