diff --git a/package.json b/package.json index 0dc142e..2b869c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zen-browser/surfer", - "version": "1.11.12", + "version": "1.11.13", "description": "Simplifying building firefox forks!", "main": "index.js", "bin": { diff --git a/src/commands/license-check.ts b/src/commands/license-check.ts index 4eb1a28..d865c19 100644 --- a/src/commands/license-check.ts +++ b/src/commands/license-check.ts @@ -11,9 +11,9 @@ import { Task, TaskList } from '../utils/task-list' const ignoredFiles = new RegExp('.*\\.(json|patch|md|jpeg|png|gif|tiff|ico)') const licenseIgnore = new RegExp('(//|#) Ignore license in this file', 'g') const fixableFiles = [ - { regex: new RegExp('.*\\.(j|t)s'), comment: '// ', commentClose: '\n' }, + { regex: new RegExp('.*\\.(mj|j|t)s'), comment: '// ', commentClose: '\n' }, { - regex: new RegExp('.*(\\.inc)?\\.css'), + regex: new RegExp('.*\\.css'), commentOpen: '/*\n', comment: ' * ', commentClose: '\n */', @@ -49,9 +49,14 @@ export async function isValidLicense(path: string): Promise { (lines.includes('the Mozilla Public') && lines.includes('If a copy of the MPL was') && lines.includes('http://mozilla.org/MPL/2.0/')) || - licenseIgnore.test(contents.join('\n')) + licenseIgnore.test(contents.join('\n')) || + (lines.includes('Any copyright is dedicated to the Public') && + lines.includes('https://creativecommons.org/publicdomain')) - return hasLicense + return hasLicense || ( + path.endsWith('.min.js') || + path.endsWith('.min.mjs') + ) } export function createTask(path: string, noFix: boolean): Task { diff --git a/src/commands/patches/branding-patch.ts b/src/commands/patches/branding-patch.ts index afd401f..7d2d3f9 100644 --- a/src/commands/patches/branding-patch.ts +++ b/src/commands/patches/branding-patch.ts @@ -267,7 +267,7 @@ export async function apply(name: string): Promise { ensureEmpty(outputPath) await setupImages(configPath, outputPath) - await setupLocale(outputPath, {...brandingConfig, appId: config.appId}) + await setupLocale(outputPath, { ...brandingConfig, appId: config.appId }) await copyMozFiles(outputPath, brandingConfig) await addOptionalIcons(configPath, outputPath)