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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/api/core/src/api/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ export default async ({
});
packageOpts.quiet = true;

if (packageOpts.all) {
throw new Error('config.forge.packagerConfig.all is not supported by Electron Forge');
}

if (!packageJSON.version && !packageOpts.appVersion) {
// eslint-disable-next-line max-len
warn(interactive, 'Please set "version" or "config.forge.packagerConfig.appVersion" in your application\'s package.json so auto-updates work properly'.yellow);
Expand Down
10 changes: 10 additions & 0 deletions packages/api/core/test/slow/api_spec_slow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,16 @@ describe(`electron-forge API (with installer=${nodeInstaller})`, () => {
await fs.writeJson(path.resolve(dir, 'package.json'), packageJSON);
});

it('throws an error when all is set', async () => {
let packageJSON = await readPackageJSON(dir);
packageJSON.config.forge.packagerConfig.all = true;
await fs.writeJson(path.join(dir, 'package.json'), packageJSON);
await expect(forge.package({ dir })).to.eventually.be.rejectedWith(/packagerConfig\.all is not supported by Electron Forge/);
packageJSON = await readPackageJSON(dir);
delete packageJSON.config.forge.packagerConfig.all;
await fs.writeJson(path.join(dir, 'package.json'), packageJSON);
});

it('can package to outDir without errors', async () => {
const outDir = `${dir}/foo`;

Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载