mirror of
https://github.com/balena-io/etcher.git
synced 2025-11-10 10:58:32 +00:00
Compare commits
3 Commits
electron-f
...
kyle/patch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b63fbed03 | ||
|
|
e969735955 | ||
|
|
45bb29a393 |
6
.github/workflows/flowzone.yml
vendored
6
.github/workflows/flowzone.yml
vendored
@@ -1,5 +1,4 @@
|
|||||||
name: Flowzone
|
name: Flowzone
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, closed]
|
types: [opened, synchronize, closed]
|
||||||
@@ -8,7 +7,6 @@ on:
|
|||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, synchronize, closed]
|
types: [opened, synchronize, closed]
|
||||||
branches: [main, master]
|
branches: [main, master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
flowzone:
|
flowzone:
|
||||||
name: Flowzone
|
name: Flowzone
|
||||||
@@ -23,8 +21,4 @@ jobs:
|
|||||||
tests_run_on: '["ubuntu-20.04","macos-latest","windows-2019"]'
|
tests_run_on: '["ubuntu-20.04","macos-latest","windows-2019"]'
|
||||||
restrict_custom_actions: false
|
restrict_custom_actions: false
|
||||||
github_prerelease: true
|
github_prerelease: true
|
||||||
repo_config: true
|
|
||||||
repo_description: "Flash OS images to SD cards & USB drives, safely and easily."
|
|
||||||
repo_homepage: https://etcher.io/
|
|
||||||
repo_enable_wiki: true
|
|
||||||
cloudflare_website: "etcher"
|
cloudflare_website: "etcher"
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
|
- commits:
|
||||||
|
- subject: "patch: upgrade to electron 25"
|
||||||
|
hash: f38bca290fe26121bed58d1131265e1aa350ddb5
|
||||||
|
body: ""
|
||||||
|
footer: {}
|
||||||
|
author: Edwin Joassart
|
||||||
|
nested: []
|
||||||
|
- subject: "patch: refactor scanner, loader and flasher out of gui + upgrade to
|
||||||
|
electron 25"
|
||||||
|
hash: fb8ed5b529e22bc9e766bfe99c2b6955ed695b58
|
||||||
|
body: ""
|
||||||
|
footer: {}
|
||||||
|
author: Edwin Joassart
|
||||||
|
nested: []
|
||||||
|
version: 1.18.13
|
||||||
|
title: ""
|
||||||
|
date: 2023-10-16T13:32:26.738Z
|
||||||
- commits:
|
- commits:
|
||||||
- subject: Update instructions for installing deb file
|
- subject: Update instructions for installing deb file
|
||||||
hash: acab03ad77a1c1901d0c8a65999e93c1d27169a0
|
hash: acab03ad77a1c1901d0c8a65999e93c1d27169a0
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
# v1.18.13
|
||||||
|
## (2023-10-16)
|
||||||
|
|
||||||
|
* patch: upgrade to electron 25 [Edwin Joassart]
|
||||||
|
* patch: refactor scanner, loader and flasher out of gui + upgrade to electron 25 [Edwin Joassart]
|
||||||
|
|
||||||
# v1.18.12
|
# v1.18.12
|
||||||
## (2023-07-19)
|
## (2023-07-19)
|
||||||
|
|
||||||
|
|||||||
4
npm-shrinkwrap.json
generated
4
npm-shrinkwrap.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "balena-etcher",
|
"name": "balena-etcher",
|
||||||
"version": "1.18.12",
|
"version": "1.18.13",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "balena-etcher",
|
"name": "balena-etcher",
|
||||||
"version": "1.18.12",
|
"version": "1.18.13",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "balena-etcher",
|
"name": "balena-etcher",
|
||||||
"private": true,
|
"private": true,
|
||||||
"displayName": "balenaEtcher",
|
"displayName": "balenaEtcher",
|
||||||
"version": "1.18.12",
|
"version": "1.18.13",
|
||||||
"packageType": "local",
|
"packageType": "local",
|
||||||
"main": "generated/etcher.js",
|
"main": "generated/etcher.js",
|
||||||
"description": "Flash OS images to SD cards and USB drives, safely and easily.",
|
"description": "Flash OS images to SD cards and USB drives, safely and easily.",
|
||||||
@@ -130,6 +130,6 @@
|
|||||||
"node": ">=18 <20"
|
"node": ">=18 <20"
|
||||||
},
|
},
|
||||||
"versionist": {
|
"versionist": {
|
||||||
"publishedAt": "2023-07-19T10:24:23.055Z"
|
"publishedAt": "2023-10-16T13:32:27.552Z"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,15 @@
|
|||||||
import * as CopyPlugin from 'copy-webpack-plugin';
|
import * as CopyPlugin from 'copy-webpack-plugin';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
import * as SimpleProgressWebpackPlugin from 'simple-progress-webpack-plugin';
|
||||||
import * as TerserPlugin from 'terser-webpack-plugin';
|
import * as TerserPlugin from 'terser-webpack-plugin';
|
||||||
|
import {
|
||||||
|
BannerPlugin,
|
||||||
|
IgnorePlugin,
|
||||||
|
NormalModuleReplacementPlugin,
|
||||||
|
} from 'webpack';
|
||||||
|
import * as PnpWebpackPlugin from 'pnp-webpack-plugin';
|
||||||
|
|
||||||
import * as tsconfigRaw from './tsconfig.webpack.json';
|
import * as tsconfigRaw from './tsconfig.webpack.json';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,6 +44,37 @@ function externalPackageJson(packageJsonPath: string) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renameNodeModules(resourcePath: string) {
|
||||||
|
// electron-builder excludes the node_modules folder even if you specifically include it
|
||||||
|
// Work around by renaming it to "modules"
|
||||||
|
// See https://github.com/electron-userland/electron-builder/issues/4545
|
||||||
|
return (
|
||||||
|
path
|
||||||
|
.relative(__dirname, resourcePath)
|
||||||
|
.replace('node_modules', 'modules')
|
||||||
|
// file-loader expects posix paths, even on Windows
|
||||||
|
.replace(/\\/g, '/')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ReplacementRule {
|
||||||
|
search: string;
|
||||||
|
replace: string | (() => string);
|
||||||
|
}
|
||||||
|
|
||||||
|
function slashOrAntislash(pattern: RegExp): RegExp {
|
||||||
|
return new RegExp(pattern.source.replace(/\\\//g, '(\\/|\\\\)'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function replace(test: RegExp, ...replacements: ReplacementRule[]) {
|
||||||
|
return {
|
||||||
|
loader: 'string-replace-loader',
|
||||||
|
// Handle windows path separators
|
||||||
|
test: slashOrAntislash(test),
|
||||||
|
options: { multiple: replacements.map((r) => ({ ...r, strict: true })) },
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const commonConfig = {
|
const commonConfig = {
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
optimization: {
|
optimization: {
|
||||||
@@ -65,6 +104,7 @@ const commonConfig = {
|
|||||||
{
|
{
|
||||||
test: /\.(woff|woff2|eot|ttf|otf)$/,
|
test: /\.(woff|woff2|eot|ttf|otf)$/,
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
|
options: { name: renameNodeModules },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.svg$/,
|
test: /\.svg$/,
|
||||||
@@ -83,11 +123,44 @@ const commonConfig = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
// don't import WeakMap polyfill in deep-map-keys (required in corvus)
|
||||||
|
replace(/node_modules\/deep-map-keys\/lib\/deep-map-keys\.js$/, {
|
||||||
|
search: "var WeakMap = require('es6-weak-map');",
|
||||||
|
replace: '',
|
||||||
|
}),
|
||||||
|
// force axios to use http backend (not xhr) to support streams
|
||||||
|
replace(/node_modules\/axios\/lib\/defaults\.js$/, {
|
||||||
|
search: './adapters/xhr',
|
||||||
|
replace: './adapters/http',
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.js', '.json', '.ts', '.tsx'],
|
extensions: ['.js', '.json', '.ts', '.tsx'],
|
||||||
},
|
},
|
||||||
|
plugins: [
|
||||||
|
PnpWebpackPlugin,
|
||||||
|
new SimpleProgressWebpackPlugin({
|
||||||
|
format: process.env.WEBPACK_PROGRESS || 'verbose',
|
||||||
|
}),
|
||||||
|
// Force axios to use http.js, not xhr.js as we need stream support
|
||||||
|
// (its package.json file replaces http with xhr for browser targets).
|
||||||
|
new NormalModuleReplacementPlugin(
|
||||||
|
slashOrAntislash(/node_modules\/axios\/lib\/adapters\/xhr\.js/),
|
||||||
|
'./http.js',
|
||||||
|
),
|
||||||
|
// Ignore `aws-crt` which is a dependency of (ultimately) `aws4-axios` which is used
|
||||||
|
// by etcher-sdk and does a runtime check to its availability. We’re not currently
|
||||||
|
// using the “assume role” functionality (AFAIU) of aws4-axios and we don’t care that
|
||||||
|
// it’s not found, so force webpack to ignore the import.
|
||||||
|
// See https://github.com/aws/aws-sdk-js-v3/issues/3025
|
||||||
|
new IgnorePlugin({
|
||||||
|
resourceRegExp: /^aws-crt$/,
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
resolveLoader: {
|
||||||
|
plugins: [PnpWebpackPlugin.moduleLoader(module)],
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'generated'),
|
path: path.join(__dirname, 'generated'),
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
@@ -109,6 +182,7 @@ const guiConfig = {
|
|||||||
gui: path.join(__dirname, 'lib', 'gui', 'app', 'renderer.ts'),
|
gui: path.join(__dirname, 'lib', 'gui', 'app', 'renderer.ts'),
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
...commonConfig.plugins,
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
patterns: [
|
patterns: [
|
||||||
{ from: 'lib/gui/app/index.html', to: 'index.html' },
|
{ from: 'lib/gui/app/index.html', to: 'index.html' },
|
||||||
@@ -117,6 +191,11 @@ const guiConfig = {
|
|||||||
{ from: 'assets/icon.png', to: 'media/icon.png' },
|
{ from: 'assets/icon.png', to: 'media/icon.png' },
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
// Remove "Download the React DevTools for a better development experience" message
|
||||||
|
new BannerPlugin({
|
||||||
|
banner: '__REACT_DEVTOOLS_GLOBAL_HOOK__ = { isDisabled: true };',
|
||||||
|
raw: true,
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user