Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/broccoli/service-worker-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class DiffingSWManifest {
this.options = options;
this.firstBuild = true;
}

rebuild(diff) {
var manifest = {};
if (this.firstBuild) {
Expand All @@ -25,10 +25,10 @@ class DiffingSWManifest {
// Read manifest from disk.
manifest = this.readManifestFromCache();
}

// Remove manifest entries for files that are no longer present.
diff.removedPaths.forEach((file) => delete manifest[file]);

// Merge the lists of added and changed paths and update their hashes in the manifest.
[]
.concat(diff.addedPaths)
Expand Down Expand Up @@ -60,7 +60,7 @@ class DiffingSWManifest {
var files = Object.keys(manifest).sort();
var bundleHash = this.computeBundleHash(files, manifest);
var contents = files
.map((file) => `# sw.file.hash: ${this.computeFileHash(file)}\n/${file}`)
.map((file) => `# sw.file.hash: ${this.computeFileHash(file)}\n${path.sep}${file}`)
.join('\n');
return `CACHE MANIFEST
# sw.bundle: ng-cli
Expand Down Expand Up @@ -95,4 +95,4 @@ ${contents}
}

Object.defineProperty(exports, "__esModule", { value: true });
exports.default = diffingPlugin.wrapDiffingPlugin(DiffingSWManifest);
exports.default = diffingPlugin.wrapDiffingPlugin(DiffingSWManifest);
16 changes: 8 additions & 8 deletions tests/e2e/e2e_workflow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ describe('Basic end-to-end Workflow', function () {
.readFileSync(manifestPath, {encoding: 'utf8'})
.trim()
.split('\n');

// Check that a few critical files have been detected.
expect(lines).to.include('/index.html');
expect(lines).to.include('/thirdparty/libs.js');
expect(lines).to.include(`${path.sep}index.html`);
expect(lines).to.include(`${path.sep}thirdparty${path.sep}libs.js`);
});

it('Perform `ng test` after initial build', function() {
Expand Down Expand Up @@ -193,20 +193,20 @@ describe('Basic end-to-end Workflow', function () {
// sh.rm('-rf', './tmp'); // tmp.teardown takes too long
});
});

it('Turn on `noImplicitAny` in tsconfig.json and rebuild', function (done) {
this.timeout(420000);

var configFilePath = path.join(process.cwd(), 'src', 'tsconfig.json');
fs.readFile(configFilePath, 'utf8', function(err, data){

var config = JSON.parse(data);
config.compilerOptions.noImplicitAny = true;

fs.writeFile(configFilePath, JSON.stringify(config), function(){
//clear the dist folder
sh.rm('-rf', path.join(process.cwd(), 'dist'));

return ng([
'build',
'--silent'
Expand Down