conflict_resolution
stringlengths
27
16k
<<<<<<< gulp.task('lint-js', function() { ======= gulp.task('lint', ['ensureFiles'], function() { >>>>>>> gulp.task('lint-js', ['ensureFiles'], function() { <<<<<<< '!app/views' ======= '!app/elements', '!app/bower_components', '!app/cache-config.json' >>>>>>> '!app/views' <<<<<<< gulp.task('html', ['views'], function() { var assets = $.useref.assets({searchPath: ['dist']}); return gulp.src(['app/*.html', '.tmp/*.html']) // Replace path for vulcanized assets .pipe($.if('*.html', $.replace('elements/elements.html', 'elements/elements.vulcanized.html'))) .pipe(assets) // Concatenate and minify JavaScript .pipe($.if('*.js', $.uglify({preserveComments: 'some'}))) .pipe(assets.restore()) .pipe($.useref()) // Minify any HTML .pipe($.if('*.html', $.minifyHtml({ empty: true, // KEEP empty attributes loose: true, // KEEP one whitespace quotes: true, // KEEP arbitrary quotes spare: true // KEEP redundant attributes }))) // Output files .pipe(gulp.dest('dist')) .pipe($.size({title: 'Copy optimized html and assets files to dist dir:'})); ======= gulp.task('html', function() { return optimizeHtmlTask( ['app/**/*.html', '!app/{elements,test,bower_components}/**/*.html'], dist()); >>>>>>> gulp.task('html', ['views'], function() { var assets = $.useref.assets({searchPath: ['dist']}); return gulp.src(['app/*.html', '.tmp/*.html']) .pipe(assets) // Concatenate and minify JavaScript .pipe($.if('*.js', $.uglify({preserveComments: 'some'}))) .pipe(assets.restore()) .pipe($.useref()) // Minify any HTML .pipe($.if('*.html', $.minifyHtml({ empty: true, // KEEP empty attributes loose: true, // KEEP one whitespace quotes: true, // KEEP arbitrary quotes spare: true // KEEP redundant attributes }))) // Output files .pipe(gulp.dest('dist')) .pipe($.size({title: 'Copy optimized html and assets files to dist dir:'})); <<<<<<< return gulp.src('dist/elements/elements.vulcanized.html') .pipe($.plumber()) ======= return gulp.src('app/elements/elements.html') >>>>>>> return gulp.src('dist/elements/elements.html') .pipe($.plumber()) <<<<<<< // Split inline scripts from an HTML file for CSP compliance .pipe($.crisper()) // Minify elements.vulcanized.html // https://github.com/PolymerLabs/polybuild/issues/3 .pipe($.if('*.html', $.htmlmin({ customAttrAssign: [ {source: '\\$='} ], customAttrSurround: [ [{source: '\\({\\{'}, {source: '\\}\\}'}], [{source: '\\[\\['}, {source: '\\]\\]'}] ], removeComments: true, collapseWhitespace: true }))) // Remove newline characters .pipe($.if('*.html', $.replace(/[\n]/g, ''))) // Remove 2 or more spaces from CSS // (single spaces can be syntactically significant) .pipe($.if('*.html', $.replace(/ {2,}/g, ''))) // Remove CSS comments .pipe($.if('*.html', $.stripCssComments({preserve: false}))) // Minify elements.vulcanized.js .pipe($.if('*.js', $.uglify())) .pipe(gulp.dest('dist/elements')) .pipe($.size({title: 'Copy vulcanized elements to dist/elements dir:'})); ======= .pipe(gulp.dest(dist('elements'))) .pipe($.size({title: 'vulcanize'})); >>>>>>> // Split inline scripts from an HTML file for CSP compliance .pipe($.crisper()) // Minify elements.html // https://github.com/PolymerLabs/polybuild/issues/3 .pipe($.if('*.html', $.htmlmin({ customAttrAssign: [ {source: '\\$='} ], customAttrSurround: [ [{source: '\\({\\{'}, {source: '\\}\\}'}], [{source: '\\[\\['}, {source: '\\]\\]'}] ], removeComments: true, collapseWhitespace: true }))) // Remove newline characters .pipe($.if('*.html', $.replace(/[\n]/g, ''))) // Remove 2 or more spaces from CSS // (single spaces can be syntactically significant) .pipe($.if('*.html', $.replace(/ {2,}/g, ''))) // Remove CSS comments .pipe($.if('*.html', $.stripCssComments({preserve: false}))) // Minify elements.js .pipe($.if('*.js', $.uglify())) .pipe(gulp.dest('dist/elements')) .pipe($.size({title: 'Copy vulcanized elements to dist/elements dir:'})); <<<<<<< middleware: [historyApiFallback()], routes: { '/bower_components': 'bower_components' } }, ui: { port: config.browserSync.ui.port ======= middleware: [historyApiFallback()] >>>>>>> middleware: [historyApiFallback()] }, ui: { port: config.browserSync.ui.port <<<<<<< // Deploy Tasks // ------------ // Pre-deploy tasks gulp.task('pre-deploy', function(cb) { runSequence( 'default', 'fix-path-sw-toolbox', 'revision', cb); ======= // Deploy to GitHub pages gh-pages branch gulp.task('deploy-gh-pages', function() { return gulp.src(dist('**/*')) // Check if running task from Travis CI, if so run using GH_TOKEN // otherwise run using ghPages defaults. .pipe($.if(process.env.TRAVIS === 'true', $.ghPages({ remoteUrl: 'https://[email protected]/polymerelements/polymer-starter-kit.git', silent: true, branch: 'gh-pages' }), $.ghPages())); >>>>>>> // Deploy Tasks // ------------ // Pre-deploy tasks gulp.task('pre-deploy', function(cb) { runSequence( 'default', 'fix-path-sw-toolbox', 'revision', cb);
<<<<<<< gulp.task('jshint', function () { return gulp.src([ ======= gulp.task('lint', function() { return gulp.src([ >>>>>>> gulp.task('lint-js', function() { return gulp.src([ <<<<<<< ]) .pipe($.jshint()) .pipe($.jshint.reporter('jshint-stylish')) .pipe($.if(!browserSync.active, $.jshint.reporter('fail'))); ======= ]) .pipe(reload({ stream: true, once: true })) // JSCS has not yet a extract option .pipe($.if('*.html', $.htmlExtract())) .pipe($.jshint()) .pipe($.jscs()) .pipe($.jscsStylish.combineWithHintResults()) .pipe($.jshint.reporter('jshint-stylish')) .pipe($.if(!browserSync.active, $.jshint.reporter('fail'))); >>>>>>> ]) .pipe(reload({ stream: true, once: true })) .pipe($.jshint()) .pipe($.jscs()) .pipe($.jscsStylish.combineWithHintResults()) .pipe($.jshint.reporter('jshint-stylish')) .pipe($.if(!browserSync.active, $.jshint.reporter('fail'))); <<<<<<< gulp.task('images', function () { return gulp.src('app/images/**/*') .pipe($.imagemin({ progressive: true, interlaced: true })) .pipe(gulp.dest('dist/images')) .pipe($.size({title: 'Copy optimized images to dist/images dir:'})); ======= gulp.task('images', function() { return imageOptimizeTask('app/images/**/*', dist('images')); >>>>>>> gulp.task('images', function() { return gulp.src('app/images/**/*') .pipe($.imagemin({ progressive: true, interlaced: true })) .pipe(gulp.dest('dist/images')) .pipe($.size({title: 'Copy optimized images to dist/images dir:'})); <<<<<<< gulp.task('fonts', function () { return gulp.src(['app/themes/' + config.theme + '/fonts/**/*.{css,woff,woff2}']) .pipe(gulp.dest('dist/themes/' + config.theme + '/fonts')) .pipe($.size({title: 'Copy fonts to dist/themes/' + config.theme + '/fonts dir:'})); ======= gulp.task('fonts', function() { return gulp.src(['app/fonts/**']) .pipe(gulp.dest(dist('fonts'))) .pipe($.size({ title: 'fonts' })); >>>>>>> gulp.task('fonts', function() { return gulp.src(['app/themes/' + config.theme + '/fonts/**/*.{css,woff,woff2}']) .pipe(gulp.dest('dist/themes/' + config.theme + '/fonts')) .pipe($.size({title: 'Copy fonts to dist/themes/' + config.theme + '/fonts dir:'})); <<<<<<< gulp.task('html', ['views'], function () { var assets = $.useref.assets({searchPath: ['dist']}); return gulp.src(['app/*.html', '.tmp/*.html']) // Replace path for vulcanized assets .pipe($.if('*.html', $.replace('elements/elements.html', 'elements/elements.vulcanized.html'))) .pipe(assets) // Concatenate and minify JavaScript .pipe($.if('*.js', $.uglify({preserveComments: 'some'}))) .pipe(assets.restore()) .pipe($.useref()) // Minify any HTML .pipe($.if('*.html', $.minifyHtml({ empty: true, // KEEP empty attributes loose: true, // KEEP one whitespace quotes: true, // KEEP arbitrary quotes spare: true // KEEP redundant attributes }))) // Output files .pipe(gulp.dest('dist')) .pipe($.size({title: 'Copy optimized html and assets files to dist dir:'})); ======= gulp.task('html', function() { return optimizeHtmlTask( ['app/**/*.html', '!app/{elements,test}/**/*.html'], dist()); >>>>>>> gulp.task('html', ['views'], function() { var assets = $.useref.assets({searchPath: ['dist']}); return gulp.src(['app/*.html', '.tmp/*.html']) // Replace path for vulcanized assets .pipe($.if('*.html', $.replace('elements/elements.html', 'elements/elements.vulcanized.html'))) .pipe(assets) // Concatenate and minify JavaScript .pipe($.if('*.js', $.uglify({preserveComments: 'some'}))) .pipe(assets.restore()) .pipe($.useref()) // Minify any HTML .pipe($.if('*.html', $.minifyHtml({ empty: true, // KEEP empty attributes loose: true, // KEEP one whitespace quotes: true, // KEEP arbitrary quotes spare: true // KEEP redundant attributes }))) // Output files .pipe(gulp.dest('dist')) .pipe($.size({title: 'Copy optimized html and assets files to dist dir:'})); <<<<<<< gulp.task('vulcanize', function () { return gulp.src('dist/elements/elements.vulcanized.html') .pipe($.plumber()) ======= gulp.task('vulcanize', function() { var DEST_DIR = dist('elements'); return gulp.src(dist('elements/elements.vulcanized.html')) >>>>>>> gulp.task('vulcanize', function() { return gulp.src('dist/elements/elements.vulcanized.html') .pipe($.plumber()) <<<<<<< // Split inline scripts from an HTML file for CSP compliance .pipe($.crisper()) // Minify elements.vulcanized.html // https://github.com/PolymerLabs/polybuild/issues/3 .pipe($.if('*.html', $.htmlmin({ customAttrAssign: [ {source:'\\$='} ], customAttrSurround: [ [ {source: '\\({\\{'}, {source: '\\}\\}'} ], [ {source: '\\[\\['}, {source: '\\]\\]'} ] ], removeComments: true, collapseWhitespace: true }))) // Remove newline characters .pipe($.if('*.html', $.replace(/[\n]/g, ''))) // Remove 2 or more spaces from CSS // (single spaces can be syntactically significant) .pipe($.if('*.html', $.replace(/ {2,}/g, ''))) // Remove CSS comments .pipe($.if('*.html', $.stripCssComments({preserve: false}))) // Minify elements.vulcanized.js .pipe($.if('*.js', $.uglify())) .pipe(gulp.dest('dist/elements')) .pipe($.size({title: 'Copy vulcanized elements to dist/elements dir:'})); ======= .pipe($.minifyInline()) .pipe(gulp.dest(DEST_DIR)) .pipe($.size({title: 'vulcanize'})); >>>>>>> // Split inline scripts from an HTML file for CSP compliance .pipe($.crisper()) // Minify elements.vulcanized.html // https://github.com/PolymerLabs/polybuild/issues/3 .pipe($.if('*.html', $.htmlmin({ customAttrAssign: [ {source: '\\$='} ], customAttrSurround: [ [{source: '\\({\\{'}, {source: '\\}\\}'}], [{source: '\\[\\['}, {source: '\\]\\]'}] ], removeComments: true, collapseWhitespace: true }))) // Remove newline characters .pipe($.if('*.html', $.replace(/[\n]/g, ''))) // Remove 2 or more spaces from CSS // (single spaces can be syntactically significant) .pipe($.if('*.html', $.replace(/ {2,}/g, ''))) // Remove CSS comments .pipe($.if('*.html', $.stripCssComments({preserve: false}))) // Minify elements.vulcanized.js .pipe($.if('*.js', $.uglify())) .pipe(gulp.dest('dist/elements')) .pipe($.size({title: 'Copy vulcanized elements to dist/elements dir:'})); <<<<<<< gulp.task('cache-config', function (callback) { var dir = 'dist'; ======= // This task does not run by default, but if you are interested in using service worker caching // in your project, please enable it within the 'default' task. // See https://github.com/PolymerElements/polymer-starter-kit#enable-service-worker-support // for more context. gulp.task('cache-config', function(callback) { var dir = dist(); >>>>>>> // This task does not run by default, but if you are interested in using service worker caching // in your project, please enable it within the 'default' task. // See https://github.com/PolymerElements/polymer-starter-kit#enable-service-worker-support // for more context. gulp.task('cache-config', function(callback) { var dir = 'dist'; <<<<<<< return glob('{elements,scripts,themes}/**/*.*', {cwd: dir}, function(error, files) { ======= glob([ 'index.html', './', 'bower_components/webcomponentsjs/webcomponents-lite.min.js', '{elements,scripts,styles}/**/*.*'], {cwd: dir}, function(error, files) { >>>>>>> glob([ 'index.html', './', 'bower_components/webcomponentsjs/webcomponents-lite.min.js', '{elements,scripts,themes}/**/*.*'], {cwd: dir}, function(error, files) { <<<<<<< gulp.task('clean', function (cb) { del(['.tmp', 'dist', 'deploy'], cb); ======= gulp.task('clean', function() { return del(['.tmp', dist()]); >>>>>>> gulp.task('clean', function(cb) { return del(['.tmp', 'dist', 'deploy'], cb); <<<<<<< gulp.task('serve', ['images', 'js', 'lint', 'manifest', 'styles', 'views'], function () { ======= gulp.task('serve', ['lint', 'styles', 'elements', 'images'], function() { >>>>>>> gulp.task('serve', ['images', 'js', 'lint', 'lint-js', 'manifest', 'styles', 'views'], function() { <<<<<<< gulp.watch([ 'app/*.html', 'app/views/**/*.html', 'app/content/**/*.md' ], ['views', reload]); gulp.watch(['app/{elements,themes}/**/*.{css,html}'], ['styles', reload]); gulp.watch(['app/{scripts,elements}/**/*.{js,html}'], ['jshint', 'js']); ======= gulp.watch(['app/**/*.html'], reload); gulp.watch(['app/styles/**/*.css'], ['styles', reload]); gulp.watch(['app/elements/**/*.css'], ['elements', reload]); gulp.watch(['app/{scripts,elements}/**/{*.js,*.html}'], ['lint']); >>>>>>> gulp.watch([ 'app/*.html', 'app/views/**/*.html', 'app/content/**/*.md' ], ['views', reload]); gulp.watch(['app/{elements,themes}/**/*.{css,html}'], ['styles', reload]); gulp.watch(['app/{elements,scripts}/**/*.js'], ['lint-js', 'js']); <<<<<<< try { require('require-dir')('tasks/tests'); } catch (err) {} ======= try { require('require-dir')('tasks'); } catch (err) {} >>>>>>> try { require('require-dir')('tasks/tests'); } catch (err) {}
<<<<<<< it('should create webhooks clients for each webhook url in the config', function () { this.bot.webhooks.should.have.property('#irc'); }); it('should extract id and token from webhook urls', function () { this.bot.webhooks['#irc'].id.should.equal('id'); this.bot.webhooks['#irc'].token.should.equal('token'); }); ======= it('should successfully send messages with default config', function () { const bot = new Bot(configMsgFormatDefault); bot.connect(); bot.sendToDiscord('testuser', '#irc', 'test message'); this.sendMessageStub.should.have.been.calledOnce; const guild = createGuildStub(); const message = { content: 'test message', mentions: { users: [] }, channel: { name: 'discord' }, author: { username: 'otherauthor', id: 'not bot id' }, guild }; bot.sendToIRC(message); this.sendMessageStub.should.have.been.calledOnce; }); it('should not replace unmatched patterns', function () { const format = { discord: '{$unmatchedPattern} stays intact: {$author} {$text}' }; const bot = new Bot({ ...configMsgFormatDefault, format }); bot.connect(); const username = 'testuser'; const msg = 'test message'; const expected = `{$unmatchedPattern} stays intact: ${username} ${msg}`; bot.sendToDiscord(username, '#irc', msg); this.sendMessageStub.should.have.been.calledWith(expected); }); it('should respect custom formatting for Discord', function () { const format = { discord: '<{$author}> {$ircChannel} => {$discordChannel}: {$text}' }; const bot = new Bot({ ...configMsgFormatDefault, format }); bot.connect(); const username = 'test'; const msg = 'test @user <#1234>'; const expected = `<test> #irc => #discord: ${msg}`; bot.sendToDiscord(username, '#irc', msg); this.sendMessageStub.should.have.been.calledWith(expected); }); it('should successfully send messages with default config', function () { this.bot = new Bot(configMsgFormatDefault); this.bot.connect(); this.bot.sendToDiscord('testuser', '#irc', 'test message'); this.sendMessageStub.should.have.been.calledOnce; const guild = createGuildStub(); const message = { content: 'test message', mentions: { users: [] }, channel: { name: 'discord' }, author: { username: 'otherauthor', id: 'not bot id' }, guild }; this.bot.sendToIRC(message); this.sendMessageStub.should.have.been.calledOnce; }); it('should not replace unmatched patterns', function () { const format = { discord: '{$unmatchedPattern} stays intact: {$author} {$text}' }; this.bot = new Bot({ ...configMsgFormatDefault, format }); this.bot.connect(); const username = 'testuser'; const msg = 'test message'; const expected = `{$unmatchedPattern} stays intact: ${username} ${msg}`; this.bot.sendToDiscord(username, '#irc', msg); this.sendMessageStub.should.have.been.calledWith(expected); }); it('should respect custom formatting for Discord', function () { const format = { discord: '<{$author}> {$ircChannel} => {$discordChannel}: {$text}' }; this.bot = new Bot({ ...configMsgFormatDefault, format }); this.bot.connect(); const username = 'test'; const msg = 'test @user <#1234>'; const expected = `<test> #irc => #discord: ${msg}`; this.bot.sendToDiscord(username, '#irc', msg); this.sendMessageStub.should.have.been.calledWith(expected); }); it('should respect custom formatting for regular IRC output', function () { const format = { ircText: '<{$nickname}> {$discordChannel} => {$ircChannel}: {$text}' }; this.bot = new Bot({ ...configMsgFormatDefault, format }); this.bot.connect(); const guild = createGuildStub(); const message = { content: 'test message', mentions: { users: [] }, channel: { name: 'discord' }, author: { username: 'testauthor', id: 'not bot id' }, guild }; const expected = '<testauthor> #discord => #irc: test message'; this.bot.sendToIRC(message); ClientStub.prototype.say.should.have.been.calledWith('#irc', expected); }); it('should respect custom formatting for commands in IRC output', function () { const format = { commandPrelude: '{$nickname} from {$discordChannel} sent command to {$ircChannel}:' }; this.bot = new Bot({ ...configMsgFormatDefault, format }); this.bot.connect(); const text = '!testcmd'; const guild = createGuildStub(); const message = { content: text, mentions: { users: [] }, channel: { name: 'discord' }, author: { username: 'testauthor', id: 'not bot id' }, guild }; const expected = 'testauthor from #discord sent command to #irc:'; this.bot.sendToIRC(message); ClientStub.prototype.say.getCall(0).args.should.deep.equal(['#irc', expected]); ClientStub.prototype.say.getCall(1).args.should.deep.equal(['#irc', text]); }); it('should respect custom formatting for attachment URLs in IRC output', function () { const format = { urlAttachment: '<{$nickname}> {$discordChannel} => {$ircChannel}, attachment: {$attachmentURL}' }; this.bot = new Bot({ ...configMsgFormatDefault, format }); this.bot.connect(); const attachmentUrl = 'https://image/url.jpg'; const guild = createGuildStub(); const message = { content: '', mentions: { users: [] }, attachments: createAttachments(attachmentUrl), channel: { name: 'discord' }, author: { username: 'otherauthor', id: 'not bot id' }, guild }; this.bot.sendToIRC(message); const expected = `<otherauthor> #discord => #irc, attachment: ${attachmentUrl}`; ClientStub.prototype.say.should.have.been.calledWith('#irc', expected); }); >>>>>>> it('should successfully send messages with default config', function () { const bot = new Bot(configMsgFormatDefault); bot.connect(); bot.sendToDiscord('testuser', '#irc', 'test message'); this.sendMessageStub.should.have.been.calledOnce; const guild = createGuildStub(); const message = { content: 'test message', mentions: { users: [] }, channel: { name: 'discord' }, author: { username: 'otherauthor', id: 'not bot id' }, guild }; bot.sendToIRC(message); this.sendMessageStub.should.have.been.calledOnce; }); it('should not replace unmatched patterns', function () { const format = { discord: '{$unmatchedPattern} stays intact: {$author} {$text}' }; const bot = new Bot({ ...configMsgFormatDefault, format }); bot.connect(); const username = 'testuser'; const msg = 'test message'; const expected = `{$unmatchedPattern} stays intact: ${username} ${msg}`; bot.sendToDiscord(username, '#irc', msg); this.sendMessageStub.should.have.been.calledWith(expected); }); it('should respect custom formatting for Discord', function () { const format = { discord: '<{$author}> {$ircChannel} => {$discordChannel}: {$text}' }; const bot = new Bot({ ...configMsgFormatDefault, format }); bot.connect(); const username = 'test'; const msg = 'test @user <#1234>'; const expected = `<test> #irc => #discord: ${msg}`; bot.sendToDiscord(username, '#irc', msg); this.sendMessageStub.should.have.been.calledWith(expected); }); it('should successfully send messages with default config', function () { this.bot = new Bot(configMsgFormatDefault); this.bot.connect(); this.bot.sendToDiscord('testuser', '#irc', 'test message'); this.sendMessageStub.should.have.been.calledOnce; const guild = createGuildStub(); const message = { content: 'test message', mentions: { users: [] }, channel: { name: 'discord' }, author: { username: 'otherauthor', id: 'not bot id' }, guild }; this.bot.sendToIRC(message); this.sendMessageStub.should.have.been.calledOnce; }); it('should not replace unmatched patterns', function () { const format = { discord: '{$unmatchedPattern} stays intact: {$author} {$text}' }; this.bot = new Bot({ ...configMsgFormatDefault, format }); this.bot.connect(); const username = 'testuser'; const msg = 'test message'; const expected = `{$unmatchedPattern} stays intact: ${username} ${msg}`; this.bot.sendToDiscord(username, '#irc', msg); this.sendMessageStub.should.have.been.calledWith(expected); }); it('should respect custom formatting for Discord', function () { const format = { discord: '<{$author}> {$ircChannel} => {$discordChannel}: {$text}' }; this.bot = new Bot({ ...configMsgFormatDefault, format }); this.bot.connect(); const username = 'test'; const msg = 'test @user <#1234>'; const expected = `<test> #irc => #discord: ${msg}`; this.bot.sendToDiscord(username, '#irc', msg); this.sendMessageStub.should.have.been.calledWith(expected); }); it('should respect custom formatting for regular IRC output', function () { const format = { ircText: '<{$nickname}> {$discordChannel} => {$ircChannel}: {$text}' }; this.bot = new Bot({ ...configMsgFormatDefault, format }); this.bot.connect(); const guild = createGuildStub(); const message = { content: 'test message', mentions: { users: [] }, channel: { name: 'discord' }, author: { username: 'testauthor', id: 'not bot id' }, guild }; const expected = '<testauthor> #discord => #irc: test message'; this.bot.sendToIRC(message); ClientStub.prototype.say.should.have.been.calledWith('#irc', expected); }); it('should respect custom formatting for commands in IRC output', function () { const format = { commandPrelude: '{$nickname} from {$discordChannel} sent command to {$ircChannel}:' }; this.bot = new Bot({ ...configMsgFormatDefault, format }); this.bot.connect(); const text = '!testcmd'; const guild = createGuildStub(); const message = { content: text, mentions: { users: [] }, channel: { name: 'discord' }, author: { username: 'testauthor', id: 'not bot id' }, guild }; const expected = 'testauthor from #discord sent command to #irc:'; this.bot.sendToIRC(message); ClientStub.prototype.say.getCall(0).args.should.deep.equal(['#irc', expected]); ClientStub.prototype.say.getCall(1).args.should.deep.equal(['#irc', text]); }); it('should respect custom formatting for attachment URLs in IRC output', function () { const format = { urlAttachment: '<{$nickname}> {$discordChannel} => {$ircChannel}, attachment: {$attachmentURL}' }; this.bot = new Bot({ ...configMsgFormatDefault, format }); this.bot.connect(); const attachmentUrl = 'https://image/url.jpg'; const guild = createGuildStub(); const message = { content: '', mentions: { users: [] }, attachments: createAttachments(attachmentUrl), channel: { name: 'discord' }, author: { username: 'otherauthor', id: 'not bot id' }, guild }; this.bot.sendToIRC(message); const expected = `<otherauthor> #discord => #irc, attachment: ${attachmentUrl}`; ClientStub.prototype.say.should.have.been.calledWith('#irc', expected); }); it('should create webhooks clients for each webhook url in the config', function () { this.bot.webhooks.should.have.property('#irc'); }); it('should extract id and token from webhook urls', function () { this.bot.webhooks['#irc'].id.should.equal('id'); this.bot.webhooks['#irc'].token.should.equal('token'); });
<<<<<<< getDiscordAvatar(nick) { const user = this.discord.guilds.first().members.find( member => member.user.username.toLowerCase() === nick.toLowerCase() ); if (user) { return user.user.avatarURL; } return null; } sendToDiscord(author, channel, text) { const discordChannelName = this.invertedMapping[channel.toLowerCase()]; ======= findDiscordChannel(ircChannel) { const discordChannelName = this.invertedMapping[ircChannel.toLowerCase()]; >>>>>>> getDiscordAvatar(nick) { const user = this.discord.guilds.first().members.find( member => member.user.username.toLowerCase() === nick.toLowerCase() ); if (user) { return user.user.avatarURL; } return null; } findDiscordChannel(ircChannel) { const discordChannelName = this.invertedMapping[ircChannel.toLowerCase()]; <<<<<<< if (this.webhooks[discordChannelName]) { this.webhooks[discordChannelName].client.sendMessage( text, { username: author, text, avatarURL: this.getDiscordAvatar(author) }).catch(logger.error); return; } ======= return discordChannel; } return null; } >>>>>>> return discordChannel; } return null; } findWebhook(ircChannel) { const discordChannelName = this.invertedMapping[ircChannel.toLowerCase()]; if (discordChannelName) { const webhook = this.webhooks[discordChannelName]; if (webhook) { return webhook; } } logger.info('Tried to send a message to a channel the bot isn\'t in or without webhook attached: ', discordChannelName); return null; }
<<<<<<< angular.module('vleApp') .service('Alerts', function($timeout, _) { ======= angular.module('polestar') .service('Alerts', function($timeout) { >>>>>>> angular.module('polestar') .service('Alerts', function($timeout, _) {
<<<<<<< import FireAndBrimstone from './Modules/Talents/FireAndBrimstone'; ======= import Backdraft from './Modules/Talents/Backdraft'; import RoaringBlaze from './Modules/Talents/RoaringBlaze'; import Shadowburn from './Modules/Talents/Shadowburn'; >>>>>>> import Backdraft from './Modules/Talents/Backdraft'; import RoaringBlaze from './Modules/Talents/RoaringBlaze'; import Shadowburn from './Modules/Talents/Shadowburn'; import ReverseEntropy from './Modules/Talents/ReverseEntropy'; import Eradication from './Modules/Talents/Eradication'; import EradicationTalent from './Modules/Talents/EradicationTalent'; import EmpoweredLifeTap from './Modules/Talents/EmpoweredLifeTap'; import FireAndBrimstone from './Modules/Talents/FireAndBrimstone'; <<<<<<< fireAndBrimstone: FireAndBrimstone, ======= reverseEntropy: ReverseEntropy, eradication: Eradication, eradicationTalent: EradicationTalent, empoweredLifeTap: EmpoweredLifeTap, backdraft: Backdraft, roaringBlaze: RoaringBlaze, shadowburn: Shadowburn, >>>>>>> backdraft: Backdraft, roaringBlaze: RoaringBlaze, shadowburn: Shadowburn, reverseEntropy: ReverseEntropy, eradication: Eradication, eradicationTalent: EradicationTalent, empoweredLifeTap: EmpoweredLifeTap, fireAndBrimstone: FireAndBrimstone,
<<<<<<< import { assign, defaults, isFunction, pick, filter, identity, isEqual } from "lodash"; ======= import { defaults, isFunction, pick, filter, identity, isEqual } from "lodash"; >>>>>>> import { assign, defaults, isFunction, pick, filter, identity, isEqual } from "lodash"; <<<<<<< const child = this.props.children; this.continuous = child.type && child.type.continuous; this.clipId = Math.round(Math.random() * 10000); ======= >>>>>>> const child = this.props.children; this.continuous = child.type && child.type.continuous; this.clipId = Math.round(Math.random() * 10000); <<<<<<< // TODO: This method is expensive, but also prevents unnecessary animations shouldAnimateProps(nextProps) { const getChildProps = (props) => { const childProps = props.children && props.children.props || {}; return props.animationWhitelist ? pick(childProps, props.animationWhitelist) : childProps; }; return !isEqual(getChildProps(this.props), getChildProps(nextProps)); } shouldAnimateState(nextProps, nextState) { const child = this.props.children; // the axes don't need to transition, they should only respond to props changes if (child.type.role && child.type.role === "axis") { return false; } const animateState = (state, forceLoad) => { const { nodesWillExit, nodesWillEnter, nodesShouldEnter, nodesShouldLoad, nodesDoneLoad, nodesDoneClipPathLoad, nodesDoneClipPathEnter, nodesDoneClipPathExit, animating } = state; const loading = forceLoad || !nodesDoneLoad && (!!nodesShouldLoad || nodesDoneClipPathLoad); const entering = nodesShouldEnter || nodesWillEnter || nodesDoneClipPathEnter; const exiting = nodesWillExit || nodesDoneClipPathExit; return (animating || this.state.animating) && (loading || entering || exiting); }; const props = nextState.oldProps || this.props; const parentState = props.animate && props.animate.parentState || nextProps.animate && nextProps.animate.parentState; if (!parentState) { return animateState(nextState); } // TODO: parentState does not have the correct nodesShouldLoad state const forceLoad = parentState.animating && !parentState.nodesDoneLoad; return animateState(parentState, forceLoad); } shouldComponentUpdate(nextProps, nextState) { if (this.shouldAnimateState(nextProps, nextState)) { return true; } else if (this.shouldAnimateProps(nextProps)) { return true; } return false; } ======= // TODO: This method is expensive, but also prevents unnecessary animations shouldAnimateProps(nextProps) { return !isEqual(this.getWhitelistedProps(this.props), this.getWhitelistedProps(nextProps)); } getWhitelistedProps(props) { const childProps = props.children && props.children.props || {}; return props.animationWhitelist ? pick(childProps, props.animationWhitelist) : childProps; } shouldAnimateState(nextProps, nextState) { const child = this.props.children; // the axes don't need to transition, they should only respond to props changes if (child.type.role && child.type.role === "axis") { return false; } const parentState = this.getParentState(nextProps, nextState); if (!parentState) { return this.animateState(nextState); } // TODO: parentState does not have the correct nodesShouldLoad state const forceLoad = parentState.animating && !parentState.nodesDoneLoad; return this.animateState(parentState, forceLoad); } getParentState(nextProps, nextState) { const props = nextState.oldProps || this.props; return props.animate && props.animate.parentState || nextProps.animate && nextProps.animate.parentState; } animateState(state, forceLoad) { const { nodesWillExit, nodesWillEnter, nodesShouldEnter, nodesShouldLoad, nodesDoneLoad, nodesDoneClipPathLoad, nodesDoneClipPathEnter, nodesDoneClipPathExit, animating } = state; const loading = forceLoad || !nodesDoneLoad && (!!nodesShouldLoad || nodesDoneClipPathLoad); const entering = nodesShouldEnter || nodesWillEnter || nodesDoneClipPathEnter; const exiting = nodesWillExit || nodesDoneClipPathExit; return (animating || this.state.animating) && (loading || entering || exiting); } shouldComponentUpdate(nextProps, nextState) { if (this.shouldAnimateState(nextProps, nextState)) { return true; } else if (this.shouldAnimateProps(nextProps)) { return true; } return false; } >>>>>>> // TODO: This method is expensive, but also prevents unnecessary animations shouldAnimateProps(nextProps) { return !isEqual(this.getWhitelistedProps(this.props), this.getWhitelistedProps(nextProps)); } getWhitelistedProps(props) { const childProps = props.children && props.children.props || {}; return props.animationWhitelist ? pick(childProps, props.animationWhitelist) : childProps; } shouldAnimateState(nextProps, nextState) { const child = this.props.children; // the axes don't need to transition, they should only respond to props changes if (child.type.role && child.type.role === "axis") { return false; } const parentState = this.getParentState(nextProps, nextState); if (!parentState) { return this.animateState(nextState); } // TODO: parentState does not have the correct nodesShouldLoad state const forceLoad = parentState.animating && !parentState.nodesDoneLoad; return this.animateState(parentState, forceLoad); } getParentState(nextProps, nextState) { const props = nextState.oldProps || this.props; return props.animate && props.animate.parentState || nextProps.animate && nextProps.animate.parentState; } animateState(state, forceLoad) { const { nodesWillExit, nodesWillEnter, nodesShouldEnter, nodesShouldLoad, nodesDoneLoad, nodesDoneClipPathLoad, nodesDoneClipPathEnter, nodesDoneClipPathExit, animating } = state; const loading = forceLoad || !nodesDoneLoad && (!!nodesShouldLoad || nodesDoneClipPathLoad); const entering = nodesShouldEnter || nodesWillEnter || nodesDoneClipPathEnter; const exiting = nodesWillExit || nodesDoneClipPathExit; return (animating || this.state.animating) && (loading || entering || exiting); } shouldComponentUpdate(nextProps, nextState) { if (this.shouldAnimateState(nextProps, nextState)) { return true; } else if (this.shouldAnimateProps(nextProps)) { return true; } return false; } <<<<<<< const animationWhitelist = props.animationWhitelist || []; const whitelist = this.continuous ? animationWhitelist.concat(this.getClipPathWhitelist(transitionProps)) : animationWhitelist; const propsToAnimate = whitelist.length ? pick(combinedProps, whitelist) : combinedProps; ======= const animationWhitelist = props.animationWhitelist; const clipPathWhitelist = this.getClipPathWhitelist(transitionProps); const propsToAnimate = animationWhitelist ? pick(combinedProps, animationWhitelist.concat(clipPathWhitelist)) : combinedProps; >>>>>>> const animationWhitelist = props.animationWhitelist || []; const whitelist = this.continuous ? animationWhitelist.concat(this.getClipPathWhitelist(transitionProps)) : animationWhitelist; const propsToAnimate = whitelist.length ? pick(combinedProps, whitelist) : combinedProps;
<<<<<<< exp: require( './exp.js' ), process: require( './process.js' ) ======= exp: require( './exp.js' ), seq: require( './seq.js' ) >>>>>>> exp: require( './exp.js' ), process: require( './process.js' ), seq: require( './seq.js' )
<<<<<<< var open_me = this.textContent === this.dataset.toggleOpen; if (id === '' || !id) { return; } ======= var open_me = this.textContent == this.dataset.toggleOpen; >>>>>>> var open_me = this.textContent === this.dataset.toggleOpen;
<<<<<<< ;/*! showdown 03-08-2015 */ ======= ;/*! showdown 19-10-2015 */ >>>>>>> ;/*! showdown 19-10-2015 */ <<<<<<< listeners = { }; ======= /** * The parser Order * @private * @type {string[]} */ parserOrder = [ 'githubCodeBlocks', 'hashHTMLBlocks', 'hashHTMLSpans', 'stripLinkDefinitions', 'blockGamut', 'unhashHTMLSpans', 'unescapeSpecialChars' ]; >>>>>>> /** * Event listeners * @private * @type {{}} */ listeners = {}; <<<<<<< text = globals.converter._dispatch('blockGamut.before', text, options); ======= // we parse blockquotes first so that we can have headings and hrs // inside blockquotes text = showdown.subParser('blockQuotes')(text, options, globals); >>>>>>> text = globals.converter._dispatch('blockGamut.before', text, options); // we parse blockquotes first so that we can have headings and hrs // inside blockquotes text = showdown.subParser('blockQuotes')(text, options, globals);
<<<<<<< 20-06-2017 - Change home page layout (by Zerotorescue) ======= 23-06-2017 - Resto Druid: Added Essence of G'hanir (by Blazyb) >>>>>>> 23-06-2017 - Change home page layout (by Zerotorescue) 23-06-2017 - Resto Druid: Added Essence of G'hanir (by Blazyb)
<<<<<<< }; // Facil'ITI tarteaucitron.services.faciliti = { "key": "faciliti", "type": "other", "name": "Facil'ITI", "uri": "https://ws.facil-iti.com/mentions-legales.html", "needConsent": true, "cookies": ['FACIL_ITI_LS'], "js": function () { "use strict"; if (tarteaucitron.user.facilitiID === undefined) { return; } (function(w, d, s, f) { w[f] = w[f] || {conf: function () { (w[f].data = w[f].data || []).push(arguments);}}; var l = d.createElement(s), e = d.getElementsByTagName(s)[0]; l.async = 1; l.src = 'https://ws.facil-iti.com/tag/faciliti-tag.min.js'; e.parentNode.insertBefore(l, e); }(window, document, 'script', 'FACIL_ITI')); FACIL_ITI.conf('userId', tarteaucitron.user.facilitiID); } }; ======= }; // userlike tarteaucitron.services.userlike = { "key": "userlike", "type": "support", "name": "Userlike", "uri": "https://www.userlike.com/en/terms#privacy-policy", "needConsent": true, "cookies": ['uslk_s', 'uslk_e'], "js": function () { "use strict"; if (tarteaucitron.user.userlikeKey === undefined) { return; } tarteaucitron.addScript('//userlike-cdn-widgets.s3-eu-west-1.amazonaws.com/' + tarteaucitron.user.userlikeKey); } }; >>>>>>> }; // Facil'ITI tarteaucitron.services.faciliti = { "key": "faciliti", "type": "other", "name": "Facil'ITI", "uri": "https://ws.facil-iti.com/mentions-legales.html", "needConsent": true, "cookies": ['FACIL_ITI_LS'], "js": function () { "use strict"; if (tarteaucitron.user.facilitiID === undefined) { return; } (function(w, d, s, f) { w[f] = w[f] || {conf: function () { (w[f].data = w[f].data || []).push(arguments);}}; var l = d.createElement(s), e = d.getElementsByTagName(s)[0]; l.async = 1; l.src = 'https://ws.facil-iti.com/tag/faciliti-tag.min.js'; e.parentNode.insertBefore(l, e); }(window, document, 'script', 'FACIL_ITI')); FACIL_ITI.conf('userId', tarteaucitron.user.facilitiID); } }; // userlike tarteaucitron.services.userlike = { "key": "userlike", "type": "support", "name": "Userlike", "uri": "https://www.userlike.com/en/terms#privacy-policy", "needConsent": true, "cookies": ['uslk_s', 'uslk_e'], "js": function () { "use strict"; if (tarteaucitron.user.userlikeKey === undefined) { return; } tarteaucitron.addScript('//userlike-cdn-widgets.s3-eu-west-1.amazonaws.com/' + tarteaucitron.user.userlikeKey); } };
<<<<<<< export const FETCHING_LATEST_MHV_TERMS = 'FETCHING_LATEST_MHV_TERMS'; export const FETCHING_LATEST_MHV_TERMS_SUCCESS = 'FETCHING_LATEST_MHV_TERMS_SUCCESS'; export const FETCHING_LATEST_MHV_TERMS_FAILURE = 'FETCHING_LATEST_MHV_TERMS_FAILURE'; export const ACCEPTING_LATEST_MHV_TERMS = 'ACCEPTING_LATEST_MHV_TERMS'; export const ACCEPTING_LATEST_MHV_TERMS_SUCCESS = 'ACCEPTING_LATEST_MHV_TERMS_SUCCESS'; export const ACCEPTING_LATEST_MHV_TERMS_FAILURE = 'ACCEPTING_LATEST_MHV_TERMS_FAILURE'; ======= export const PROFILE_LOADING_FINISHED = 'PROFILE_LOADING_FINISHED'; >>>>>>> export const PROFILE_LOADING_FINISHED = 'PROFILE_LOADING_FINISHED'; export const FETCHING_LATEST_MHV_TERMS = 'FETCHING_LATEST_MHV_TERMS'; export const FETCHING_LATEST_MHV_TERMS_SUCCESS = 'FETCHING_LATEST_MHV_TERMS_SUCCESS'; export const FETCHING_LATEST_MHV_TERMS_FAILURE = 'FETCHING_LATEST_MHV_TERMS_FAILURE'; export const ACCEPTING_LATEST_MHV_TERMS = 'ACCEPTING_LATEST_MHV_TERMS'; export const ACCEPTING_LATEST_MHV_TERMS_SUCCESS = 'ACCEPTING_LATEST_MHV_TERMS_SUCCESS'; export const ACCEPTING_LATEST_MHV_TERMS_FAILURE = 'ACCEPTING_LATEST_MHV_TERMS_FAILURE'; <<<<<<< } export function fetchLatestTerms(termsName) { return dispatch => { dispatch({ type: FETCHING_LATEST_MHV_TERMS }); apiRequest( `/terms_and_conditions/${termsName}/versions/latest`, null, response => dispatch({ type: FETCHING_LATEST_MHV_TERMS_SUCCESS, terms: response.data.attributes }), () => dispatch({ type: FETCHING_LATEST_MHV_TERMS_FAILURE }) ); }; } export function acceptTerms(termsName) { return dispatch => { dispatch({ type: ACCEPTING_LATEST_MHV_TERMS }); const settings = { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ name: termsName, }) }; apiRequest( `/terms_and_conditions/${termsName}/versions/latest/user_data`, settings, () => { dispatch({ type: ACCEPTING_LATEST_MHV_TERMS_SUCCESS }); getUserData(dispatch); }, () => dispatch({ type: ACCEPTING_LATEST_MHV_TERMS_FAILURE }) ); }; ======= } export function profileLoadingFinished() { return { type: PROFILE_LOADING_FINISHED }; >>>>>>> } export function profileLoadingFinished() { return { type: PROFILE_LOADING_FINISHED }; } export function fetchLatestTerms(termsName) { return dispatch => { dispatch({ type: FETCHING_LATEST_MHV_TERMS }); apiRequest( `/terms_and_conditions/${termsName}/versions/latest`, null, response => dispatch({ type: FETCHING_LATEST_MHV_TERMS_SUCCESS, terms: response.data.attributes }), () => dispatch({ type: FETCHING_LATEST_MHV_TERMS_FAILURE }) ); }; } export function acceptTerms(termsName) { return dispatch => { dispatch({ type: ACCEPTING_LATEST_MHV_TERMS }); const settings = { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ name: termsName, }) }; apiRequest( `/terms_and_conditions/${termsName}/versions/latest/user_data`, settings, () => { dispatch({ type: ACCEPTING_LATEST_MHV_TERMS_SUCCESS }); getUserData(dispatch); }, () => dispatch({ type: ACCEPTING_LATEST_MHV_TERMS_FAILURE }) ); };
<<<<<<< terms: { loading: false, terms: {}, }, savedForms: [] ======= savedForms: [], prefillsAvailable: [] >>>>>>> terms: { loading: false, terms: {}, }, savedForms: [], prefillsAvailable: []
<<<<<<< var items = []; ======= var items = {}; var _this$props = _this.props, pageRangeDisplayed = _this$props.pageRangeDisplayed, pageCount = _this$props.pageCount, marginPagesDisplayed = _this$props.marginPagesDisplayed, breakLabel = _this$props.breakLabel, breakClassName = _this$props.breakClassName; var selected = _this.state.selected; >>>>>>> var items = []; var _this$props = _this.props, pageRangeDisplayed = _this$props.pageRangeDisplayed, pageCount = _this$props.pageCount, marginPagesDisplayed = _this$props.marginPagesDisplayed, breakLabel = _this$props.breakLabel, breakClassName = _this$props.breakClassName; var selected = _this.state.selected; <<<<<<< for (var index = 0; index < _this.props.pageCount; index++) { items.push(_this.getPageElement(index)); ======= for (var index = 0; index < pageCount; index++) { items['key' + index] = _this.getPageElement(index); >>>>>>> for (var index = 0; index < pageCount; index++) { items.push(_this.getPageElement(index)); <<<<<<< key: _index, breakLabel: _this.props.breakLabel, breakClassName: _this.props.breakClassName ======= breakLabel: breakLabel, breakClassName: breakClassName >>>>>>> key: _index, breakLabel: breakLabel, breakClassName: breakClassName
<<<<<<< // Chi import ChiDetails from './Modules/Chi/ChiDetails'; import ChiTracker from './Modules/Chi/ChiTracker'; ======= // Spells import ComboBreaker from './Modules/Spells/ComboBreaker'; >>>>>>> // Chi import ChiDetails from './Modules/Chi/ChiDetails'; import ChiTracker from './Modules/Chi/ChiTracker'; // Spells import ComboBreaker from './Modules/Spells/ComboBreaker'; <<<<<<< // Resources chiTracker: ChiTracker, chiDetails: ChiDetails, ======= // Spells; comboBreaker: ComboBreaker, >>>>>>> // Resources chiTracker: ChiTracker, chiDetails: ChiDetails, // Spells; comboBreaker: ComboBreaker,
<<<<<<< ======= style={[defaultStyle, customStyle]} >>>>>>> style={[defaultStyle, customStyle]}
<<<<<<< expect(bound.isBoundMethod(function(){})).to.be(false); expect(bound.isBoundMethod(B({}))).to.be(true); ======= expect(B.isProxy(function(){})).to.be(false); expect(B.isProxy(bound.proxy({}).bound)).to.be(true); >>>>>>> expect(B.isProxy(function(){})).to.be(false); expect(B.isProxy(bound.proxy({}).bound)).to.be(true); <<<<<<< bound.autorun(function() { B(alice).get('name'); ======= B.depend(function() { alice.bound('get', 'name'); >>>>>>> B.depend(function() { B(alice).get('name'); <<<<<<< bound.autorun(function(){ B(alice).has('hamburger'); ======= B.depend(function(){ alice.bound('has', 'hamburger'); >>>>>>> B.depend(function(){ B(alice).has('hamburger'); <<<<<<< bound.autorun(function(){ B(alice).get('name'); ======= B.depend(function(){ alice.bound('get', 'name'); >>>>>>> B.depend(function(){ B(alice).get('name');
<<<<<<< import RollingHavoc from './modules/azerite/RollingHavoc'; ======= import BurstingFlare from './modules/azerite/BurstingFlare'; >>>>>>> import RollingHavoc from './modules/azerite/RollingHavoc'; import BurstingFlare from './modules/azerite/BurstingFlare';
<<<<<<< import BrewCDR from './Modules/Core/BrewCDR'; ======= import StaggerFabricator from './Modules/Core/StaggerFabricator'; >>>>>>> import BrewCDR from './Modules/Core/BrewCDR'; import StaggerFabricator from './Modules/Core/StaggerFabricator'; <<<<<<< import AnvilHardenedWristwraps from './Modules/Items/AnvilHardenedWristwraps'; ======= // normalizers import IronskinBrewNormalizer from './Modules/Normalizers/IronskinBrew'; >>>>>>> import AnvilHardenedWristwraps from './Modules/Items/AnvilHardenedWristwraps'; // normalizers import IronskinBrewNormalizer from './Modules/Normalizers/IronskinBrew'; <<<<<<< ahw: AnvilHardenedWristwraps, ======= // normalizers isbNormalizer: IronskinBrewNormalizer, >>>>>>> ahw: AnvilHardenedWristwraps, // normalizers isbNormalizer: IronskinBrewNormalizer,
<<<<<<< // the others that have the same remote.resovled will just refer to the first // oredring allows for consistency in lockfile when it is serialized let sortedPatternsKeys: Array<string> = Object.keys(patterns).sort(sortAlpha); ======= // the others that have the same remote.resolved will just refer to the first // ordering allows for consistency in lockfile when it is serialized let sortedPatternsKeys: string[] = Object.keys(patterns).sort(function (a, b): number { return a.toLowerCase().localeCompare(b.toLowerCase()); }); >>>>>>> // the others that have the same remote.resolved will just refer to the first // ordering allows for consistency in lockfile when it is serialized let sortedPatternsKeys: Array<string> = Object.keys(patterns).sort(sortAlpha);
<<<<<<< style={!node.parent ? styles[node.name] : null} ======= onLongPress={linkLongPressHandler} >>>>>>> style={!node.parent ? styles[node.name] : null} onLongPress={linkLongPressHandler}
<<<<<<< ======= "fourth": function(num) { return $.ngettext("fourth", "fourths", num); }, "full symbol": function(num) { return $.ngettext("full symbol", "full symbols", num); }, "green dot": function(num) { return $.ngettext("green dot", "green dots", num); }, "hour": function(num) { return $.ngettext("hour", "hours", num); }, "house point": function(num) { return $.ngettext("house point", "house points", num); }, "hundred": function(num) { // I18N: As in the HUNDREDS position of a number return $.ngettext("hundred", "hundreds", num); }, "hundredth": function(num) { // I18N: As in the HUNDREDTHS position of a number return $.ngettext("hundredth", "hundredths", num); }, // TODO(jeresig): i18n: This may be a bad thing to pluralize "is": function(num) { return $.ngettext("is", "are", num); }, "jumping jack": function(num) { return $.ngettext("jumping jack", "jumping jacks", num); }, >>>>>>> <<<<<<< ======= "side": function(num) { return $.ngettext("side", "sides", num); }, "sit-up": function(num) { return $.ngettext("sit-up", "sit-ups", num); }, "slice": function(num) { return $.ngettext("slice", "slices", num); }, "sprinter": function(num) { return $.ngettext("sprinter", "sprinters", num); }, >>>>>>> <<<<<<< ======= "squat": function(num) { return $.ngettext("squat", "squats", num); }, "standard deviation": function(num) { return $.ngettext("standard deviation", "standard deviations", num); }, "symbol": function(num) { return $.ngettext("symbol", "symbols", num); }, >>>>>>> <<<<<<< plural: function(value, arg1) { if (typeof value === "number") { // I18N: This is used to generate the string: NUMBER OBJECT // For example: 5 cats, 1 dog, etc. return $._("%s %s", value, this.plural_form(arg1, value)); } else if (typeof value === "string") { return this.plural_form(value, arg1); } }, ======= plural: (function() { var genPlural = function(word, num) { if (word in KhanUtil.plurals) { return KhanUtil.plurals[word](num); } // TODO(jeresig): i18n: Eventually remove this? if (typeof console !== "undefined" && console.error) { console.error("Word not in plural dictionary: ", word); } return word; }; return function(value, arg1) { if (typeof value === "number") { // I18N: This is used to generate the string: NUMBER OBJECT // For example: 5 cats, 1 dog, etc. return $._("%(number)s %(object)s", {number: value, object: genPlural(arg1, value)}); } else if (typeof value === "string") { return genPlural(value, arg1); } }; })(), >>>>>>> plural: (function() { var genPlural = function(word, num) { if (word in KhanUtil.plurals) { return KhanUtil.plurals[word](num); } // TODO(jeresig): i18n: Eventually remove this? if (typeof console !== "undefined" && console.error) { console.error("Word not in plural dictionary: ", word); } return word; }; return function(value, arg1) { if (typeof value === "number") { // I18N: This is used to generate the string: NUMBER OBJECT // For example: 5 cats, 1 dog, etc. return $._("%(number)s %(object)s", {number: value, object: genPlural(arg1, value)}); } else if (typeof value === "string") { return genPlural(value, arg1); } }; })(),
<<<<<<< issueError = function() { return $._("Communication with GitHub isn't working. Please file " + "the issue manually at <a href=\"" + "http://github.com/Khan/khan-exercises/issues/new\">GitHub</a>. " + "Please reference exercise: %s.", exerciseId); }, ======= // "Check answer" or in assessmentMode "Submit answer" - set in prepareSite originalCheckAnswerText = "", issueError = "Communication with GitHub isn't working. Please file " + "the issue manually at <a href=\"" + "http://github.com/Khan/khan-exercises/issues/new\">GitHub</a>. " + "Please reference exercise: " + exerciseId + ".", >>>>>>> // "Check answer" or in assessmentMode "Submit answer" - set in prepareSite originalCheckAnswerText = "", issueError = function() { return $._("Communication with GitHub isn't working. Please file " + "the issue manually at <a href=\"" + "http://github.com/Khan/khan-exercises/issues/new\">GitHub</a>. " + "Please reference exercise: %s.", exerciseId); }, <<<<<<< "answer-types", "tmpl", "underscore", "jquery.adhesion", "hints", "calculator", "i18n" ======= "answer-types", "tmpl", "jquery.adhesion", "hints", "calculator" >>>>>>> "answer-types", "tmpl", "jquery.adhesion", "hints", "calculator" <<<<<<< .val($._("Check Answer")); ======= .val(originalCheckAnswerText); >>>>>>> .val(originalCheckAnswerText);
<<<<<<< if ( jQuery.browser.msie ) { jQuery( "#warning-bar" ).fadeIn( "fast" ); } ======= warn( 'You should ' + '<a href="http://missmarcialee.com/2011/08/how-to-enable-font-download-in-internet-explorer-8/" ' + 'target="_blank">enable font download</a> to improve the appearance of math expressions.', true ); >>>>>>> if ( jQuery.browser.msie ) { warn( 'You should ' + '<a href="http://missmarcialee.com/2011/08/how-to-enable-font-download-in-internet-explorer-8/" ' + 'target="_blank">enable font download</a> to improve the appearance of math expressions.', true ); }
<<<<<<< _insert(items, outline, type) { // this only needs the size of the item. const clone = items.map(item => Object.assign({}, item)); const result = this._layout(clone, outline, type); ======= setViewport(width, height) { this.width = width; this.height = height; } append(items, outline) { const clone = items.map(item => Object.assign({}, item)); >>>>>>> _insert(items, outline, type) { // this only needs the size of the item. const clone = items.map(item => Object.assign({}, item));
<<<<<<< date: new Date('2018-11-12'), changes: 'Added an AverageTargetsHit module for general usage.', contributors: [Putro], }, { ======= date: new Date('2018-11-12'), changes: <>Added <ItemLink id={ITEMS.AZEROKKS_RESONATING_HEART.id} /> module.</>, contributors: [Aelexe], }, { >>>>>>> date: new Date('2018-11-12'), changes: 'Added an AverageTargetsHit module for general usage.', contributors: [Putro], }, { date: new Date('2018-11-12'), changes: <>Added <ItemLink id={ITEMS.AZEROKKS_RESONATING_HEART.id} /> module.</>, contributors: [Aelexe], }, {
<<<<<<< 'isCanvasSupported': function () { var el = document.createElement('canvas'); return !!(el.getContext && el.getContext('2d')); }, 'isConsoleSupported': function () { var console = window.console; return console && this.isFunction(console.log); }, ======= 'isCanvasSupported': function () { var el = document.createElement('canvas'); return !!(el.getContext && el.getContext('2d')); }, 'isConsoleSupported': function () { var console = window.console; return console && this.isFunction(console.log); }, 'log': function () { if (this.isConsoleSupported()) { console.log.apply(window.console, arguments); } }, >>>>>>> 'isCanvasSupported': function () { var el = document.createElement('canvas'); return !!(el.getContext && el.getContext('2d')); }, 'isConsoleSupported': function () { var console = window.console; return console && this.isFunction(console.log); }, 'log': function () { if (this.isConsoleSupported()) { console.log.apply(window.console, arguments); } }, <<<<<<< var images = [], i = 0, canvas, img; if (!util.isCanvasSupported()) { if (isConsoleSupported()) { console.log('ERROR: Canvas not supported'); } return; } img = document.createElement('img'); canvas = document.createElement('canvas'); context = canvas.getContext('2d'); videoElement.onclick = snapShot; ======= var canvas = document.createElement('canvas'); if (!util.isCanvasSupported()) { utils.log('ERROR: Canvas not supported'); return; } videoElement.onclick = snapShot; >>>>>>> var images = [], i = 0, canvas, img; if (!util.isCanvasSupported()) { utils.log('ERROR: Canvas not supported'); return; } img = document.createElement('img'); canvas = document.createElement('canvas'); context = canvas.getContext('2d'); videoElement.onclick = snapShot; <<<<<<< document.body.appendChild(img); function snapShot() { if (cameraStream) { canvas.width = videoElement.videoWidth; canvas.height = videoElement.videoHeight; context.drawImage(videoElement, 0, 0, videoElement.videoWidth, videoElement.videoHeight); console.log(context.getImageData(0, 0, videoElement.videoWidth, videoElement.videoHeight)); images.push(canvas.toDataURL('image/gif')); } } setInterval(function () { if (images.length) { var next = ++i; i = images.length && next < images.length ? i : 0; img.src = images[i]; } }, 100); ======= function snapShot() { if (cameraStream) { canvas.width = video.videoWidth; canvas.height = video.videoHeight; ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight); images.push(canvas.toDataURL('image/gif')); } } >>>>>>> document.body.appendChild(img); function snapShot() { if (cameraStream) { canvas.width = videoElement.videoWidth; canvas.height = videoElement.videoHeight; context.drawImage(videoElement, 0, 0, videoElement.videoWidth, videoElement.videoHeight); console.log(context.getImageData(0, 0, videoElement.videoWidth, videoElement.videoHeight)); images.push(canvas.toDataURL('image/gif')); } } setInterval(function () { if (images.length) { var next = ++i; i = images.length && next < images.length ? i : 0; img.src = images[i]; } }, 100);
<<<<<<< const { Heritage } = require("sdk/core/heritage"); const { logPerformanceTiming } = require("./performance-timing.js"); ======= const { ToolbarButton } = require("../chrome/panelToolbar.js"); const { ToggleSideBarButton } = require("../chrome/toggleSideBarButton.js"); // Side panels const { DomSidePanel } = require("../dom/domSidePanel.js"); const { CommandEditor } = require("./command-editor.js"); >>>>>>> const { logPerformanceTiming } = require("./performance-timing.js"); const { ToolbarButton } = require("../chrome/panelToolbar.js"); const { ToggleSideBarButton } = require("../chrome/toggleSideBarButton.js"); // Side panels const { DomSidePanel } = require("../dom/domSidePanel.js"); const { CommandEditor } = require("./command-editor.js"); <<<<<<< const { gDevTools } = Cu.import("resource:///modules/devtools/gDevTools.jsm", {}); const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); ======= const { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); const { Messages, Widgets } = devtools["require"]("devtools/webconsole/console-output"); const Heritage = require("sdk/core/heritage"); >>>>>>> <<<<<<< loadSheet(iframeWin, "chrome://firebug/skin/performance-timing.css", "author"); Theme.customizeSideBarSplitter(iframeWin, true); ======= >>>>>>> loadSheet(iframeWin, "chrome://firebug/skin/performance-timing.css", "author"); Theme.customizeSideBarSplitter(iframeWin, true); <<<<<<< removeSheet(iframeWin, "chrome://firebug/skin/performance-timing.css", "author"); Theme.customizeSideBarSplitter(iframeWin, false); ======= >>>>>>> removeSheet(iframeWin, "chrome://firebug/skin/performance-timing.css", "author"); Theme.customizeSideBarSplitter(iframeWin, false);
<<<<<<< // xxxHonza: remove? const loggers = new WeakMap(); ======= >>>>>>> <<<<<<< } loggers.set(toolbox.target, actorFront); ======= >>>>>>> }
<<<<<<< this.toolbox = options.toolbox; this.panelFrame = options.panelFrame; // Bind event listeners to preserve |this| scope when handling events. ======= >>>>>>> this.toolbox = options.toolbox; this.panelFrame = options.panelFrame; // Bind event listeners to preserve |this| scope when handling events. <<<<<<< this.onNewMessages = this.onNewMessages.bind(this); ======= this.onSidebarClosed = this.onSidebarClosed.bind(this); >>>>>>> this.onSidebarClosed = this.onSidebarClosed.bind(this); this.onNewMessages = this.onNewMessages.bind(this); <<<<<<< // Add listeners to {@WebConsoleFrame} object to hook message logging. // xxxHonza: The following platform bug needs to be fixed to get the event // https://bugzilla.mozilla.org/show_bug.cgi?id=1035707 // (use attached patch and custom Firefox build for now) hud.ui.on("new-messages", this.onNewMessages); ======= // Install custom proxy to intercept console.* API and customize // rendering (using registered reps). this.overlayProxy(); this.setupSidePanels(); this.updateSideSplitterTheme(); >>>>>>> // Add listeners to {@WebConsoleFrame} object to hook message logging. // xxxHonza: The following platform bug needs to be fixed to get the event // https://bugzilla.mozilla.org/show_bug.cgi?id=1035707 // (use attached patch and custom Firefox build for now) hud.ui.on("new-messages", this.onNewMessages); // Install custom proxy to intercept console.* API and customize // rendering (using registered reps). this.setupSidePanels(); this.updateSideSplitterTheme(); <<<<<<< // Remove listeners from {@WebConsoleFrame} object. hud.ui.off("new-messages", this.onNewMessages); ======= jsterm.off("sidebar-closed", this.onSidebarClosed); >>>>>>> jsterm.off("sidebar-closed", this.onSidebarClosed); // Remove listeners from {@WebConsoleFrame} object. hud.ui.off("new-messages", this.onNewMessages);
<<<<<<< const ResourceRow = props => <div class='valign-wrapper col s12 resource-row' style={{ padding: '16px' }} > ======= class ResourceRow extends Component { state = { displayContent: false } >>>>>>> class ResourceRow extends Component { state = { displayContent: false } <<<<<<< </div> </div> ======= </div> <style jsx> {` .resource-row:first-of-type { border-top: 1px solid rgba(0, 0, 0, 0.54); } `} </style> </div> ) } } >>>>>>> </div> </div> ) } }
<<<<<<< //print("Computing fixed intervals"); fixedIntervals = allocator.fixedIntervals(cfg, params); ======= print("Computing fixed intervals"); fixedIntervals = allocator.fixedIntervals(order, params); >>>>>>> //print("Computing fixed intervals"); fixedIntervals = allocator.fixedIntervals(order, params);
<<<<<<< print(ir); print(ir.getChild('foo').linking.getEntryPoint().getAddr()); ======= >>>>>>>
<<<<<<< print(mnemonic); // If no type specifications were specified, add an empty one if (typeSpecs.length == 0) typeSpecs = [[]]; ======= // Ensure that the input type specifications are valid assert ( inTypeSpecs instanceof Array, 'invalid input type specifications specified' ); >>>>>>> // Ensure that the input type specifications are valid assert ( inTypeSpecs instanceof Array, 'invalid input type specifications specified' ); <<<<<<< [IRType.POINTER, IRType.INT32], [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] ======= [IRType.POINTER], [IRType.UINT16], [IRType.UINT32], [IRType.INT16], [IRType.INT32] >>>>>>> [IRType.POINTER, IRType.INT32], [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] <<<<<<< [IRType.POINTER, IRType.INT32], [IRType.POINTER, IRType.POINTER], [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] ======= [IRType.POINTER], [IRType.UINT16], [IRType.UINT32], [IRType.INT16], [IRType.INT32] >>>>>>> [IRType.POINTER, IRType.INT32], [IRType.POINTER, IRType.POINTER], [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] <<<<<<< [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] ======= [IRType.UINT16], [IRType.UINT32], [IRType.INT16], [IRType.INT32] >>>>>>> [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] <<<<<<< [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] ======= [IRType.UINT16], [IRType.UINT32], [IRType.INT16], [IRType.INT32] >>>>>>> [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] <<<<<<< [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] ======= [IRType.UINT16], [IRType.UINT32], [IRType.INT16], [IRType.INT32] >>>>>>> [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] <<<<<<< [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] ======= [IRType.UINT16], [IRType.UINT32], [IRType.INT16], [IRType.INT32] >>>>>>> [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] <<<<<<< [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] ======= [IRType.UINT16], [IRType.UINT32], [IRType.INT16], [IRType.INT32] >>>>>>> [IRType.UINT16, IRType.UINT16], [IRType.UINT32, IRType.UINT32], [IRType.INT16, IRType.INT16], [IRType.INT32, IRType.INT32] <<<<<<< ======= // // Test code // var i1 = new UnboxInstr(IRType.POINTER, ConstValue.getConst(1)); >>>>>>>
<<<<<<< track = new TrackController( _media, bTrack, _trackliner ); bTrack.order = Object.keys( _tracks ).length; ======= track = new TrackController( _media, bTrack, _trackliner, null, { mousedown: onTrackEventMouseDown }); >>>>>>> track = new TrackController( _media, bTrack, _trackliner, null, { mousedown: onTrackEventMouseDown }); bTrack.order = Object.keys( _tracks ).length;
<<<<<<< butter && butter.trigger( "trackadded", track ); ======= var events = track.getTrackEvents(); for ( var i=0, l=events.length; i<l; ++i ) { butter.trigger( "trackeventadded", events[i] ); } //for butter.trigger( "trackadded", track ); >>>>>>> var events = track.getTrackEvents(); for ( var i=0, l=events.length; i<l; ++i ) { butter.trigger( "trackeventadded", events[i] ); } //for butter && butter.trigger( "trackadded", track ); <<<<<<< butter && butter.trigger( "trackremoved", track ); ======= var events = track.getTrackEvents(); for ( var i=0, l=events.length; i<l; ++i ) { butter.trigger( "trackeventremoved", events[i] ); } //for butter.trigger( "trackremoved", track ); >>>>>>> var events = track.getTrackEvents(); for ( var i=0, l=events.length; i<l; ++i ) { butter.trigger( "trackeventremoved", events[i] ); } //for butter && butter.trigger( "trackremoved", track );
<<<<<<< import ExplosivePotential from './modules/azerite/ExplosivePotential'; ======= import SupremeCommander from './modules/azerite/SupremeCommander'; >>>>>>> import ExplosivePotential from './modules/azerite/ExplosivePotential'; import SupremeCommander from './modules/azerite/SupremeCommander'; <<<<<<< explosivePotential: ExplosivePotential, ======= supremeCommander: SupremeCommander, >>>>>>> explosivePotential: ExplosivePotential, supremeCommander: SupremeCommander,
<<<<<<< "core/page", ======= "io/cornfield", >>>>>>> "core/page", "io/cornfield", <<<<<<< Page, ======= CornfieldModule, >>>>>>> Page, CornfieldModule, <<<<<<< ui: UIModule }; //modules ======= preview: PreviewModule, ui: UIModule, cornfield: CornfieldModule }; >>>>>>> ui: UIModule cornfield: CornfieldModule }; //modules
<<<<<<< _this = this, _isPlaying = false, _isScrubbing = false; ======= _lastTime = -1, _lastScroll = -1, _this = this; >>>>>>> _isPlaying = false, _isScrubbing = false, _lastTime = -1, _lastScroll = -1, _this = this;
<<<<<<< margin: 5px 0; ======= margin: 0; box-shadow: none; >>>>>>> margin: 5px 0; box-shadow: none; <<<<<<< margin: 0 5px; ======= >>>>>>> margin: 0 5px;
<<<<<<< import { getProfilePath } from 'utils/helper' ======= import DistrictSelector from 'components/molecules/DistrictSelector' >>>>>>> import { getProfilePath } from 'utils/helper' import DistrictSelector from 'components/molecules/DistrictSelector'
<<<<<<< <Route path="/(en|zh)?"> <LangSwitch /> </Route> ======= <Route exact path="/" component={withTracker(IndexPage)} /> <Route path="/profile/:name/:uuid" component={withTracker(ProfilePage)} /> <Route path="/district/:year/tags/:tag" component={withTracker(DistrictListPage)} /> <Route path="/district/:year/:code(\w{1})" component={withTracker(DistrictOverviewPage)} /> <Route path="/district/2019/:code" component={withTracker(BattleGroundPage)} /> <Route path="/district/:year/:code" component={withTracker(DistrictPage)} /> <Route path="/district/:year" component={withTracker(DistrictAllPage)} /> <Route path="/disclaimer" component={withTracker(DisclaimerPage)} /> <Route path="/about-dc" component={withTracker(AboutDCPage)} /> <Route path="/about-us" component={withTracker(SupportUsPage)} /> <Route component={withTracker(NotfoundPage)} /> >>>>>>> <Route path="/(en|zh)?"> <LangSwitch /> </Route> <Route exact path="/" component={withTracker(IndexPage)} /> <Route path="/profile/:name/:uuid" component={withTracker(ProfilePage)} /> <Route path="/district/:year/tags/:tag" component={withTracker(DistrictListPage)} /> <Route path="/district/:year/:code(\w{1})" component={withTracker(DistrictOverviewPage)} /> <Route path="/district/2019/:code" component={withTracker(BattleGroundPage)} /> <Route path="/district/:year/:code" component={withTracker(DistrictPage)} /> <Route path="/district/:year" component={withTracker(DistrictAllPage)} /> <Route path="/disclaimer" component={withTracker(DisclaimerPage)} /> <Route path="/about-dc" component={withTracker(AboutDCPage)} /> <Route path="/about-us" component={withTracker(SupportUsPage)} /> <Route component={withTracker(NotfoundPage)} />
<<<<<<< const dataFroGraph = groupDataByRegionAndCamp(data.dcd_candidates) const dataForD3 = convertToD3Compatible(dataFroGraph) let d3Data = dataForD3 if (!isLoadingPrediction && predictEnabled) { const expectedDataForGraph = groupExpectDataByRegionAndCamp( predictoinData.dcd_constituencies, settings ) d3Data = convertToD3Compatible( expectedDataForGraph, sortByDefaultChartOrderFunc(dataForD3) ) } return ( <Container className={className}> <PredictionChartHeader> <Text variant="h5"> {/* {predictEnabled ? '2019選舉結果模擬' : '現屆區議會勢力分布'} */} {predictEnabled ? t('predictionChartHeader.text1') : t('predictionChartHeader.text2')} </Text> <br /> <Text variant="body2"> {predictEnabled && ( <> <p> {/* 本模擬綜合2019年選民登記數字,18及19年間新增選民數字,以及2015區議會選舉實際投票結果。 */} {t('predictionChartHeader.paragraph1')} </p> <p> {/* 首先將15年區選各選區投票結果歸納為分為「建制」、「民主」及「其他」三陣營,並假設選民維持投票取向,並按其比例將各陣營得票分配至2018的選民登記數字。 */} {t('predictionChartHeader.paragraph2')} </p> <p> {/* 滑桿只調較2018及19年間新增選民的投票取向及投票率,如欲直接調較19年選民的取態,請到「設定 ======= return ( <Container className={className}> <PredictionChartHeader> <Text variant="h5"> {/* {predictEnabled ? '2019選舉結果模擬' : '現屆區議會勢力分布'} */} {predictEnabled ? t('predictionChartHeader.text1') : t('predictionChartHeader.text2')} </Text> <br /> {predictEnabled && ( <> <p> {/* 本模擬綜合2019年選民登記數字,18及19年間新增選民數字,以及2015區議會選舉實際投票結果。 */} {t('predictionChartHeader.paragraph1')} </p> <p> {/* 首先將15年區選各選區投票結果歸納為分為「建制」、「民主」及「其他」三陣營,並假設選民維持投票取向,並按其比例將各陣營得票分配至2018的選民登記數字。 */} {t('predictionChartHeader.paragraph2')} </p> <p> {/* 滑桿只調較2018及19年間新增選民的投票取向及投票率,如欲直接調較19年選民的取態,請到「設定 >>>>>>> const dataFroGraph = groupDataByRegionAndCamp(data.dcd_candidates) const dataForD3 = convertToD3Compatible(dataFroGraph) let d3Data = dataForD3 if (!isLoadingPrediction && predictEnabled) { const expectedDataForGraph = groupExpectDataByRegionAndCamp( predictoinData.dcd_constituencies, settings ) d3Data = convertToD3Compatible( expectedDataForGraph, sortByDefaultChartOrderFunc(dataForD3) ) } return ( <Container className={className}> <PredictionChartHeader> <Text variant="h5"> {/* {predictEnabled ? '2019選舉結果模擬' : '現屆區議會勢力分布'} */} {predictEnabled ? t('predictionChartHeader.text1') : t('predictionChartHeader.text2')} </Text> <br /> {predictEnabled && ( <> <p> {/* 本模擬綜合2019年選民登記數字,18及19年間新增選民數字,以及2015區議會選舉實際投票結果。 */} {t('predictionChartHeader.paragraph1')} </p> <p> {/* 首先將15年區選各選區投票結果歸納為分為「建制」、「民主」及「其他」三陣營,並假設選民維持投票取向,並按其比例將各陣營得票分配至2018的選民登記數字。 */} {t('predictionChartHeader.paragraph2')} </p> <p> {/* 滑桿只調較2018及19年間新增選民的投票取向及投票率,如欲直接調較19年選民的取態,請到「設定 <<<<<<< {t('predictionChartHeader.paragraph3')} </p> <p> {/* 是次選舉將選出452個民選議席,連同新界區27名當然議員共479席。當然議員即各區鄉事委員會主席,故這些議席全歸類為建制派。 */} {t('predictionChartHeader.paragraph4')} </p> <p> 選舉結果由眾多因素影響,故模擬結果僅供參考,亦因數據來源限制而簡化,如有建議歡迎 <DefaultLink target="_blank" href="https://forms.gle/irD6tEznWPNda6w59" > 匯報 </DefaultLink> 。 </p> </> )} </Text> {!predictEnabled && ( <StyledLoadingButton isLoading={loading} onClick={() => { setPredictEnabled(true) fireEvent({ ca: 'simulation', ac: 'click', lb: 'start_simulate', }) }} // label="模擬結果" label={t('predictionChartHeader.button.simulation_result')} /> )} </PredictionChartHeader> <br /> {!loading && predictEnabled && ( <PredictionChartPanel settings={settings} setSettings={setSettings} ======= {t('predictionChartHeader.paragraph3')} </p> <p> {/* 是次選舉將選出452個民選議席,連同新界區27名當然議員共479席。當然議員即各區鄉事委員會主席,故這些議席全歸類為建制派。 */} {t('predictionChartHeader.paragraph4')} </p> <p dangerouslySetInnerHTML={{ __html: t('predictionChartHeader.paragraph5'), }} /> </> )} {!predictEnabled && ( <StyledLoadingButton isLoading={loading} onClick={() => { setPredictEnabled(true) fireEvent({ ca: 'simulation', ac: 'click', lb: 'start_simulate', }) }} // label="模擬結果" label={t('predictionChartHeader.button.simulation_result')} >>>>>>> {t('predictionChartHeader.paragraph3')} </p> <p> {/* 是次選舉將選出452個民選議席,連同新界區27名當然議員共479席。當然議員即各區鄉事委員會主席,故這些議席全歸類為建制派。 */} {t('predictionChartHeader.paragraph4')} </p> <p dangerouslySetInnerHTML={{ __html: t('predictionChartHeader.paragraph5'), }} /> </> )} {!predictEnabled && ( <StyledLoadingButton isLoading={loading} onClick={() => { setPredictEnabled(true) fireEvent({ ca: 'simulation', ac: 'click', lb: 'start_simulate', }) }} // label="模擬結果" label={t('predictionChartHeader.button.simulation_result')} /> )} </PredictionChartHeader> <br /> {!loading && predictEnabled && ( <PredictionChartPanel settings={settings} setSettings={setSettings}
<<<<<<< import MobileAppBar from 'components/organisms/MobileAppBar' import ShareButton from 'components/organisms/ShareButton' import Footer from 'components/organisms/Footer' ======= >>>>>>> <<<<<<< import SearchDrawer from 'components/pages/SearchDrawer' import DistrictOverviewPage from 'components/pages/district/overview' import DistrictAllPage from 'components/pages/district/all' import GlobalDisclaimer from 'components/organisms/GlobalDisclaimer' import { fireEvent } from 'utils/ga_fireevent' ======= >>>>>>>
<<<<<<< import styled, { css } from 'styled-components' import Grid from '@material-ui/core/Grid' ======= import Divier from '@material-ui/core/Divider' import styled from 'styled-components' >>>>>>> import Divier from '@material-ui/core/Divider' import styled, { css } from 'styled-components' <<<<<<< width: 100%; height: 220px; padding: 0px 50px; } ` const CardContainer = styled.div` { padding: 20px; } ` const CandidateListTitle = styled.div` { ${commonFontStyle} font-family: PingFangTC; font-size: 32px; font-weight: 600; color: #333333; } ` const CandidateName = styled.div` { ${commonFontStyle} font-size: 24px; font-weight: 500; color: #333333; } ` const BlueVoteContainer = styled.div` { ${commonFontStyle} font-size: 18px; font-weight: 500; color: #306ece; } ` const RedVoteContainer = styled.div` { ${commonFontStyle} font-size: 18px; font-weight: 500; color: #f6416e; } ` const ContentHeader = styled.div` { ${commonFontStyle} font-size: 18px; font-weight: 500; color: #4a4a4a; } ` const Content = styled.div` { ${commonFontStyle} font-size: 18px; color: #4a4a4a; ======= padding-bottom: 100px; } ` const RowsContainer = styled.div` { margin-top: 30px; border-radius: 8px; box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2); background-color: #ffffff; ${bps.down('md')} { margin-left: 10px; margin-right: 10px; } } ` const FlexRowContainer = styled(Box)` && { display: flex; flex-wrap: wrap; align-content: flex-start; width: 1440px; margin: auto; ${bps.down('md')} { width: 1440px; margin: auto; } } ` const FlexColumn = styled(Box)` && { height: 149px; align-items: center; display: flex; padding-left: 40px; ${bps.down('md')} { height: 70px; } } ` const AvatarColumn = styled(FlexColumn)` && { width: 100px; ${bps.down('md')} { width: 100%; } } ` const NameColumn = styled(FlexColumn)` && { width: 200px; ${bps.down('md')} { width: 100%; } } ` const PoliticalColumn = styled(FlexColumn)` && { flex-direction: column; justify-content: center; align-items: flex-start; width: 160px; ${bps.down('md')} { width: 100%; } } ` const StyledDivier = styled(Divier)` && { margin-left: 30px; margin-right: 30px; >>>>>>> padding: 0px 15px 100px 25px; } ` const RowsContainer = styled.div` { margin-top: 30px; border-radius: 8px; box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2); background-color: #ffffff; ${bps.down('md')} { margin-left: 10px; margin-right: 10px; } } ` const FlexRowContainer = styled(Box)` && { display: flex; flex-wrap: wrap; align-content: flex-start; width: 1440px; margin: auto; ${bps.down('md')} { width: 1440px; margin: auto; } } ` const FlexColumn = styled(Box)` && { height: 149px; align-items: center; display: flex; padding-left: 40px; ${bps.down('md')} { height: 70px; } } ` const AvatarColumn = styled(FlexColumn)` && { width: 100px; ${bps.down('md')} { width: 100%; } } ` const NameColumn = styled(FlexColumn)` && { width: 200px; ${bps.down('md')} { width: 100%; } } ` const PoliticalColumn = styled(FlexColumn)` && { flex-direction: column; justify-content: center; align-items: flex-start; width: 160px; ${bps.down('md')} { width: 100%; } } ` const StyledDivier = styled(Divier)` && { margin-left: 30px; margin-right: 30px; } ` const CandidateListTitle = styled.div` { ${commonFontStyle} font-family: PingFangTC; font-size: 32px; font-weight: 600; color: #333333; } ` const CandidateName = styled.div` { ${commonFontStyle} font-size: 24px; font-weight: 500; color: #333333; } ` const BlueVoteContainer = styled.div` { ${commonFontStyle} font-size: 18px; font-weight: 500; color: #306ece; } ` const RedVoteContainer = styled.div` { ${commonFontStyle} font-size: 18px; font-weight: 500; color: #f6416e; } ` const ContentHeader = styled.div` { ${commonFontStyle} font-size: 18px; font-weight: 600; color: #4a4a4a; } ` const Content = styled.div` { ${commonFontStyle} font-size: 18px; color: #4a4a4a;
<<<<<<< messages['error']) ) { ======= 'error' in messages && messages['error'] )) { >>>>>>> 'error' in messages && messages['error'] )) { <<<<<<< success || _reset_offline(1, {"error" : "Heartbeat failed to connect to Pubnub Servers. Please check your network settings."}); ======= detect_time_detla( function(){}, success ); success || _reset_offline(1); >>>>>>> detect_time_detla( function(){}, success ); success || _reset_offline(1, {"error" : "Heartbeat failed to connect to Pubnub Servers. Please check your network settings."});
<<<<<<< import { Juko8, Coryn, Talby, Anomoly, AttilioLH } from 'MAINTAINERS'; ======= import React from 'react'; import ITEMS from 'common/ITEMS'; import SPELLS from 'common/SPELLS'; import ItemLink from 'common/ItemLink'; import SpellLink from 'common/SpellLink'; import Wrapper from 'common/Wrapper'; import { Juko8, Coryn, Talby, Anomoly, AttilioLH, Hewhosmites } from 'MAINTAINERS'; >>>>>>> import { Juko8, Coryn, Talby, Anomoly, AttilioLH, Hewhosmites } from 'MAINTAINERS'; import React from 'react'; import ITEMS from 'common/ITEMS'; import SPELLS from 'common/SPELLS'; import ItemLink from 'common/ItemLink'; import SpellLink from 'common/SpellLink'; import Wrapper from 'common/Wrapper';
<<<<<<< messages['error']) ) { ======= 'error' in messages && messages['error'] )) { >>>>>>> 'error' in messages && messages['error'] )) { <<<<<<< success || _reset_offline(1, {"error" : "Heartbeat failed to connect to Pubnub Servers. Please check your network settings."}); ======= detect_time_detla( function(){}, success ); success || _reset_offline(1); >>>>>>> detect_time_detla( function(){}, success ); success || _reset_offline(1, {"error" : "Heartbeat failed to connect to Pubnub Servers. Please check your network settings."});
<<<<<<< 10-09-2017 - Added Channel Demonfire and Havoc cleave module (not 100% accurate though). (by Chizu) ======= 10-09-2017 - Added Fire and Brimstone cleave and fragment tracker. (by Chizu). >>>>>>> 10-09-2017 - Added Channel Demonfire and Havoc cleave module (not 100% accurate though). (by Chizu) 10-09-2017 - Added Fire and Brimstone cleave and fragment tracker. (by Chizu).
<<<<<<< , RESUMED = false ======= , XJOIN = 0 >>>>>>> , RESUMED = false <<<<<<< , STATE = {} , PRESENCE_HB_TIMEOUT = null , PRESENCE_HB = validate_presence_heartbeat(setup['heartbeat'] || setup['pnexpires'] || 0, setup['error']) , PRESENCE_HB_INTERVAL = setup['heartbeat_interval'] || PRESENCE_HB - 3 , PRESENCE_HB_RUNNING = false , NO_WAIT_FOR_PENDING = setup['no_wait_for_pending'] , COMPATIBLE_35 = setup['compatible_3.5'] || false ======= , PENDING_LEAVE = {} >>>>>>> , STATE = {} , PRESENCE_HB_TIMEOUT = null , PRESENCE_HB = validate_presence_heartbeat(setup['heartbeat'] || setup['pnexpires'] || 0, setup['error']) , PRESENCE_HB_INTERVAL = setup['heartbeat_interval'] || PRESENCE_HB - 3 , PRESENCE_HB_RUNNING = false , NO_WAIT_FOR_PENDING = setup['no_wait_for_pending'] , COMPATIBLE_35 = setup['compatible_3.5'] || false <<<<<<< 'LEAVE' : function( channel, blocking, callback, error ) { ======= 'LEAVE' : function( channel, blocking, callback ) { >>>>>>> 'LEAVE' : function( channel, blocking, callback, error ) { <<<<<<< success : function(response) { _invoke_callback(response, callback, err); }, fail : function(response) { _invoke_error(response, err); }, ======= success : function(response) { callback && callback(response) }, >>>>>>> success : function(response) { _invoke_callback(response, callback, err); }, fail : function(response) { _invoke_error(response, err); }, <<<<<<< var CB_CALLED = true; if (!channel) return; if (READY) { CB_CALLED = SELF['LEAVE']( channel, 0 , callback, err); } if (!CB_CALLED) callback({action : "leave"}); ======= if (READY) SELF['LEAVE']( channel, 0, function() { setTimeout(function() { if (READY) SELF['LEAVE']( channel, 0 ); }, JOIN_LEAVE_COMBINE_TIMEOUT / 2); }); >>>>>>> var CB_CALLED = true; if (!channel) return; if (READY) { CB_CALLED = SELF['LEAVE']( channel, 0 , callback, err); } if (!CB_CALLED) callback({action : "leave"}); <<<<<<< fail : function(response) { _invoke_error(response, errcb); //SUB_RECEIVER = null; ======= fail : function() { SUB_RECEIVER = null; >>>>>>> fail : function(response) { _invoke_error(response, errcb); //SUB_RECEIVER = null; <<<<<<< success : function(messages) { //SUB_RECEIVER = null; // Check for Errors if (!messages || ( typeof messages == 'object' && 'error' in messages && messages['error'] )) { errcb(messages['error']); return timeout( CONNECT, SECOND ); } // User Idle Callback idlecb(messages[1]); ======= success : function(messages, abort) { SUB_RECEIVER = null; if (!messages) return timeout( CONNECT, windowing ); >>>>>>> success : function(messages) { //SUB_RECEIVER = null; // Check for Errors if (!messages || ( typeof messages == 'object' && 'error' in messages && messages['error'] )) { errcb(messages['error']); return timeout( CONNECT, SECOND ); } // User Idle Callback idlecb(messages[1]); <<<<<<< var latency = detect_latency(+messages[1]); ======= >>>>>>> var latency = detect_latency(+messages[1]); <<<<<<< var decrypted_msg = decrypt(msg,CHANNELS[next[1]]['cipher_key']); try { next[0]( JSON['parse'](decrypted_msg), messages, next[1], latency ); } catch (e) { next[0]( decrypted_msg, messages, next[1], latency ); } }); ======= _combine_join_leave(msg, next, messages) && !(msg['pn-discard']) && next[0]( msg, messages, next[1] ); } ); >>>>>>> var decrypted_msg = decrypt(msg,CHANNELS[next[1]]['cipher_key']); try { next[0]( JSON['parse'](decrypted_msg), messages, next[1], latency ); } catch (e) { next[0]( decrypted_msg, messages, next[1], latency ); } });
<<<<<<< change(date(2020, 12, 29), <>Fixed bug where <SpellLink id={SPELLS.DEMONIC_TALENT_HAVOC.id} /> were causing errors</>, [flurreN]), ======= change(date(2020, 12, 28), <><SpellLink id={SPELLS.COLLECTIVE_ANGUISH.id} /> and <SpellLink id={SPELLS.CHAOS_THEORY.id} /> is added to Statistics</>, flurreN), >>>>>>> change(date(2020, 12, 29), <>Fixed bug where <SpellLink id={SPELLS.DEMONIC_TALENT_HAVOC.id} /> were causing errors</>, [flurreN]), change(date(2020, 12, 28), <><SpellLink id={SPELLS.COLLECTIVE_ANGUISH.id} /> and <SpellLink id={SPELLS.CHAOS_THEORY.id} /> is added to Statistics</>, flurreN),
<<<<<<< import AfflictionWarlock from './AfflictionWarlock/CONFIG'; ======= import VengeanceDemonHunter from './VengeanceDemonHunter/CONFIG'; >>>>>>> import VengeanceDemonHunter from './VengeanceDemonHunter/CONFIG'; import AfflictionWarlock from './AfflictionWarlock/CONFIG'; <<<<<<< AfflictionWarlock, ======= VengeanceDemonHunter, >>>>>>> VengeanceDemonHunter, AfflictionWarlock,
<<<<<<< messages['error']) ) { ======= 'error' in messages && messages['error'] )) { >>>>>>> 'error' in messages && messages['error'] )) { <<<<<<< success || _reset_offline(1, {"error" : "Heartbeat failed to connect to Pubnub Servers. Please check your network settings."}); ======= detect_time_detla( function(){}, success ); success || _reset_offline(1); >>>>>>> detect_time_detla( function(){}, success ); success || _reset_offline(1, {"error" : "Heartbeat failed to connect to Pubnub Servers. Please check your network settings."});
<<<<<<< import FromTheShadows from './modules/talents/FromTheShadows'; import SoulStrike from './modules/talents/SoulStrike'; import SummonVilefiend from './modules/talents/SummonVilefiend'; ======= import PowerSiphon from './modules/talents/PowerSiphon'; import Doom from './modules/talents/Doom'; >>>>>>> import FromTheShadows from './modules/talents/FromTheShadows'; import SoulStrike from './modules/talents/SoulStrike'; import SummonVilefiend from './modules/talents/SummonVilefiend'; import PowerSiphon from './modules/talents/PowerSiphon'; import Doom from './modules/talents/Doom'; <<<<<<< fromTheShadows: FromTheShadows, soulStrike: SoulStrike, summonVilefiend: SummonVilefiend, ======= powerSiphon: PowerSiphon, doom: Doom, >>>>>>> fromTheShadows: FromTheShadows, soulStrike: SoulStrike, summonVilefiend: SummonVilefiend, powerSiphon: PowerSiphon, doom: Doom,
<<<<<<< date: new Date('2018-12-21'), changes: <>Added <SpellLink id={SPELLS.CHAOS_SHARDS.id} /> trait.</>, contributors: [Chizu], }, { ======= date: new Date('2018-12-23'), changes: 'Changed display of damage in various places. Now shows % of total damage done and DPS with raw values in tooltip.', contributors: [Chizu], }, { >>>>>>> date: new Date('2018-12-23'), changes: <>Added <SpellLink id={SPELLS.CHAOS_SHARDS.id} /> trait.</>, contributors: [Chizu], }, { date: new Date('2018-12-23'), changes: 'Changed display of damage in various places. Now shows % of total damage done and DPS with raw values in tooltip.', contributors: [Chizu], }, {
<<<<<<< messages['error']) ) { ======= 'error' in messages && messages['error'] )) { >>>>>>> 'error' in messages && messages['error'] )) { <<<<<<< success || _reset_offline(1, {"error" : "Heartbeat failed to connect to Pubnub Servers. Please check your network settings."}); ======= detect_time_detla( function(){}, success ); success || _reset_offline(1); >>>>>>> detect_time_detla( function(){}, success ); success || _reset_offline(1, {"error" : "Heartbeat failed to connect to Pubnub Servers. Please check your network settings."}); <<<<<<< , PNSDK = 'PubNub-JS-' + 'Nodejs' + '/' + '3.5.3.1' , crypto = require('crypto') , XORIGN = 1; function get_hmac_SHA256(data, key) { return crypto.createHmac('sha256', new Buffer(key, 'utf8')).update(data).digest('base64'); } ======= , PNSDK = 'PubNub-JS-' + 'Nodejs' + '/' + '3.5.32' , XORIGN = 1; >>>>>>> , PNSDK = 'PubNub-JS-' + 'Nodejs' + '/' + '3.5.32' , crypto = require('crypto') , XORIGN = 1; function get_hmac_SHA256(data, key) { return crypto.createHmac('sha256', new Buffer(key, 'utf8')).update(data).digest('base64'); }
<<<<<<< CEASELESS_TOXIN: { id: 242497, name: 'Ceaseless Toxin', icon: 'inv_potionc_5', }, SUMMON_DREAD_REFLECTION: { id: 246461, name: 'Summon Dread Reflection', icon: 'spell_warlock_soulburn', }, DREAD_TORRENT: { id: 246464, name: 'Dread Torrent', icon: 'spell_warlock_soulburn', }, ======= SUMMON_DREAD_REFLECTION: { id: 246461, name: 'Summon Dread Reflection', icon: 'spell_warlock_soulburn', }, // Triggered by Summon dread reflection DREAD_TORRENT: { id: 246464, name: 'Dread Torrent', icon: 'spell_warlock_soulburn', }, >>>>>>> CEASELESS_TOXIN: { id: 242497, name: 'Ceaseless Toxin', icon: 'inv_potionc_5', }, SUMMON_DREAD_REFLECTION: { id: 246461, name: 'Summon Dread Reflection', icon: 'spell_warlock_soulburn', }, DREAD_TORRENT: { id: 246464, name: 'Dread Torrent', icon: 'spell_warlock_soulburn', }, SUMMON_DREAD_REFLECTION: { id: 246461, name: 'Summon Dread Reflection', icon: 'spell_warlock_soulburn', }, // Triggered by Summon dread reflection DREAD_TORRENT: { id: 246464, name: 'Dread Torrent', icon: 'spell_warlock_soulburn', },
<<<<<<< change(date(2019, 12, 8), <>Fixed <SpellLink id={SPELLS.LIGHTS_DECREE.id} /> duration along with <SpellLink id={SPELLS.HOLY_SHOCK_CAST.id} /> usage, <SpellLink id={SPELLS.AVENGING_WRATH.id} /> damage, healing, and critical strike contributions.</>, [HolySchmidt]), ======= change(date(2019, 12, 1), <><SpellLink id={SPELLS.CRUSADERS_MIGHT_TALENT.id} /> cooldown reduction will correctly adjust for <SpellLink id={SPELLS.SANCTIFIED_WRATH_TALENT.id} />, added <SpellLink id={SPELLS.GLIMMER_OF_LIGHT.id} /> build support and fixed spelling errors.</>, [HolySchmidt]), change(date(2019, 12, 1), <><SpellLink id={SPELLS.GLIMMER_OF_LIGHT.id} /> build has been added for Holy Paladin, will now link to a guild on the build and not suggest that all mana must be used during a fight.</>, [HolySchmidt]), >>>>>>> change(date(2019, 12, 8), <>Fixed <SpellLink id={SPELLS.LIGHTS_DECREE.id} /> duration along with <SpellLink id={SPELLS.HOLY_SHOCK_CAST.id} /> usage, <SpellLink id={SPELLS.AVENGING_WRATH.id} /> damage, healing, and critical strike contributions.</>, [HolySchmidt]), change(date(2019, 12, 1), <><SpellLink id={SPELLS.CRUSADERS_MIGHT_TALENT.id} /> cooldown reduction will correctly adjust for <SpellLink id={SPELLS.SANCTIFIED_WRATH_TALENT.id} />, added <SpellLink id={SPELLS.GLIMMER_OF_LIGHT.id} /> build support and fixed spelling errors.</>, [HolySchmidt]), change(date(2019, 12, 1), <><SpellLink id={SPELLS.GLIMMER_OF_LIGHT.id} /> build has been added for Holy Paladin, will now link to a guild on the build and not suggest that all mana must be used during a fight.</>, [HolySchmidt]),
<<<<<<< `${module.exportsArgument}[${JSON.stringify( usedName )}] = ${runtimeTemplate.exportFromImport({ moduleGraph, module: moduleGraph.getModule(dep), ======= `${exportProp} = ${runtimeTemplate.exportFromImport({ module: dep.module, >>>>>>> `${exportProp} = ${runtimeTemplate.exportFromImport({ moduleGraph, module: moduleGraph.getModule(dep),
<<<<<<< compiler.hooks.shouldEmit.tap("NoEmitOnErrorsPlugin", (compilation) => { if(compilation.errors.length > 0) ======= compiler.plugin("should-emit", (compilation) => { if(compilation.getStats().hasErrors()) >>>>>>> compiler.hooks.shouldEmit.tap("NoEmitOnErrorsPlugin", (compilation) => { if(compilation.getStats().hasErrors()) <<<<<<< compiler.hooks.compilation.tap("NoEmitOnErrorsPlugin", (compilation) => { compilation.hooks.shouldRecord.tap("NoEmitOnErrorsPlugin", () => { if(compilation.errors.length > 0) ======= compiler.plugin("compilation", (compilation) => { compilation.plugin("should-record", () => { if(compilation.getStats().hasErrors()) >>>>>>> compiler.hooks.compilation.tap("NoEmitOnErrorsPlugin", (compilation) => { compilation.hooks.shouldRecord.tap("NoEmitOnErrorsPlugin", () => { if(compilation.getStats().hasErrors())
<<<<<<< for(const path of ignoredDirs) { dirTimestamps[path] = 1; } ======= ignoredDirs.forEach(path => { dirTimestamps.set(path, 1); }); >>>>>>> for(const path of ignoredDirs) { dirTimestamps.set(path, 1); } <<<<<<< for(const path of ignoredFiles) { fileTimestamps[path] = 1; } ======= ignoredFiles.forEach(path => { fileTimestamps.set(path, 1); }); >>>>>>> for(const path of ignoredFiles) { fileTimestamps.set(path, 1); }
<<<<<<< `Compilation error while processing magic comment(-s): /*${ comment.value }*/: ${e.message}`, ======= `Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`, parser.state.module, >>>>>>> `Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`, <<<<<<< `\`webpackIgnore\` expected a boolean, but received: ${ importOptions.webpackIgnore }.`, ======= parser.state.module, `\`webpackIgnore\` expected a boolean, but received: ${importOptions.webpackIgnore}.`, >>>>>>> `\`webpackIgnore\` expected a boolean, but received: ${importOptions.webpackIgnore}.`, <<<<<<< `\`webpackChunkName\` expected a string, but received: ${ importOptions.webpackChunkName }.`, ======= parser.state.module, `\`webpackChunkName\` expected a string, but received: ${importOptions.webpackChunkName}.`, >>>>>>> `\`webpackChunkName\` expected a string, but received: ${importOptions.webpackChunkName}.`, <<<<<<< `\`webpackMode\` expected a string, but received: ${ importOptions.webpackMode }.`, ======= parser.state.module, `\`webpackMode\` expected a string, but received: ${importOptions.webpackMode}.`, >>>>>>> `\`webpackMode\` expected a string, but received: ${importOptions.webpackMode}.`, <<<<<<< `\`webpackPrefetch\` expected true or a number, but received: ${ importOptions.webpackPrefetch }.`, ======= parser.state.module, `\`webpackPrefetch\` expected true or a number, but received: ${importOptions.webpackPrefetch}.`, >>>>>>> `\`webpackPrefetch\` expected true or a number, but received: ${importOptions.webpackPrefetch}.`, <<<<<<< `\`webpackPreload\` expected true or a number, but received: ${ importOptions.webpackPreload }.`, ======= parser.state.module, `\`webpackPreload\` expected true or a number, but received: ${importOptions.webpackPreload}.`, >>>>>>> `\`webpackPreload\` expected true or a number, but received: ${importOptions.webpackPreload}.`, <<<<<<< `\`webpackInclude\` expected a regular expression, but received: ${ importOptions.webpackInclude }.`, ======= parser.state.module, `\`webpackInclude\` expected a regular expression, but received: ${importOptions.webpackInclude}.`, >>>>>>> `\`webpackInclude\` expected a regular expression, but received: ${importOptions.webpackInclude}.`, <<<<<<< `\`webpackExclude\` expected a regular expression, but received: ${ importOptions.webpackExclude }.`, ======= parser.state.module, `\`webpackExclude\` expected a regular expression, but received: ${importOptions.webpackExclude}.`, >>>>>>> `\`webpackExclude\` expected a regular expression, but received: ${importOptions.webpackExclude}.`,
<<<<<<< ======= super(); this.hooks = { done: new SyncHook(["stats"]), invalid: new MultiHook(compilers.map(c => c.hooks.invalid)), run: new MultiHook(compilers.map(c => c.hooks.run)), watchClose: new SyncHook([]), watchRun: new MultiHook(compilers.map(c => c.hooks.watchRun)), infrastructureLog: new MultiHook( compilers.map(c => c.hooks.infrastructureLog) ) }; >>>>>>> <<<<<<< /** * @param {IntermediateFileSystem} value the new intermediate file system */ set intermediateFileSystem(value) { for (const compiler of this.compilers) { compiler.intermediateFileSystem = value; } } /** * @param {Compiler} compiler the child compiler * @param {string[]} dependencies its dependencies * @returns {void} */ setDependencies(compiler, dependencies) { this.dependencies.set(compiler, dependencies); } /** * @param {Callback<MultiStats>} callback signals when the validation is complete * @returns {boolean} true if the dependencies are valid */ ======= getInfrastructureLogger(name) { return this.compilers[0].getInfrastructureLogger(name); } >>>>>>> /** * @param {IntermediateFileSystem} value the new intermediate file system */ set intermediateFileSystem(value) { for (const compiler of this.compilers) { compiler.intermediateFileSystem = value; } } getInfrastructureLogger(name) { return this.compilers[0].getInfrastructureLogger(name); } /** * @param {Compiler} compiler the child compiler * @param {string[]} dependencies its dependencies * @returns {void} */ setDependencies(compiler, dependencies) { this.dependencies.set(compiler, dependencies); } /** * @param {Callback<MultiStats>} callback signals when the validation is complete * @returns {boolean} true if the dependencies are valid */
<<<<<<< var activeExports = HarmonyModulesHelpers.getActiveExports(this.originModule, this); if(hasProvidedExports) { const map = new Map(this.originModule.usedExports.filter((id) => { const notInActiveExports = activeExports.indexOf(id) < 0; const notDefault = id !== "default"; const inProvidedExports = importedModule.providedExports.indexOf(id) >= 0; return notInActiveExports && notDefault && inProvidedExports; }).map(item => [item, item])); if(map.size === 0) { return { type: "empty-star" }; } return { type: "safe-reexport", module: importedModule, map }; } const map = new Map(this.originModule.usedExports.filter(id => { const notInActiveExports = activeExports.indexOf(id) < 0; const notDefault = id !== "default"; return notInActiveExports && notDefault; }).map(item => [item, item])); if(map.size === 0) { return { type: "empty-star" }; } ======= const importedNames = this.originModule.usedExports.filter(id => { if(id === "default") return false; if(this.activeExports.has(id)) return false; if(activeFromOtherStarExports.has(id)) return false; if(hasProvidedExports && importedModule.providedExports.indexOf(id) < 0) return false; return true; }); >>>>>>> if(hasProvidedExports) { const map = new Map(this.originModule.usedExports.filter((id) => { if(id === "default") return false; if(this.activeExports.has(id)) return false; if(activeFromOtherStarExports.has(id)) return false; if(importedModule.providedExports.indexOf(id) < 0) return false; return true; }).map(item => [item, item])); if(map.size === 0) { return { type: "empty-star" }; } return { type: "safe-reexport", module: importedModule, map }; } const map = new Map(this.originModule.usedExports.filter(id => { if(id === "default") return false; if(this.activeExports.has(id)) return false; if(activeFromOtherStarExports.has(id)) return false; return true; }).map(item => [item, item])); if(map.size === 0) { return { type: "empty-star" }; } <<<<<<< map ======= importedNames: importedModule.providedExports.filter(id => { if(id === "default") return false; if(this.activeExports.has(id)) return false; if(activeFromOtherStarExports.has(id)) return false; return true; }) >>>>>>> map <<<<<<< getReference() { const mode = this.getMode(); switch(mode.type) { case "missing": case "unused": case "inactive": case "empty-star": return null; case "reexport-non-harmony-default": return { module: mode.module, importedNames: ["default"] }; case "reexport-namespace-object": return { module: mode.module, importedNames: true }; case "safe-reexport": case "checked-reexport": return { module: mode.module, importedNames: Array.from(mode.map.values()) }; case "dynamic-reexport": return { module: mode.module, importedNames: true }; default: throw new Error(`Unknown mode ${mode.type}`); } } ======= _discoverActiveExportsFromOtherStartExports() { if(!this.otherStarExports) return new Set(); const result = new Set(); // try to learn impossible exports from other star exports with provided exports for(const otherStarExport of this.otherStarExports) { const otherImportedModule = otherStarExport.importDependency.module; if(Array.isArray(otherImportedModule.providedExports)) { for(const exportName of otherImportedModule.providedExports) result.add(exportName); } } return result; } >>>>>>> getReference() { const mode = this.getMode(); switch(mode.type) { case "missing": case "unused": case "empty-star": return null; case "reexport-non-harmony-default": return { module: mode.module, importedNames: ["default"] }; case "reexport-namespace-object": return { module: mode.module, importedNames: true }; case "safe-reexport": case "checked-reexport": return { module: mode.module, importedNames: Array.from(mode.map.values()) }; case "dynamic-reexport": return { module: mode.module, importedNames: true }; default: throw new Error(`Unknown mode ${mode.type}`); } } _discoverActiveExportsFromOtherStartExports() { if(!this.otherStarExports) return new Set(); const result = new Set(); // try to learn impossible exports from other star exports with provided exports for(const otherStarExport of this.otherStarExports) { const otherImportedModule = otherStarExport.module; if(Array.isArray(otherImportedModule.providedExports)) { for(const exportName of otherImportedModule.providedExports) result.add(exportName); } } return result; } <<<<<<< describeHarmonyExport() { const importedModule = this.module; if(!this.name && importedModule && Array.isArray(importedModule.providedExports)) { // for a star export and when we know which exports are provided, we can tell so return { exportedName: importedModule.providedExports, precedence: 3 }; } return { exportedName: this.name, precedence: this.name ? 2 : 3 }; } ======= >>>>>>> <<<<<<< if(!used) return NaN; if(!dep.name) { const importedModule = dep.module; if(Array.isArray(dep.originModule.usedExports)) { // we know which exports are used const activeExports = HarmonyModulesHelpers.getActiveExports(dep.originModule, dep); const unused = dep.originModule.usedExports.every(function(id) { if(id === "default") return true; if(activeExports.indexOf(id) >= 0) return true; if(importedModule.isProvided(id) === false) return true; return false; }); if(unused) return NaN; } else if(dep.originModule.usedExports && importedModule && Array.isArray(importedModule.providedExports)) { // not sure which exports are used, but we know which are provided const activeExports = HarmonyModulesHelpers.getActiveExports(dep.originModule, dep); const unused = importedModule.providedExports.every(function(id) { if(id === "default") return true; if(activeExports.indexOf(id) >= 0) return true; return false; }); if(unused) return NaN; ======= const importedModule = dep.importDependency.module; const importsExportsUnknown = !importedModule || !Array.isArray(importedModule.providedExports); const getReexportStatement = this.reexportStatementCreator(dep.originModule, importsExportsUnknown, name); // we want to rexport something, but the export isn't used if(!used) { return "/* unused harmony reexport " + dep.name + " */\n"; } // we want to reexport the default export from a non-hamory module const isNotAHarmonyModule = !(importedModule && (!importedModule.meta || importedModule.meta.harmonyModule)); if(dep.name && dep.id === "default" && isNotAHarmonyModule) { return "/* harmony reexport (default from non-hamory) */ " + getReexportStatement(JSON.stringify(used), null); } // we want to reexport a key as new key if(dep.name && dep.id) { var idUsed = importedModule && importedModule.isUsed(dep.id); return "/* harmony reexport (binding) */ " + getReexportStatement(JSON.stringify(used), JSON.stringify(idUsed)); } // we want to reexport the module object as named export if(dep.name) { return "/* harmony reexport (module object) */ " + getReexportStatement(JSON.stringify(used), ""); } const hasProvidedExports = Array.isArray(importedModule.providedExports); const activeFromOtherStarExports = dep._discoverActiveExportsFromOtherStartExports(); // we know which exports are used if(Array.isArray(dep.originModule.usedExports)) { const items = dep.originModule.usedExports.map(id => { if(id === "default") return; if(dep.activeExports.has(id)) return; if(importedModule.isProvided(id) === false) return; if(activeFromOtherStarExports.has(id)) return; var exportUsed = dep.originModule.isUsed(id); var idUsed = importedModule && importedModule.isUsed(id); return [exportUsed, idUsed]; }).filter(Boolean); if(items.length === 0) { return "/* unused harmony namespace reexport */\n"; >>>>>>> if(!used) return NaN; if(!dep.name) { const importedModule = dep.module; if(Array.isArray(dep.originModule.usedExports)) { // we know which exports are used const unused = dep.originModule.usedExports.every(function(id) { if(id === "default") return true; if(dep.activeExports.has(id)) return true; if(importedModule.isProvided(id) === false) return true; return false; }); if(unused) return NaN; } else if(dep.originModule.usedExports && importedModule && Array.isArray(importedModule.providedExports)) { // not sure which exports are used, but we know which are provided const unused = importedModule.providedExports.every(function(id) { if(id === "default") return true; if(dep.activeExports.has(id)) return true; return false; }); if(unused) return NaN;
<<<<<<< if(!module.meta || !module.meta.harmonyModule) { setBailoutReason(module, "Module is not an ECMAScript module"); ======= if(!module.meta || !module.meta.harmonyModule || !module.dependencies.some(d => d instanceof HarmonyCompatibilityDependency)) { >>>>>>> if(!module.meta || !module.meta.harmonyModule || !module.dependencies.some(d => d instanceof HarmonyCompatibilityDependency)) { setBailoutReason(module, "Module is not an ECMAScript module");
<<<<<<< source.add("/*! unknown exports provided */\n"); ======= source.add("/* no static exports found */\n"); >>>>>>> source.add("/*! no static exports found */\n");
<<<<<<< import BurstingFlare from './modules/azerite/BurstingFlare'; ======= import Flashpoint from './modules/azerite/Flashpoint'; import Accelerant from './modules/azerite/Accelerant'; >>>>>>> import BurstingFlare from './modules/azerite/BurstingFlare'; import Flashpoint from './modules/azerite/Flashpoint'; import Accelerant from './modules/azerite/Accelerant'; <<<<<<< // Azerite traits burstingFlare: BurstingFlare, ======= // Azerite traits accelerant: Accelerant, flashpoint: Flashpoint, >>>>>>> // Azerite traits burstingFlare: BurstingFlare, accelerant: Accelerant, flashpoint: Flashpoint,
<<<<<<< if (typeof dep === "undefined") hot._selfDeclined = true; else if (typeof dep === "object" && dep !== null) ======= if (dep === undefined) hot._selfDeclined = true; else if (typeof dep === "object") >>>>>>> if (dep === undefined) hot._selfDeclined = true; else if (typeof dep === "object" && dep !== null)
<<<<<<< function exportFolder (storageKey, folderKey, fileType, exportDir, config) { ======= function exportFolder(storageKey, folderKey, fileType, exportDir) { >>>>>>> function exportFolder(storageKey, folderKey, fileType, exportDir, config) {
<<<<<<< const toCode = (code, parser) => { if (code === null) return "null"; else if (code === undefined) return "undefined"; else if (code instanceof RuntimeValue) return toCode(code.exec(parser), parser); else if (code instanceof RegExp && code.toString) return code.toString(); else if (typeof code === "function" && code.toString) ======= const toCode = code => { if (code === null) { return "null"; } if (code === undefined) { return "undefined"; } if (code instanceof RegExp && code.toString) { return code.toString(); } if (typeof code === "function" && code.toString) { >>>>>>> const toCode = (code, parser) => { if (code === null) { return "null"; } if (code === undefined) { return "undefined"; } if (code instanceof RuntimeValue) { return toCode(code.exec(parser), parser); } if (code instanceof RegExp && code.toString) { return code.toString(); } if (typeof code === "function" && code.toString) { <<<<<<< else if (typeof code === "object") return stringifyObj(code, parser); else return code + ""; ======= } if (typeof code === "object") { return stringifyObj(code); } return code + ""; >>>>>>> } if (typeof code === "object") { return stringifyObj(code, parser); } return code + "";
<<<<<<< ======= // Caching this._numberOfConcatenatedModules = modules.length; // Graph const modulesSet = new Set(modules); this.reasons = rootModule.reasons.filter( reason => !(reason.dependency instanceof HarmonyImportDependency) || !modulesSet.has(reason.module) ); this.dependencies = []; this.blocks = []; this.warnings = []; this.errors = []; this._orderedConcatenationList = concatenationList || ConcatenatedModule.createConcatenationList(rootModule, modulesSet, null); >>>>>>> <<<<<<< ======= // populate blocks for (const d of m.blocks) { this.blocks.push(d); } >>>>>>> // populate blocks for (const d of m.blocks) { this.blocks.push(d); }
<<<<<<< return callback( new WebpackError( `No dependency factory available for this dependency type: ${ dependency.constructor.name }` ) ======= throw new Error( `No dependency factory available for this dependency type: ${dependency.constructor.name}` >>>>>>> return callback( new WebpackError( `No dependency factory available for this dependency type: ${dependency.constructor.name}` )
<<<<<<< /** @type {Map<string, FileSystemInfoEntry>} */ ======= this.removedFiles = new Set(); /** @type {Map<string, number>} */ >>>>>>> /** @type {Set<string>} */ this.removedFiles = new Set(); /** @type {Map<string, FileSystemInfoEntry>} */ <<<<<<< ======= this.watchMode = true; this.fileTimestamps = new Map(); this.contextTimestamps = new Map(); this.removedFiles = new Set(); >>>>>>> this.watchMode = true;
<<<<<<< function hotCheck(apply) { ======= function toModuleId(id) { return (+id) + "" === id ? +id : id; } function hotCheck(apply, callback) { >>>>>>> function toModuleId(id) { return (+id) + "" === id ? +id : id; } function hotCheck(apply) {
<<<<<<< import SoulFire from './SoulFire'; ======= import InternalCombustion from './InternalCombustion'; import Shadowburn from './Shadowburn'; >>>>>>> import SoulFire from './SoulFire'; import InternalCombustion from './InternalCombustion'; import Shadowburn from './Shadowburn'; <<<<<<< soulFire: SoulFire, ======= internalCombustion: InternalCombustion, shadowburn: Shadowburn, >>>>>>> soulFire: SoulFire, internalCombustion: InternalCombustion, shadowburn: Shadowburn,
<<<<<<< var path = require("path"); var AMDRequireDependency = require("./AMDRequireDependency"); var AMDRequireItemDependency = require("./AMDRequireItemDependency"); var AMDRequireArrayDependency = require("./AMDRequireArrayDependency"); var AMDRequireContextDependency = require("./AMDRequireContextDependency"); var AMDDefineDependency = require("./AMDDefineDependency"); var UnsupportedDependency = require("./UnsupportedDependency"); var LocalModuleDependency = require("./LocalModuleDependency"); var NullFactory = require("../NullFactory"); var AMDRequireDependenciesBlockParserPlugin = require("./AMDRequireDependenciesBlockParserPlugin"); var AMDDefineDependencyParserPlugin = require("./AMDDefineDependencyParserPlugin"); var AliasPlugin = require("enhanced-resolve/lib/AliasPlugin"); var ParserHelpers = require("../ParserHelpers"); function AMDPlugin(options, amdOptions) { this.amdOptions = amdOptions; this.options = options; } module.exports = AMDPlugin; AMDPlugin.prototype.apply = function(compiler) { var options = this.options; var amdOptions = this.amdOptions; compiler.plugin("compilation", function(compilation, params) { var normalModuleFactory = params.normalModuleFactory; var contextModuleFactory = params.contextModuleFactory; compilation.dependencyFactories.set(AMDRequireDependency, new NullFactory()); compilation.dependencyTemplates.set(AMDRequireDependency, new AMDRequireDependency.Template()); compilation.dependencyFactories.set(AMDRequireItemDependency, normalModuleFactory); compilation.dependencyTemplates.set(AMDRequireItemDependency, new AMDRequireItemDependency.Template()); compilation.dependencyFactories.set(AMDRequireArrayDependency, new NullFactory()); compilation.dependencyTemplates.set(AMDRequireArrayDependency, new AMDRequireArrayDependency.Template()); compilation.dependencyFactories.set(AMDRequireContextDependency, contextModuleFactory); compilation.dependencyTemplates.set(AMDRequireContextDependency, new AMDRequireContextDependency.Template()); compilation.dependencyFactories.set(AMDDefineDependency, new NullFactory()); compilation.dependencyTemplates.set(AMDDefineDependency, new AMDDefineDependency.Template()); compilation.dependencyFactories.set(UnsupportedDependency, new NullFactory()); compilation.dependencyTemplates.set(UnsupportedDependency, new UnsupportedDependency.Template()); compilation.dependencyFactories.set(LocalModuleDependency, new NullFactory()); compilation.dependencyTemplates.set(LocalModuleDependency, new LocalModuleDependency.Template()); params.normalModuleFactory.plugin("parser", function(parser, parserOptions) { if(typeof parserOptions.amd !== "undefined" && !parserOptions.amd) return; function setExpressionToModule(expr, module) { parser.plugin("expression " + expr, function(expr) { var dep = new AMDRequireItemDependency(module, expr.range); dep.userRequest = expr; ======= "use strict"; const path = require("path"); const AMDRequireDependency = require("./AMDRequireDependency"); const AMDRequireItemDependency = require("./AMDRequireItemDependency"); const AMDRequireArrayDependency = require("./AMDRequireArrayDependency"); const AMDRequireContextDependency = require("./AMDRequireContextDependency"); const AMDDefineDependency = require("./AMDDefineDependency"); const UnsupportedDependency = require("./UnsupportedDependency"); const LocalModuleDependency = require("./LocalModuleDependency"); const NullFactory = require("../NullFactory"); const AMDRequireDependenciesBlockParserPlugin = require("./AMDRequireDependenciesBlockParserPlugin"); const AMDDefineDependencyParserPlugin = require("./AMDDefineDependencyParserPlugin"); const AliasPlugin = require("enhanced-resolve/lib/AliasPlugin"); const BasicEvaluatedExpression = require("../BasicEvaluatedExpression"); const ParserHelpers = require("../ParserHelpers"); class AMDPlugin { constructor(options, amdOptions) { this.amdOptions = amdOptions; this.options = options; } apply(compiler) { const options = this.options; const amdOptions = this.amdOptions; compiler.plugin("compilation", (compilation, params) => { const normalModuleFactory = params.normalModuleFactory; const contextModuleFactory = params.contextModuleFactory; compilation.dependencyFactories.set(AMDRequireDependency, new NullFactory()); compilation.dependencyTemplates.set(AMDRequireDependency, new AMDRequireDependency.Template()); compilation.dependencyFactories.set(AMDRequireItemDependency, normalModuleFactory); compilation.dependencyTemplates.set(AMDRequireItemDependency, new AMDRequireItemDependency.Template()); compilation.dependencyFactories.set(AMDRequireArrayDependency, new NullFactory()); compilation.dependencyTemplates.set(AMDRequireArrayDependency, new AMDRequireArrayDependency.Template()); compilation.dependencyFactories.set(AMDRequireContextDependency, contextModuleFactory); compilation.dependencyTemplates.set(AMDRequireContextDependency, new AMDRequireContextDependency.Template()); compilation.dependencyFactories.set(AMDDefineDependency, new NullFactory()); compilation.dependencyTemplates.set(AMDDefineDependency, new AMDDefineDependency.Template()); compilation.dependencyFactories.set(UnsupportedDependency, new NullFactory()); compilation.dependencyTemplates.set(UnsupportedDependency, new UnsupportedDependency.Template()); compilation.dependencyFactories.set(LocalModuleDependency, new NullFactory()); compilation.dependencyTemplates.set(LocalModuleDependency, new LocalModuleDependency.Template()); params.normalModuleFactory.plugin("parser", (parser, parserOptions) => { if(typeof parserOptions.amd !== "undefined" && !parserOptions.amd) return; function setExpressionToModule(expr, module) { parser.plugin("expression " + expr, (expr) => { const dep = new AMDRequireItemDependency(module, expr.range); dep.userRequest = expr; dep.loc = expr.loc; parser.state.current.addDependency(dep); return true; }); } parser.apply( new AMDRequireDependenciesBlockParserPlugin(options), new AMDDefineDependencyParserPlugin(options) ); setExpressionToModule("require.amd", "!!webpack amd options"); setExpressionToModule("define.amd", "!!webpack amd options"); setExpressionToModule("define", "!!webpack amd define"); parser.plugin("expression __webpack_amd_options__", () => parser.state.current.addVariable("__webpack_amd_options__", JSON.stringify(amdOptions))); parser.plugin("evaluate typeof define.amd", ParserHelpers.evaluateToString(typeof amdOptions)); parser.plugin("evaluate typeof require.amd", ParserHelpers.evaluateToString(typeof amdOptions)); parser.plugin("evaluate Identifier define.amd", (expr) => { return new BasicEvaluatedExpression().setBoolean(true).setRange(expr.range); }); parser.plugin("evaluate Identifier require.amd", (expr) => { return new BasicEvaluatedExpression().setBoolean(true).setRange(expr.range); }); parser.plugin("typeof define", ParserHelpers.toConstantDependency("function")); parser.plugin("evaluate typeof define", ParserHelpers.evaluateToString("function")); parser.plugin("can-rename define", () => true); parser.plugin("rename define", (expr) => { const dep = new AMDRequireItemDependency("!!webpack amd define", expr.range); dep.userRequest = "define"; >>>>>>> "use strict"; const path = require("path"); const AMDRequireDependency = require("./AMDRequireDependency"); const AMDRequireItemDependency = require("./AMDRequireItemDependency"); const AMDRequireArrayDependency = require("./AMDRequireArrayDependency"); const AMDRequireContextDependency = require("./AMDRequireContextDependency"); const AMDDefineDependency = require("./AMDDefineDependency"); const UnsupportedDependency = require("./UnsupportedDependency"); const LocalModuleDependency = require("./LocalModuleDependency"); const NullFactory = require("../NullFactory"); const AMDRequireDependenciesBlockParserPlugin = require("./AMDRequireDependenciesBlockParserPlugin"); const AMDDefineDependencyParserPlugin = require("./AMDDefineDependencyParserPlugin"); const AliasPlugin = require("enhanced-resolve/lib/AliasPlugin"); const ParserHelpers = require("../ParserHelpers"); class AMDPlugin { constructor(options, amdOptions) { this.amdOptions = amdOptions; this.options = options; } apply(compiler) { const options = this.options; const amdOptions = this.amdOptions; compiler.plugin("compilation", (compilation, params) => { const normalModuleFactory = params.normalModuleFactory; const contextModuleFactory = params.contextModuleFactory; compilation.dependencyFactories.set(AMDRequireDependency, new NullFactory()); compilation.dependencyTemplates.set(AMDRequireDependency, new AMDRequireDependency.Template()); compilation.dependencyFactories.set(AMDRequireItemDependency, normalModuleFactory); compilation.dependencyTemplates.set(AMDRequireItemDependency, new AMDRequireItemDependency.Template()); compilation.dependencyFactories.set(AMDRequireArrayDependency, new NullFactory()); compilation.dependencyTemplates.set(AMDRequireArrayDependency, new AMDRequireArrayDependency.Template()); compilation.dependencyFactories.set(AMDRequireContextDependency, contextModuleFactory); compilation.dependencyTemplates.set(AMDRequireContextDependency, new AMDRequireContextDependency.Template()); compilation.dependencyFactories.set(AMDDefineDependency, new NullFactory()); compilation.dependencyTemplates.set(AMDDefineDependency, new AMDDefineDependency.Template()); compilation.dependencyFactories.set(UnsupportedDependency, new NullFactory()); compilation.dependencyTemplates.set(UnsupportedDependency, new UnsupportedDependency.Template()); compilation.dependencyFactories.set(LocalModuleDependency, new NullFactory()); compilation.dependencyTemplates.set(LocalModuleDependency, new LocalModuleDependency.Template()); params.normalModuleFactory.plugin("parser", (parser, parserOptions) => { if(typeof parserOptions.amd !== "undefined" && !parserOptions.amd) return; function setExpressionToModule(expr, module) { parser.plugin("expression " + expr, (expr) => { const dep = new AMDRequireItemDependency(module, expr.range); dep.userRequest = expr; dep.loc = expr.loc; parser.state.current.addDependency(dep); return true; }); } parser.apply( new AMDRequireDependenciesBlockParserPlugin(options), new AMDDefineDependencyParserPlugin(options) ); setExpressionToModule("require.amd", "!!webpack amd options"); setExpressionToModule("define.amd", "!!webpack amd options"); setExpressionToModule("define", "!!webpack amd define"); parser.plugin("expression __webpack_amd_options__", () => parser.state.current.addVariable("__webpack_amd_options__", JSON.stringify(amdOptions))); parser.plugin("evaluate typeof define.amd", ParserHelpers.evaluateToString(typeof amdOptions)); parser.plugin("evaluate typeof require.amd", ParserHelpers.evaluateToString(typeof amdOptions)); parser.plugin("evaluate Identifier define.amd", ParserHelpers.evaluateToBoolean(true)); parser.plugin("evaluate Identifier require.amd", ParserHelpers.evaluateToBoolean(true)); parser.plugin("typeof define", ParserHelpers.toConstantDependency(JSON.stringify("function"))); parser.plugin("evaluate typeof define", ParserHelpers.evaluateToString("function")); parser.plugin("can-rename define", ParserHelpers.approve); parser.plugin("rename define", (expr) => { const dep = new AMDRequireItemDependency("!!webpack amd define", expr.range); dep.userRequest = "define"; <<<<<<< parser.plugin("evaluate typeof define.amd", ParserHelpers.evaluateToString(typeof amdOptions)); parser.plugin("evaluate typeof require.amd", ParserHelpers.evaluateToString(typeof amdOptions)); parser.plugin("evaluate Identifier define.amd", ParserHelpers.evaluateToBoolean(true)); parser.plugin("evaluate Identifier require.amd", ParserHelpers.evaluateToBoolean(true)); parser.plugin("typeof define", ParserHelpers.toConstantDependency(JSON.stringify("function"))); parser.plugin("evaluate typeof define", ParserHelpers.evaluateToString("function")); parser.plugin("can-rename define", ParserHelpers.approve); parser.plugin("rename define", function(expr) { var dep = new AMDRequireItemDependency("!!webpack amd define", expr.range); dep.userRequest = "define"; dep.loc = expr.loc; this.state.current.addDependency(dep); return false; }); parser.plugin("typeof require", ParserHelpers.toConstantDependency(JSON.stringify("function"))); parser.plugin("evaluate typeof require", ParserHelpers.evaluateToString("function")); ======= >>>>>>>
<<<<<<< ContextDependencyHelpers.create = function(Dep, range, param, expr, options, chunkName) { var dep, prefix, postfix, prefixRange, valueRange, idx, context, regExp; ======= ContextDependencyHelpers.create = function(Dep, range, param, expr, options) { let dep; let prefix; let postfix; let prefixRange; let valueRange; let idx; let context; let regExp; >>>>>>> ContextDependencyHelpers.create = function(Dep, range, param, expr, options, chunkName) { let dep; let prefix; let postfix; let prefixRange; let valueRange; let idx; let context; let regExp; <<<<<<< regExp = new RegExp("^" + quotemeta(prefix) + options.wrappedContextRegExp.source + quotemeta(postfix) + "$"); dep = new Dep(context, options.wrappedContextRecursive, regExp, range, valueRange, chunkName); ======= regExp = new RegExp(`^${quotemeta(prefix)}${options.wrappedContextRegExp.source}${quotemeta(postfix)}$`); dep = new Dep(context, options.wrappedContextRecursive, regExp, range, valueRange); >>>>>>> regExp = new RegExp(`^${quotemeta(prefix)}${options.wrappedContextRegExp.source}${quotemeta(postfix)}$`); dep = new Dep(context, options.wrappedContextRecursive, regExp, range, valueRange, chunkName); <<<<<<< regExp = new RegExp("^" + quotemeta(prefix) + options.wrappedContextRegExp.source + quotemeta(postfix) + "$"); dep = new Dep(context, options.wrappedContextRecursive, regExp, range, valueRange, chunkName); ======= regExp = new RegExp(`^${quotemeta(prefix)}${options.wrappedContextRegExp.source}${quotemeta(postfix)}$`); dep = new Dep(context, options.wrappedContextRecursive, regExp, range, valueRange); >>>>>>> regExp = new RegExp(`^${quotemeta(prefix)}${options.wrappedContextRegExp.source}${quotemeta(postfix)}$`); dep = new Dep(context, options.wrappedContextRecursive, regExp, range, valueRange, chunkName);
<<<<<<< /** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("./Chunk")} Chunk */ ======= /** @typedef {import("../declarations/WebpackOptions").LibraryCustomUmdObject} LibraryCustomUmdObject */ >>>>>>> /** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("../declarations/WebpackOptions").LibraryCustomUmdObject} LibraryCustomUmdObject */ /** @typedef {import("./Chunk")} Chunk */
<<<<<<< .replace(/[0-9]+(\s?ms)/g, "X$1"); ======= .replace(/[.0-9]+(\s?ms)/g, "X$1") .replace( /^(\s*Built at:) (.*)$/gm, "$1 Thu Jan 01 1970 00:00:00 GMT" ); >>>>>>> .replace(/[.0-9]+(\s?ms)/g, "X$1"); <<<<<<< .replace(/[0-9]+(<\/CLR>)?(\s?ms)/g, "X$1$2"); ======= .replace(/[.0-9]+(<\/CLR>)?(\s?ms)/g, "X$1$2") .replace( /^(\s*Built at:) (.*)$/gm, "$1 Thu Jan 01 1970 <CLR=BOLD>00:00:00</CLR> GMT" ); >>>>>>> .replace(/[.0-9]+(<\/CLR>)?(\s?ms)/g, "X$1$2"); <<<<<<< .replace(new RegExp(testPathPattern, "g"), "Xdir/" + testName) .replace(/, additional resolving: Xms/g, ""); ======= .replace( new RegExp(quotemeta(path.join(base, testName)), "g"), "Xdir/" + testName ) .replace(/(\w)\\(\w)/g, "$1/$2") .replace(/ dependencies:Xms/g, ""); >>>>>>> .replace(new RegExp(quotemeta(testPath), "g"), "Xdir/" + testName) .replace(/(\w)\\(\w)/g, "$1/$2") .replace(/, additional resolving: Xms/g, "");
<<<<<<< const LoaderPlugin = require("./dependencies/LoaderPlugin"); ======= >>>>>>> const LoaderPlugin = require("./dependencies/LoaderPlugin"); <<<<<<< const WarnNoModeSetPlugin = require("./WarnNoModeSetPlugin"); const OccurrenceChunkIdsPlugin = require("./ids/OccurrenceChunkIdsPlugin"); const DefinePlugin = require("./DefinePlugin"); const FlagDependencyExportsPlugin = require("./FlagDependencyExportsPlugin"); const FlagDependencyUsagePlugin = require("./FlagDependencyUsagePlugin"); const NoEmitOnErrorsPlugin = require("./NoEmitOnErrorsPlugin"); const EnsureChunkConditionsPlugin = require("./optimize/EnsureChunkConditionsPlugin"); const FlagIncludedChunksPlugin = require("./optimize/FlagIncludedChunksPlugin"); const MangleExportsPlugin = require("./optimize/MangleExportsPlugin"); const MergeDuplicateChunksPlugin = require("./optimize/MergeDuplicateChunksPlugin"); const ModuleConcatenationPlugin = require("./optimize/ModuleConcatenationPlugin"); const RemoveEmptyChunksPlugin = require("./optimize/RemoveEmptyChunksPlugin"); const RemoveParentModulesPlugin = require("./optimize/RemoveParentModulesPlugin"); const RuntimeChunkPlugin = require("./optimize/RuntimeChunkPlugin"); const SideEffectsFlagPlugin = require("./optimize/SideEffectsFlagPlugin"); const SplitChunksPlugin = require("./optimize/SplitChunksPlugin"); const SizeLimitsPlugin = require("./performance/SizeLimitsPlugin"); const WasmFinalizeExportsPlugin = require("./wasm/WasmFinalizeExportsPlugin"); const DefaultStatsFactoryPlugin = require("./stats/DefaultStatsFactoryPlugin"); const DefaultStatsPresetPlugin = require("./stats/DefaultStatsPresetPlugin"); const DefaultStatsPrinterPlugin = require("./stats/DefaultStatsPrinterPlugin"); ======= >>>>>>> const OccurrenceChunkIdsPlugin = require("./ids/OccurrenceChunkIdsPlugin"); const DefaultStatsFactoryPlugin = require("./stats/DefaultStatsFactoryPlugin"); const DefaultStatsPresetPlugin = require("./stats/DefaultStatsPresetPlugin"); const DefaultStatsPrinterPlugin = require("./stats/DefaultStatsPrinterPlugin");
<<<<<<< /** @typedef {import("./Module")} Module */ /** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ /** * @typedef {Object} DependencyTemplate * @property {function(Dependency, Source, RuntimeTemplate, Map<Function, DependencyTemplate>): void} apply */ ======= /** @typedef {Object} Position * @property {number} column * @property {number} line */ /** @typedef {Object} Loc * @property {Position} start * @property {Position} end */ >>>>>>> /** @typedef {import("./Module")} Module */ /** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ /** * @typedef {Object} DependencyTemplate * @property {function(Dependency, Source, RuntimeTemplate, Map<Function, DependencyTemplate>): void} apply /** @typedef {Object} Position * @property {number} column * @property {number} line */ /** @typedef {Object} Loc * @property {Position} start * @property {Position} end */
<<<<<<< if(__SYSTEM__) { expect(mod).toEqual({ default: "ok", [Symbol.toStringTag]: "Module" }); ======= if(__SYSTEM__ === false) { done(new Error("System.import should not be parsed")); } else { expect(mod).toEqual(nsObj({ default: "ok" })); >>>>>>> if(__SYSTEM__) { expect(mod).toEqual(nsObj({ default: "ok" }));
<<<<<<< let moduleFilenames = modules.map(function(module) { return ModuleFilenameHelpers.createFilename(module, { moduleFilenameTemplate: self.moduleFilenameTemplate, namespace: self.namespace }, this.requestShortener); }, this); moduleFilenames = ModuleFilenameHelpers.replaceDuplicates(moduleFilenames, function(filename, i, n) { ======= let moduleFilenames = modules.map(module => { return ModuleFilenameHelpers.createFilename(module, self.moduleFilenameTemplate, moduleTemplate.requestShortener); }); moduleFilenames = ModuleFilenameHelpers.replaceDuplicates(moduleFilenames, (filename, i, n) => { >>>>>>> let moduleFilenames = modules.map(module => { return ModuleFilenameHelpers.createFilename(module, { moduleFilenameTemplate: self.moduleFilenameTemplate, namespace: self.namespace }, moduleTemplate.requestShortener); }); moduleFilenames = ModuleFilenameHelpers.replaceDuplicates(moduleFilenames, (filename, i, n) => {
<<<<<<< const ModuleDependency = require("./dependencies/ModuleDependency"); /** @typedef {import("./Module")} Module */ /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("./WebpackError")} WebpackError */ /** @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable */ /** @typedef {import("./dependencies/SingleEntryDependency")} SingleEntryDependency */ /** @typedef {import("./dependencies/MultiEntryDependency")} MultiEntryDependency */ /** @typedef {import("./dependencies/DllEntryDependency")} DllEntryDependency */ /** @typedef {import("./DependenciesBlock")} DependenciesBlock */ /** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ /** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ /** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate */ /** @typedef {import("./util/createHash").Hash} Hash */ // TODO use @callback /** @typedef {{[assetName: string]: Source}} CompilationAssets */ /** @typedef {(err: Error|null, result?: Module) => void } ModuleCallback */ /** @typedef {(err?: Error|null, result?: Module) => void } ModuleChainCallback */ /** @typedef {(module: Module) => void} OnModuleCallback */ /** @typedef {(err?: Error|null) => void} Callback */ /** @typedef {(d: Dependency) => any} DepBlockVarDependenciesCallback */ /** @typedef {new (...args: any[]) => Dependency} DepConstructor */ /** @typedef {{apply: () => void}} Plugin */ /** * @typedef {Object} ModuleFactoryCreateDataContextInfo * @property {string} issuer * @property {string} compiler */ /** * @typedef {Object} ModuleFactoryCreateData * @property {ModuleFactoryCreateDataContextInfo} contextInfo * @property {any=} resolveOptions * @property {string} context * @property {Dependency[]} dependencies */ /** * @typedef {Object} ModuleFactory * @property {(data: ModuleFactoryCreateData, callback: ModuleCallback) => any} create */ /** * @typedef {Object} SortedDependency * @property {ModuleFactory} factory * @property {Dependency[]} dependencies */ /** * @typedef {Object} AvailableModulesChunkGroupMapping * @property {ChunkGroup} chunkGroup * @property {Set<Module>} availableModules */ /** * @typedef {Object} DependenciesBlockLike * @property {Dependency[]} dependencies * @property {AsyncDependenciesBlock[]} blocks * @property {DependenciesBlockVariable[]} variables */ /** * @param {Chunk} a first chunk to sort by id * @param {Chunk} b second chunk to sort by id * @returns {-1|0|1} sort value */ ======= /** @typedef {import("./Module")} Module */ /** @typedef {import("./DependenciesBlock")} DependenciesBlock */ /** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ >>>>>>> const ModuleDependency = require("./dependencies/ModuleDependency"); /** @typedef {import("./Module")} Module */ /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("./WebpackError")} WebpackError */ /** @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable */ /** @typedef {import("./dependencies/SingleEntryDependency")} SingleEntryDependency */ /** @typedef {import("./dependencies/MultiEntryDependency")} MultiEntryDependency */ /** @typedef {import("./dependencies/DllEntryDependency")} DllEntryDependency */ /** @typedef {import("./DependenciesBlock")} DependenciesBlock */ /** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ /** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ /** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate */ /** @typedef {import("./util/createHash").Hash} Hash */ // TODO use @callback /** @typedef {{[assetName: string]: Source}} CompilationAssets */ /** @typedef {(err: Error|null, result?: Module) => void } ModuleCallback */ /** @typedef {(err?: Error|null, result?: Module) => void } ModuleChainCallback */ /** @typedef {(module: Module) => void} OnModuleCallback */ /** @typedef {(err?: Error|null) => void} Callback */ /** @typedef {(d: Dependency) => any} DepBlockVarDependenciesCallback */ /** @typedef {new (...args: any[]) => Dependency} DepConstructor */ /** @typedef {{apply: () => void}} Plugin */ /** * @typedef {Object} ModuleFactoryCreateDataContextInfo * @property {string} issuer * @property {string} compiler */ /** * @typedef {Object} ModuleFactoryCreateData * @property {ModuleFactoryCreateDataContextInfo} contextInfo * @property {any=} resolveOptions * @property {string} context * @property {Dependency[]} dependencies */ /** * @typedef {Object} ModuleFactory * @property {(data: ModuleFactoryCreateData, callback: ModuleCallback) => any} create */ /** * @typedef {Object} SortedDependency * @property {ModuleFactory} factory * @property {Dependency[]} dependencies */ /** * @typedef {Object} AvailableModulesChunkGroupMapping * @property {ChunkGroup} chunkGroup * @property {Set<Module>} availableModules */ /** * @typedef {Object} DependenciesBlockLike * @property {Dependency[]} dependencies * @property {AsyncDependenciesBlock[]} blocks * @property {DependenciesBlockVariable[]} variables */ /** * @param {Chunk} a first chunk to sort by id * @param {Chunk} b second chunk to sort by id * @returns {-1|0|1} sort value */ <<<<<<< /** @type {number=} */ this.nextFreeModuleIndex = undefined; /** @type {number=} */ this.nextFreeModuleIndex2 = undefined; /** @type {string[]} */ ======= >>>>>>> /** @type {string[]} */ <<<<<<< /** * @param {TODO} groupOptions options provided for group * @param {Module} module module in question * @param {DependencyLocation} loc source location reference * @param {string} request request string * @returns {ChunkGroup} the chunk group added inside */ ======= /** * @param {TODO} groupOptions options for the chunk group * @param {Module} module the module the references the chunk group * @param {TODO} loc the location from with the chunk group is reference (inside of module) * @param {string} request the request from which the the chunk group is referenced * @returns {ChunkGroup} the new or existing chunk group */ >>>>>>> /** * @param {TODO} groupOptions options for the chunk group * @param {Module} module the module the references the chunk group * @param {DependencyLocation} loc the location from with the chunk group is referenced (inside of module) * @param {string} request the request from which the the chunk group is referenced * @returns {ChunkGroup} the new or existing chunk group */ <<<<<<< /** * @param {Module} module index will be assigned to this module * @returns {void} */ assignIndex(module) { /** * @param {Module} module assign index to the module * @returns {void} */ const assignIndexToModule = module => { // enter module if (typeof module.index !== "number") { module.index = this.nextFreeModuleIndex++; // leave module queue.push(() => (module.index2 = this.nextFreeModuleIndex2++)); // enter it as block assignIndexToDependencyBlock(module); } }; const assignIndexToDependency = dependency => { if (dependency.module) { queue.push(() => assignIndexToModule(dependency.module)); } }; /** * @param {DependenciesBlock} block to assign index to * @returns {void} */ const assignIndexToDependencyBlock = block => { let allDependencies = []; /** * @param {Dependency} d iterator over dependencies * @returns {number} returned push function value (side-effect) */ const iteratorDependency = d => allDependencies.push(d); /** * @param {DependenciesBlock} b blocks to iterate * @returns {number} returned push value from queue (side-effect) */ const iteratorBlock = b => queue.push(() => assignIndexToDependencyBlock(b)); if (block.variables) { iterationBlockVariable(block.variables, iteratorDependency); } if (block.dependencies) { iterationOfArrayCallback(block.dependencies, iteratorDependency); } if (block.blocks) { const blocks = block.blocks; let indexBlock = blocks.length; while (indexBlock--) { iteratorBlock(blocks[indexBlock]); } } let indexAll = allDependencies.length; while (indexAll--) { iteratorAllDependencies(allDependencies[indexAll]); } }; const queue = [ () => { assignIndexToModule(module); } ]; /** * @param {Dependency[]} d all dependencies of a block being added to queue * @returns {void} */ const iteratorAllDependencies = d => { queue.push(() => assignIndexToDependency(d)); }; while (queue.length) { queue.pop()(); } } /** * @param {Module} module module to assign depth * @returns {void} */ ======= >>>>>>> /** * @param {Module} module module to assign depth * @returns {void} */ <<<<<<< // This method creates the Chunk graph from the Module graph /** * @param {TODO} inputChunkGroups input chunkGroups to be processed * @returns {void} */ ======= /** * This method creates the Chunk graph from the Module graph * @private * @param {TODO[]} inputChunkGroups chunk groups which are processed * @returns {void} */ >>>>>>> /** * This method creates the Chunk graph from the Module graph * @private * @param {TODO[]} inputChunkGroups chunk groups which are processed * @returns {void} */ <<<<<<< /** @type {Map<DependenciesBlock, {modules: Set<Module>, blocks: AsyncDependenciesBlock[]}>} */ ======= /** @type {Map<DependenciesBlock, { modules: Module[], blocks: AsyncDependenciesBlock[]}>} */ >>>>>>> /** @type {Map<DependenciesBlock, { modules: Module[], blocks: AsyncDependenciesBlock[]}>} */ <<<<<<< /** @type {DependenciesBlock} */ let block; /** @type {DependenciesBlock[]} */ let blockQueue; /** @type {Set<Module>} */ let blockInfoModules; /** @type {AsyncDependenciesBlock[]} */ let blockInfoBlocks; ======= /** @type {DependenciesBlock} */ let block; /** @type {TODO} */ let blockQueue; /** @type {Set<TODO>} */ let blockInfoModules; /** @type {TODO[]} */ let blockInfoBlocks; >>>>>>> /** @type {DependenciesBlock} */ let block; /** @type {DependenciesBlock[]} */ let blockQueue; /** @type {Set<Module>} */ let blockInfoModules; /** @type {AsyncDependenciesBlock[]} */ let blockInfoBlocks; <<<<<<< /** @type {Map<DependenciesBlock, ChunkGroup>} */ ======= /** @type {Map<ChunkGroup, { index: number, index2: number }>} */ const chunkGroupCounters = new Map(); for (const chunkGroup of inputChunkGroups) { chunkGroupCounters.set(chunkGroup, { index: 0, index2: 0 }); } let nextFreeModuleIndex = 0; let nextFreeModuleIndex2 = 0; /** @type {Map<DependenciesBlock, ChunkGroup>} */ >>>>>>> /** @type {Map<ChunkGroup, { index: number, index2: number }>} */ const chunkGroupCounters = new Map(); for (const chunkGroup of inputChunkGroups) { chunkGroupCounters.set(chunkGroup, { index: 0, index2: 0 }); } let nextFreeModuleIndex = 0; let nextFreeModuleIndex2 = 0; /** @type {Map<DependenciesBlock, ChunkGroup>} */ <<<<<<< // Start with the provided modules/chunks /** @type {{block: DependenciesBlock, module: Module, chunk: Chunk, chunkGroup: ChunkGroup}[]} */ const queue = inputChunkGroups.map(chunkGroup => ({ ======= const ADD_AND_ENTER_MODULE = 0; const ENTER_MODULE = 1; const PROCESS_BLOCK = 2; const LEAVE_MODULE = 3; /** * @typedef {Object} QueueItem * @property {number} action * @property {DependenciesBlock} block * @property {Module} module * @property {Chunk} chunk * @property {ChunkGroup} chunkGroup */ /** * @param {ChunkGroup} chunkGroup chunk group * @returns {QueueItem} queue item */ const chunkGroupToQueueItem = chunkGroup => ({ action: ENTER_MODULE, >>>>>>> const ADD_AND_ENTER_MODULE = 0; const ENTER_MODULE = 1; const PROCESS_BLOCK = 2; const LEAVE_MODULE = 3; /** * @typedef {Object} QueueItem * @property {number} action * @property {DependenciesBlock} block * @property {Module} module * @property {Chunk} chunk * @property {ChunkGroup} chunkGroup */ /** * @param {ChunkGroup} chunkGroup chunk group * @returns {QueueItem} queue item */ const chunkGroupToQueueItem = chunkGroup => ({ action: ENTER_MODULE,
<<<<<<< /** @typedef {import("../../declarations/plugins/JsonModulesPluginParser").JsonModulesPluginParserOptions} JsonModulesPluginParserOptions */ /** @typedef {import("../NormalModule").ParserState} ParserState */ ======= /** @typedef {import("../Parser").ParserState} ParserState */ /** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ >>>>>>> /** @typedef {import("../../declarations/plugins/JsonModulesPluginParser").JsonModulesPluginParserOptions} JsonModulesPluginParserOptions */ /** @typedef {import("../Parser").ParserState} ParserState */ /** @typedef {import("../Parser").PreparsedAst} PreparsedAst */ <<<<<<< * @param {JsonModulesPluginParserOptions} options parser options */ constructor(options) { this.options = options || {}; } /** * @param {string} source the source to parse ======= * @param {string | Buffer | PreparsedAst} source the source to parse >>>>>>> * @param {JsonModulesPluginParserOptions} options parser options */ constructor(options) { super(); this.options = options || {}; } /** * @param {string | Buffer | PreparsedAst} source the source to parse <<<<<<< let data; if (typeof this.options.parse === "function") { source = this.options.parse.call(null, source); if (source && typeof source === "object") { data = source; } } if (!data) { data = parseJson(source[0] === "\ufeff" ? source.slice(1) : source); } ======= if (Buffer.isBuffer(source)) { source = source.toString("utf-8"); } const data = typeof source === "object" ? source : parseJson(source[0] === "\ufeff" ? source.slice(1) : source); >>>>>>> if (Buffer.isBuffer(source)) { source = source.toString("utf-8"); } let data; if (typeof this.options.parse === "function") { source = this.options.parse.call(null, source); if (source && typeof source === "object") { data = source; } } if (!data) { data = typeof source === "object" ? source : parseJson(source[0] === "\ufeff" ? source.slice(1) : source); }
<<<<<<< /** @type {AsyncSeriesHook<[Compilation]>} */ ======= /** @type {AsyncSeriesHook<string, Buffer>} */ assetEmitted: new AsyncSeriesHook(["file", "content"]), /** @type {AsyncSeriesHook<Compilation>} */ >>>>>>> /** @type {AsyncSeriesHook<[string, Buffer]>} */ assetEmitted: new AsyncSeriesHook(["file", "content"]), /** @type {AsyncSeriesHook<[Compilation]>} */ <<<<<<< /** @type {SyncBailHook<[string, string, any[]], true>} */ infrastructurelog: new SyncBailHook(["origin", "type", "args"]), ======= /** @type {SyncBailHook<string, string, any[]>} */ infrastructureLog: new SyncBailHook(["origin", "type", "args"]), >>>>>>> /** @type {SyncBailHook<[string, string, any[]], true>} */ infrastructureLog: new SyncBailHook(["origin", "type", "args"]), <<<<<<< ======= }; // TODO webpack 5 remove this this.hooks.infrastructurelog = this.hooks.infrastructureLog; this._pluginCompat.tap("Compiler", options => { switch (options.name) { case "additional-pass": case "before-run": case "run": case "emit": case "after-emit": case "before-compile": case "make": case "after-compile": case "watch-run": options.async = true; break; } >>>>>>> <<<<<<< // if the target file has already been written if (targetFileGeneration !== undefined) { // check if the Source has been written to this target file const writtenGeneration = cacheEntry.writtenTo.get(targetPath); if (writtenGeneration === targetFileGeneration) { // if yes, we skip writing the file // as it's already there // (we assume one doesn't remove files while the Compiler is running) ======= // information marker that the asset has been emitted compilation.emittedAssets.add(file); // cache the information that the Source has been written to that location const newGeneration = targetFileGeneration === undefined ? 1 : targetFileGeneration + 1; cacheEntry.writtenTo.set(targetPath, newGeneration); this._assetEmittingWrittenFiles.set(targetPath, newGeneration); this.hooks.assetEmitted.callAsync(file, content, callback); }); } else { if (source.existsAt === targetPath) { source.emitted = false; >>>>>>> // if the target file has already been written if (targetFileGeneration !== undefined) { // check if the Source has been written to this target file const writtenGeneration = cacheEntry.writtenTo.get(targetPath); if (writtenGeneration === targetFileGeneration) { // if yes, we skip writing the file // as it's already there // (we assume one doesn't remove files while the Compiler is running) <<<<<<< ======= source.existsAt = targetPath; source.emitted = true; this.outputFileSystem.writeFile(targetPath, content, err => { if (err) return callback(err); this.hooks.assetEmitted.callAsync(file, content, callback); }); >>>>>>>
<<<<<<< compiler.plugin("additional-pass", callback => { if(multiStep) return setTimeout(callback, fullBuildTimeout); return callback(); }); compilation.plugin("additional-chunk-assets", () => { const records = compilation.records; if(records.hash === compilation.hash) return; ======= compilation.plugin("additional-chunk-assets", function() { const records = this.records; if(records.hash === this.hash) return; >>>>>>> compilation.plugin("additional-chunk-assets", () => { const records = compilation.records; if(records.hash === compilation.hash) return;
<<<<<<< /** * @typedef {Object} SourceMapObject * @property {string[]} sources * @property {string[]=} sourcesContent * @property {string} sourceRoot * @property {string} file */ /** * @typedef {Object} SourceMapDevToolTask * @property {Chunk} chunk * @property {string} file * @property {Source} asset * @property {string} source * @property {SourceMapObject} sourceMap * @property {(Module|string)[]} modules */ /** * @param {string} file the filename * @param {Chunk} chunk the chunk * @param {TODO} options options * @param {Compilation} compilation the compilation * @returns {SourceMapDevToolTask|undefined} the task for this file */ ======= /** * Creating {@link SourceMapTask} for given file * @param {string} file current compiled file * @param {Chunk} chunk related chunk * @param {SourceMapDevToolPluginOptions} options source map options * @param {Compilation} compilation compilation instance * @returns {SourceMapTask | undefined} created task instance or `undefined` */ >>>>>>> /** * Creating {@link SourceMapTask} for given file * @param {string} file current compiled file * @param {Chunk} chunk related chunk * @param {SourceMapDevToolPluginOptions} options source map options * @param {Compilation} compilation compilation instance * @returns {SourceMapTask | undefined} created task instance or `undefined` */ <<<<<<< if (cachedFile !== file) chunk.files.add(cachedFile); ======= /** * Add file to chunk, if not presented there */ if (cachedFile !== file) chunk.files.push(cachedFile); >>>>>>> /** * Add file to chunk, if not presented there */ if (cachedFile !== file) chunk.files.add(cachedFile); <<<<<<< let source; /** @type {SourceMapObject} */ let sourceMap; ======= let source, sourceMap; /** * Check if asset can build source map */ >>>>>>> let source; /** @type {SourceMap} */ let sourceMap; /** * Check if asset can build source map */ <<<<<<< /** * @param {Compiler} compiler webpack compiler * @returns {void} */ ======= /** * Apply compiler * @param {Compiler} compiler compiler instance * @returns {void} */ >>>>>>> /** * Apply compiler * @param {Compiler} compiler compiler instance * @returns {void} */ <<<<<<< "SourceMapDevToolPlugin", chunks => { const chunkGraph = compilation.chunkGraph; ======= /** @type {TODO} */ ({ name: "SourceMapDevToolPlugin", context: true }), /** * @param {object} context hook context * @param {Array<Chunk>} chunks resulted chunks * @throws {Error} throws error, if `sourceMapFilename === false && sourceMappingURLComment === false` * @returns {void} */ (context, chunks) => { /** @type {Map<string | Module, string>} */ >>>>>>> "SourceMapDevToolPlugin", chunks => { const chunkGraph = compilation.chunkGraph; /** @type {Map<string | Module, string>} */ <<<<<<< let sourceMapFile = compilation.getPath(sourceMapFilename, { ======= let query = ""; const idx = filename.indexOf("?"); if (idx >= 0) { query = filename.substr(idx); filename = filename.substr(0, idx); } const pathParams = { >>>>>>> const pathParams = { <<<<<<< ? options.publicPath + sourceMapFile : relative( outputFs, dirname(outputFs, `/${file}`), `/${sourceMapFile}` ); ======= ? options.publicPath + sourceMapFile.replace(/\\/g, "/") : path .relative(path.dirname(file), sourceMapFile) .replace(/\\/g, "/"); /** * Add source map url to compilation asset, if {@link currentSourceMappingURLComment} presented */ >>>>>>> ? options.publicPath + sourceMapFile : relative( outputFs, dirname(outputFs, `/${file}`), `/${sourceMapFile}` ); /** * Add source map url to compilation asset, if {@link currentSourceMappingURLComment} presented */
<<<<<<< this.compiler.compile(function onCompiled(err, compilation) { ======= if(err) return this._done(err); this.compiler.compile(function(err, compilation) { >>>>>>> if(err) return this._done(err); this.compiler.compile(function onCompiled(err, compilation) {
<<<<<<< import FeedTheDemon from './Modules/Talents/FeedTheDemon'; import Gluttony from './Modules/Talents/Gluttony'; ======= import BurningAlive from './Modules/Talents/BurningAlive'; import FeastOfSouls from './Modules/Talents/FeastOfSouls'; import AgonizingFlames from './Modules/Talents/AgonizingFlames'; >>>>>>> import FeedTheDemon from './Modules/Talents/FeedTheDemon'; import Gluttony from './Modules/Talents/Gluttony'; import BurningAlive from './Modules/Talents/BurningAlive'; import FeastOfSouls from './Modules/Talents/FeastOfSouls'; import AgonizingFlames from './Modules/Talents/AgonizingFlames'; <<<<<<< spiritBombSoulsConsume: SpiritBombSoulsConsume, feedTheDemon: FeedTheDemon, gluttony: Gluttony, ======= spiritBombSoulConsume: SpiritBombSoulConsume, burningAlive: BurningAlive, feastOfSouls: FeastOfSouls, agonizingFlames: AgonizingFlames, >>>>>>> spiritBombSoulsConsume: SpiritBombSoulsConsume, feedTheDemon: FeedTheDemon, gluttony: Gluttony, burningAlive: BurningAlive, feastOfSouls: FeastOfSouls, agonizingFlames: AgonizingFlames,
<<<<<<< const { compareLocations, concatComparators, compareSelect, compareIds, compareStringsNumeric } = require("./util/comparators"); const createHash = require("./util/createHash"); const { arrayToSetDeprecation } = require("./util/deprecation"); ======= const SortableSet = require("./util/SortableSet"); const GraphHelpers = require("./GraphHelpers"); const ModuleDependency = require("./dependencies/ModuleDependency"); const compareLocations = require("./compareLocations"); const { Logger, LogType } = require("./logging/Logger"); const ErrorHelpers = require("./ErrorHelpers"); >>>>>>> const { compareLocations, concatComparators, compareSelect, compareIds, compareStringsNumeric } = require("./util/comparators"); const createHash = require("./util/createHash"); const { arrayToSetDeprecation } = require("./util/deprecation"); <<<<<<< * @typedef {Object} ChunkPathData * @property {string|number} id * @property {string=} name * @property {string} hash * @property {string} renderedHash * @property {function(number): string=} hashWithLength * @property {(Record<string, string>)=} contentHash * @property {(Record<string, (length: number) => string>)=} contentHashWithLength ======= * @typedef {Object} LogEntry * @property {string} type * @property {any[]} args * @property {number} time * @property {string[]=} trace */ /** * @param {Chunk} a first chunk to sort by id * @param {Chunk} b second chunk to sort by id * @returns {-1|0|1} sort value >>>>>>> * @typedef {Object} ChunkPathData * @property {string|number} id * @property {string=} name * @property {string} hash * @property {string} renderedHash * @property {function(number): string=} hashWithLength * @property {(Record<string, string>)=} contentHash * @property {(Record<string, (length: number) => string>)=} contentHashWithLength */ /** * @typedef {Object} LogEntry * @property {string} type * @property {any[]} args * @property {number} time * @property {string[]=} trace <<<<<<< /** @type {HookMap<SyncHook<[Object, Object]>>} */ statsPreset: new HookMap(() => new SyncHook(["options", "context"])), /** @type {SyncHook<[Object, Object]>} */ statsNormalize: new SyncHook(["options", "context"]), /** @type {SyncHook<[StatsFactory, Object]>} */ statsFactory: new SyncHook(["statsFactory", "options"]), /** @type {SyncHook<[StatsPrinter, Object]>} */ statsPrinter: new SyncHook(["statsPrinter", "options"]), get normalModuleLoader() { return getNormalModuleLoader(); ======= /** @type {SyncBailHook<string, LogEntry>} */ log: new SyncBailHook(["origin", "logEntry"]), // TODO the following hooks are weirdly located here // TODO move them for webpack 5 /** @type {SyncHook<object, Module>} */ normalModuleLoader: new SyncHook(["loaderContext", "module"]), /** @type {SyncBailHook<Chunk[]>} */ optimizeExtractedChunksBasic: new SyncBailHook(["chunks"]), /** @type {SyncBailHook<Chunk[]>} */ optimizeExtractedChunks: new SyncBailHook(["chunks"]), /** @type {SyncBailHook<Chunk[]>} */ optimizeExtractedChunksAdvanced: new SyncBailHook(["chunks"]), /** @type {SyncHook<Chunk[]>} */ afterOptimizeExtractedChunks: new SyncHook(["chunks"]) }; this._pluginCompat.tap("Compilation", options => { switch (options.name) { case "optimize-tree": case "additional-assets": case "optimize-chunk-assets": case "optimize-assets": case "after-seal": options.async = true; break; >>>>>>> /** @type {SyncBailHook<[string, LogEntry], true>} */ log: new SyncBailHook(["origin", "logEntry"]), /** @type {HookMap<SyncHook<[Object, Object]>>} */ statsPreset: new HookMap(() => new SyncHook(["options", "context"])), /** @type {SyncHook<[Object, Object]>} */ statsNormalize: new SyncHook(["options", "context"]), /** @type {SyncHook<[StatsFactory, Object]>} */ statsFactory: new SyncHook(["statsFactory", "options"]), /** @type {SyncHook<[StatsPrinter, Object]>} */ statsPrinter: new SyncHook(["statsPrinter", "options"]), get normalModuleLoader() { return getNormalModuleLoader(); <<<<<<< * @param {Module} module module to be added that was created * @param {ModuleCallback} callback returns the module in the compilation, * it could be the passed one (if new), or an already existing in the compilation * @returns {void} ======= * @param {string | (function(): string)} name name of the logger, or function called once to get the logger name * @returns {Logger} a logger with that name */ getLogger(name) { if (!name) { throw new TypeError("Compilation.getLogger(name) called without a name"); } /** @type {LogEntry[] | undefined} */ let logEntries; return new Logger((type, args) => { if (typeof name === "function") { name = name(); if (!name) { throw new TypeError( "Compilation.getLogger(name) called with a function not returning a name" ); } } let trace; switch (type) { case LogType.warn: case LogType.error: case LogType.trace: trace = ErrorHelpers.cutOffLoaderExecution(new Error("Trace").stack) .split("\n") .slice(3); break; } /** @type {LogEntry} */ const logEntry = { time: Date.now(), type, args, trace }; if (this.hooks.log.call(name, logEntry) === undefined) { if (logEntry.type === LogType.profileEnd) { // eslint-disable-next-line node/no-unsupported-features/node-builtins if (typeof console.profileEnd === "function") { // eslint-disable-next-line node/no-unsupported-features/node-builtins console.profileEnd(`[${name}] ${logEntry.args[0]}`); } } if (logEntries === undefined) { logEntries = this.logging.get(name); if (logEntries === undefined) { logEntries = []; this.logging.set(name, logEntries); } } logEntries.push(logEntry); if (logEntry.type === LogType.profile) { // eslint-disable-next-line node/no-unsupported-features/node-builtins if (typeof console.profile === "function") { // eslint-disable-next-line node/no-unsupported-features/node-builtins console.profile(`[${name}] ${logEntry.args[0]}`); } } } }); } /** * @typedef {Object} AddModuleResult * @property {Module} module the added or existing module * @property {boolean} issuer was this the first request for this module * @property {boolean} build should the module be build * @property {boolean} dependencies should dependencies be walked >>>>>>> * @param {string | (function(): string)} name name of the logger, or function called once to get the logger name * @returns {Logger} a logger with that name */ getLogger(name) { if (!name) { throw new TypeError("Compilation.getLogger(name) called without a name"); } /** @type {LogEntry[] | undefined} */ let logEntries; return new Logger((type, args) => { if (typeof name === "function") { name = name(); if (!name) { throw new TypeError( "Compilation.getLogger(name) called with a function not returning a name" ); } } let trace; switch (type) { case LogType.warn: case LogType.error: case LogType.trace: trace = ErrorHelpers.cutOffLoaderExecution(new Error("Trace").stack) .split("\n") .slice(3); break; } /** @type {LogEntry} */ const logEntry = { time: Date.now(), type, args, trace }; if (this.hooks.log.call(name, logEntry) === undefined) { if (logEntry.type === LogType.profileEnd) { // eslint-disable-next-line node/no-unsupported-features/node-builtins if (typeof console.profileEnd === "function") { // eslint-disable-next-line node/no-unsupported-features/node-builtins console.profileEnd(`[${name}] ${logEntry.args[0]}`); } } if (logEntries === undefined) { logEntries = this.logging.get(name); if (logEntries === undefined) { logEntries = []; this.logging.set(name, logEntries); } } logEntries.push(logEntry); if (logEntry.type === LogType.profile) { // eslint-disable-next-line node/no-unsupported-features/node-builtins if (typeof console.profile === "function") { // eslint-disable-next-line node/no-unsupported-features/node-builtins console.profile(`[${name}] ${logEntry.args[0]}`); } } } }); } /** * @param {Module} module module to be added that was created * @param {ModuleCallback} callback returns the module in the compilation, * it could be the passed one (if new), or an already existing in the compilation * @returns {void}
<<<<<<< // TODO webpack 5, no adding to .hooks, use WeakMap and static methods ["jsonpScript", "linkPreload", "linkPrefetch"].forEach(hook => { if (!mainTemplate.hooks[hook]) { mainTemplate.hooks[hook] = new SyncWaterfallHook([ "source", "chunk", "hash" ]); } }); ======= const needPrefetchingCode = chunk => { const allPrefetchChunks = chunk.getChildIdsByOrdersMap(true).prefetch; return allPrefetchChunks && Object.keys(allPrefetchChunks).length; }; // TODO refactor this if (!mainTemplate.hooks.jsonpScript) { mainTemplate.hooks.jsonpScript = new SyncWaterfallHook([ "source", "chunk", "hash" ]); } if (!mainTemplate.hooks.linkPreload) { mainTemplate.hooks.linkPreload = new SyncWaterfallHook([ "source", "chunk", "hash" ]); } if (!mainTemplate.hooks.linkPrefetch) { mainTemplate.hooks.linkPrefetch = new SyncWaterfallHook([ "source", "chunk", "hash" ]); } >>>>>>> const needPrefetchingCode = chunk => { const allPrefetchChunks = chunk.getChildIdsByOrdersMap(true).prefetch; return allPrefetchChunks && Object.keys(allPrefetchChunks).length; }; // TODO webpack 5, no adding to .hooks, use WeakMap and static methods ["jsonpScript", "linkPreload", "linkPrefetch"].forEach(hook => { if (!mainTemplate.hooks[hook]) { mainTemplate.hooks[hook] = new SyncWaterfallHook([ "source", "chunk", "hash" ]); } });
<<<<<<< expect(result).toEqual({ default: { named: "named", default: "default" } }); ======= result.should.be.eql({ named: "named", default: { named: "named", default: "default" } }); >>>>>>> expect(result).toEqual({ named: "named", default: { named: "named", default: "default" } });
<<<<<<< /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("./Parser")} Parser */ class RuntimeValue { constructor(fn, fileDependencies) { this.fn = fn; this.fileDependencies = fileDependencies || []; } exec(parser) { for (const fileDependency of this.fileDependencies) { parser.state.module.buildInfo.fileDependencies.add(fileDependency); } return this.fn(); } } const stringifyObj = (obj, parser) => { ======= /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("./Parser")} Parser */ /** @typedef {null|undefined|RegExp|Function|Object} CodeValue */ /** * Stringify an object * @param {Object} obj Object to stringify * @returns {string} Stringified object */ const stringifyObj = obj => { >>>>>>> /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("./Parser")} Parser */ /** @typedef {null|undefined|RegExp|Function|Object} CodeValue */ class RuntimeValue { constructor(fn, fileDependencies) { this.fn = fn; this.fileDependencies = fileDependencies || []; } exec(parser) { for (const fileDependency of this.fileDependencies) { parser.state.module.buildInfo.fileDependencies.add(fileDependency); } return this.fn(); } } const stringifyObj = (obj, parser) => { <<<<<<< /** * Convert code to a string that evaluates * @param {null|undefined|RegExp|Function|Object} code Code to evaluate * @param {Parser} parser Parser * @returns {string} code converted to string that evaluates */ const toCode = (code, parser) => { ======= /** * Convert code to a string that evaluates * @param {CodeValue} code Code to evaluate * @returns {string} code converted to string that evaluates */ const toCode = code => { >>>>>>> /** * Convert code to a string that evaluates * @param {CodeValue} code Code to evaluate * @param {Parser} parser Parser * @returns {string} code converted to string that evaluates */ const toCode = (code, parser) => { <<<<<<< static runtimeValue(fn, fileDependencies) { return new RuntimeValue(fn, fileDependencies); } /** * Apply the plugin * @param {Compiler} compiler Webpack compiler * @returns {void} */ ======= /** * @param {Compiler} compiler Webpack Compiler * @returns {void} */ >>>>>>> static runtimeValue(fn, fileDependencies) { return new RuntimeValue(fn, fileDependencies); } /** * Apply the plugin * @param {Compiler} compiler Webpack compiler * @returns {void} */ <<<<<<< /** * Handler * @param {TODO} parser Parser * @returns {void} */ ======= /** * Handler * @param {Parser} parser Parser * @returns {void} */ >>>>>>> /** * Handler * @param {Parser} parser Parser * @returns {void} */ <<<<<<< /** * Walk definitions * @param {TODO} definitions Definitions map * @param {string} prefix Prefix string * @returns {void} */ ======= /** * Walk definitions * @param {Object} definitions Definitions map * @param {string} prefix Prefix string * @returns {void} */ >>>>>>> /** * Walk definitions * @param {Object} definitions Definitions map * @param {string} prefix Prefix string * @returns {void} */ <<<<<<< /** * Apply Code * @param {string} key Key * @param {TODO} code Code * @returns {void} */ ======= /** * Apply Code * @param {string} key Key * @param {CodeValue} code Code * @returns {void} */ >>>>>>> /** * Apply Code * @param {string} key Key * @param {CodeValue} code Code * @returns {void} */
<<<<<<< var path = require("path"); var Tapable = require("tapable"); var Compilation = require("./Compilation"); var Stats = require("./Stats"); var NormalModuleFactory = require("./NormalModuleFactory"); var ContextModuleFactory = require("./ContextModuleFactory"); function Watching(compiler, watchOptions, handler) { this.startTime = null; this.invalid = false; this.handler = handler; this.callbacks = []; this.closed = false; if(typeof watchOptions === "number") { this.watchOptions = { aggregateTimeout: watchOptions }; } else if(watchOptions && typeof watchOptions === "object") { this.watchOptions = Object.assign({}, watchOptions); } else { this.watchOptions = {}; ======= "use strict"; const path = require("path"); const Tapable = require("tapable"); const Compilation = require("./Compilation"); const Stats = require("./Stats"); const NormalModuleFactory = require("./NormalModuleFactory"); const ContextModuleFactory = require("./ContextModuleFactory"); const makePathsRelative = require("./util/identifier").makePathsRelative; class Watching { constructor(compiler, watchOptions, handler) { this.startTime = null; this.invalid = false; this.handler = handler; this.closed = false; if(typeof watchOptions === "number") { this.watchOptions = { aggregateTimeout: watchOptions }; } else if(watchOptions && typeof watchOptions === "object") { this.watchOptions = Object.assign({}, watchOptions); } else { this.watchOptions = {}; } this.watchOptions.aggregateTimeout = this.watchOptions.aggregateTimeout || 200; this.compiler = compiler; this.running = true; this.compiler.readRecords(err => { if(err) return this._done(err); this._go(); }); >>>>>>> "use strict"; const path = require("path"); const Tapable = require("tapable"); const Compilation = require("./Compilation"); const Stats = require("./Stats"); const NormalModuleFactory = require("./NormalModuleFactory"); const ContextModuleFactory = require("./ContextModuleFactory"); const makePathsRelative = require("./util/identifier").makePathsRelative; class Watching { constructor(compiler, watchOptions, handler) { this.startTime = null; this.invalid = false; this.handler = handler; this.callbacks = []; this.closed = false; if(typeof watchOptions === "number") { this.watchOptions = { aggregateTimeout: watchOptions }; } else if(watchOptions && typeof watchOptions === "object") { this.watchOptions = Object.assign({}, watchOptions); } else { this.watchOptions = {}; } this.watchOptions.aggregateTimeout = this.watchOptions.aggregateTimeout || 200; this.compiler = compiler; this.running = true; this.compiler.readRecords(err => { if(err) return this._done(err); this._go(); }); <<<<<<< this.compiler.applyPlugins("done", stats); this.handler(null, stats); if(!this.closed) { this.watch(compilation.fileDependencies, compilation.contextDependencies, compilation.missingDependencies); } this.callbacks.forEach(function(cb) { cb(); }); this.callbacks.length = 0; }; Watching.prototype.watch = function(files, dirs, missing) { this.pausedWatcher = null; this.watcher = this.compiler.watchFileSystem.watch(files, dirs, missing, this.startTime, this.watchOptions, function(err, filesModified, contextModified, missingModified, fileTimestamps, contextTimestamps) { this.pausedWatcher = this.watcher; this.watcher = null; if(err) return this.handler(err); this.compiler.fileTimestamps = fileTimestamps; this.compiler.contextTimestamps = contextTimestamps; this.invalidate(); }.bind(this), function(fileName, changeTime) { this.compiler.applyPlugins("invalid", fileName, changeTime); }.bind(this)); }; Watching.prototype.invalidate = function(callback) { if(callback) { this.callbacks.push(callback); } if(this.watcher) { this.pausedWatcher = this.watcher; this.watcher.pause(); this.watcher = null; ======= _getStats(compilation) { const stats = new Stats(compilation); stats.startTime = this.startTime; stats.endTime = Date.now(); return stats; >>>>>>> _getStats(compilation) { const stats = new Stats(compilation); stats.startTime = this.startTime; stats.endTime = Date.now(); return stats;
<<<<<<< import Tradewinds from '../shared/modules/spells/bfa/azeritetraits/Tradewinds'; ======= import WoundBinder from '../shared/modules/spells/bfa/azeritetraits/WoundBinder'; import SynergisticGrowth from '../shared/modules/spells/bfa/azeritetraits/SynergisticGrowth'; import BracingChill from '../shared/modules/spells/bfa/azeritetraits/BracingChill'; >>>>>>> import WoundBinder from '../shared/modules/spells/bfa/azeritetraits/WoundBinder'; import SynergisticGrowth from '../shared/modules/spells/bfa/azeritetraits/SynergisticGrowth'; import BracingChill from '../shared/modules/spells/bfa/azeritetraits/BracingChill'; import Tradewinds from '../shared/modules/spells/bfa/azeritetraits/Tradewinds'; <<<<<<< tradewinds: Tradewinds, ======= woundBinder:WoundBinder, synergisticGrowth: SynergisticGrowth, bracingChill: BracingChill, >>>>>>> woundBinder:WoundBinder, synergisticGrowth: SynergisticGrowth, bracingChill: BracingChill, tradewinds: Tradewinds,
<<<<<<< * @typedef {Object} AvailableModulesChunkGroupMapping * @property {ChunkGroup} chunkGroup * @property {Set<Module>} availableModules * @property {boolean} needCopy */ /** ======= * @typedef {Object} SortedDependency * @property {ModuleFactory} factory * @property {Dependency[]} dependencies */ /** >>>>>>> * @typedef {Object} AvailableModulesChunkGroupMapping * @property {ChunkGroup} chunkGroup * @property {Set<Module>} availableModules * @property {boolean} needCopy */ /** <<<<<<< ======= const byId = (a, b) => { if (typeof a.id !== typeof b.id) { return typeof a.id < typeof b.id ? -1 : 1; } if (a.id < b.id) return -1; if (a.id > b.id) return 1; return 0; }; >>>>>>> <<<<<<< ======= const byIdOrIdentifier = (a, b) => { if (typeof a.id !== typeof b.id) { return typeof a.id < typeof b.id ? -1 : 1; } if (a.id < b.id) return -1; if (a.id > b.id) return 1; const identA = a.identifier(); const identB = b.identifier(); if (identA < identB) return -1; if (identA > identB) return 1; return 0; }; >>>>>>> <<<<<<< const byNameOrHash = concatComparators( compareSelect( /** * @param {Compilation} c compilation * @returns {string} name */ c => c.name, compareIds ), compareSelect( /** * @param {Compilation} c compilation * @returns {string} hash */ c => c.fullHash, compareIds ) ); ======= /** * @template T * @param {Set<T>} a first set * @param {Set<T>} b second set * @returns {number} cmp */ const bySetSize = (a, b) => { return a.size - b.size; }; /** * @param {DependenciesBlockVariable[]} variables DepBlock Variables to iterate over * @param {DepBlockVarDependenciesCallback} fn callback to apply on iterated elements * @returns {void} */ const iterationBlockVariable = (variables, fn) => { for ( let indexVariable = 0; indexVariable < variables.length; indexVariable++ ) { const varDep = variables[indexVariable].dependencies; for (let indexVDep = 0; indexVDep < varDep.length; indexVDep++) { fn(varDep[indexVDep]); } } }; >>>>>>> const byNameOrHash = concatComparators( compareSelect( /** * @param {Compilation} c compilation * @returns {string} name */ c => c.name, compareIds ), compareSelect( /** * @param {Compilation} c compilation * @returns {string} hash */ c => c.fullHash, compareIds ) ); /** * @template T * @param {Set<T>} a first set * @param {Set<T>} b second set * @returns {number} cmp */ const bySetSize = (a, b) => { return a.size - b.size; }; <<<<<<< this.hooks.buildModule.call(module); this.builtModules.add(module); module.build( this.options, this, this.resolverFactory.get("normal", module.resolveOptions), this.inputFileSystem, err => { if (currentProfile !== undefined) { currentProfile.markBuildingEnd(); } if (err) { this.hooks.failedModule.call(module, err); return callback(err); } if (currentProfile !== undefined) { currentProfile.markStoringStart(); } this.cache.store( `${this.compilerPath}/module/${module.identifier()}`, null, module, err => { if (currentProfile !== undefined) { currentProfile.markStoringEnd(); } if (err) { this.hooks.failedModule.call(module, err); return callback(err); } this.hooks.succeedModule.call(module); return callback(); } ); } ); ======= const warnings = module.warnings; for ( let indexWarning = 0; indexWarning < warnings.length; indexWarning++ ) { const war = warnings[indexWarning]; war.origin = origin; war.dependencies = dependencies; this.warnings.push(war); } const originalMap = module.dependencies.reduce((map, v, i) => { map.set(v, i); return map; }, new Map()); module.dependencies.sort((a, b) => { const cmp = compareLocations(a.loc, b.loc); if (cmp) return cmp; return originalMap.get(a) - originalMap.get(b); }); if (error) { this.hooks.failedModule.call(module, error); return callback(error); } this.hooks.succeedModule.call(module); return callback(); >>>>>>> this.hooks.buildModule.call(module); this.builtModules.add(module); module.build( this.options, this, this.resolverFactory.get("normal", module.resolveOptions), this.inputFileSystem, err => { if (currentProfile !== undefined) { currentProfile.markBuildingEnd(); } if (err) { this.hooks.failedModule.call(module, err); return callback(err); } if (currentProfile !== undefined) { currentProfile.markStoringStart(); } this.cache.store( `${this.compilerPath}/module/${module.identifier()}`, null, module, err => { if (currentProfile !== undefined) { currentProfile.markStoringEnd(); } if (err) { this.hooks.failedModule.call(module, err); return callback(err); } this.hooks.succeedModule.call(module); return callback(); } ); } ); <<<<<<< ======= if (block.variables) { iterationBlockVariable(block.variables, iteratorDependency); } } applyModuleIds() { const unusedIds = []; let nextFreeModuleId = 0; const usedIds = new Set(); if (this.usedModuleIds) { for (const id of this.usedModuleIds) { usedIds.add(id); } } const modules1 = this.modules; for (let indexModule1 = 0; indexModule1 < modules1.length; indexModule1++) { const module1 = modules1[indexModule1]; if (module1.id !== null) { usedIds.add(module1.id); } } if (usedIds.size > 0) { let usedIdMax = -1; for (const usedIdKey of usedIds) { if (typeof usedIdKey !== "number") { continue; } usedIdMax = Math.max(usedIdMax, usedIdKey); } let lengthFreeModules = (nextFreeModuleId = usedIdMax + 1); while (lengthFreeModules--) { if (!usedIds.has(lengthFreeModules)) { unusedIds.push(lengthFreeModules); } } } const modules2 = this.modules; for (let indexModule2 = 0; indexModule2 < modules2.length; indexModule2++) { const module2 = modules2[indexModule2]; if (module2.id === null) { if (unusedIds.length > 0) { module2.id = unusedIds.pop(); } else { module2.id = nextFreeModuleId++; } } } } applyChunkIds() { /** @type {Set<number>} */ const usedIds = new Set(); // Get used ids from usedChunkIds property (i. e. from records) if (this.usedChunkIds) { for (const id of this.usedChunkIds) { if (typeof id !== "number") { continue; } usedIds.add(id); } } // Get used ids from existing chunks const chunks = this.chunks; for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { const chunk = chunks[indexChunk]; const usedIdValue = chunk.id; if (typeof usedIdValue !== "number") { continue; } usedIds.add(usedIdValue); } // Calculate maximum assigned chunk id let nextFreeChunkId = -1; for (const id of usedIds) { nextFreeChunkId = Math.max(nextFreeChunkId, id); } nextFreeChunkId++; // Determine free chunk ids from 0 to maximum /** @type {number[]} */ const unusedIds = []; if (nextFreeChunkId > 0) { let index = nextFreeChunkId; while (index--) { if (!usedIds.has(index)) { unusedIds.push(index); } } } // Assign ids to chunk which has no id for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { const chunk = chunks[indexChunk]; if (chunk.id === null) { if (unusedIds.length > 0) { chunk.id = unusedIds.pop(); } else { chunk.id = nextFreeChunkId++; } } if (!chunk.ids) { chunk.ids = [chunk.id]; } } } sortItemsWithModuleIds() { this.modules.sort(byIdOrIdentifier); const modules = this.modules; for (let indexModule = 0; indexModule < modules.length; indexModule++) { modules[indexModule].sortItems(false); } const chunks = this.chunks; for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { chunks[indexChunk].sortItems(); } chunks.sort((a, b) => a.compareTo(b)); >>>>>>>
<<<<<<< ======= getName: SplitChunksPlugin.normalizeName({ name: options.name, automaticNameDelimiter: options.automaticNameDelimiter }) || (() => {}), hidePathInfo: options.hidePathInfo || false, >>>>>>> hidePathInfo: options.hidePathInfo || false, <<<<<<< static normalizeCacheGroups({ cacheGroups, name, automaticNameDelimiter }) { ======= static normalizeFallbackCacheGroup( { minSize = undefined, maxSize = undefined, automaticNameDelimiter = undefined }, { minSize: defaultMinSize = undefined, maxSize: defaultMaxSize = undefined, automaticNameDelimiter: defaultAutomaticNameDelimiter = undefined } ) { return { minSize: typeof minSize === "number" ? minSize : defaultMinSize || 0, maxSize: typeof maxSize === "number" ? maxSize : defaultMaxSize || 0, automaticNameDelimiter: automaticNameDelimiter || defaultAutomaticNameDelimiter || "~" }; } static normalizeCacheGroups({ cacheGroups, automaticNameDelimiter }) { >>>>>>> static normalizeFallbackCacheGroup( { minSize = undefined, maxSize = undefined, automaticNameDelimiter = undefined }, { minSize: defaultMinSize = undefined, maxSize: defaultMaxSize = undefined, automaticNameDelimiter: defaultAutomaticNameDelimiter = undefined } ) { return { minSize: typeof minSize === "number" ? minSize : defaultMinSize || 0, maxSize: typeof maxSize === "number" ? maxSize : defaultMaxSize || 0, automaticNameDelimiter: automaticNameDelimiter || defaultAutomaticNameDelimiter || "~" }; } static normalizeCacheGroups({ cacheGroups, name, automaticNameDelimiter }) {
<<<<<<< callback(new Error("File \"" + request + "\" parsing failed: " + e), extraResults); ======= callback(new Error("File \"" + filenameWithLoaders + "\" parsing failed: " + e.stack), extraResults); >>>>>>> callback(new Error("File \"" + request + "\" parsing failed: " + e.stack), extraResults);