mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-07 08:55:33 +02:00
fix: update version to 1.11.13 in package.json and improve regex for file types in license-check.ts
Some checks failed
CI / general (push) Has been cancelled
Some checks failed
CI / general (push) Has been cancelled
This commit is contained in:
parent
f652589c77
commit
fafc5b8db7
3 changed files with 11 additions and 6 deletions
|
@ -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": {
|
||||
|
|
|
@ -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<boolean> {
|
|||
(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 {
|
||||
|
|
|
@ -267,7 +267,7 @@ export async function apply(name: string): Promise<void> {
|
|||
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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue