mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 05:36:17 -08:00
fix(ci): patch nx-electron package metadata copy
Entire-Checkpoint: f957cd9849e0
This commit is contained in:
1 parent
ef12bf41b2
commit
8bd48f5dc4
4 files changed
+40
-2
No files matched your search
@@ -1,10 +1,12 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs';
|
||||
import { createRequire } from 'node:module';
|
||||
import { dirname, join } from 'node:path';
|
||||
import test from 'node:test';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const currentDir = dirname(fileURLToPath(import.meta.url));
|
||||
const require = createRequire(import.meta.url);
|
||||
const electronBuilderConfig = JSON.parse(
|
||||
fs.readFileSync(
|
||||
join(currentDir, '..', '..', 'electron-builder.json'),
|
||||
@@ -22,3 +24,19 @@ test('Linux package identity does not expose the internal Electron backend proje
|
||||
'iptvnator'
|
||||
);
|
||||
});
|
||||
|
||||
test('nx-electron packaging does not copy duplicate root package metadata', () => {
|
||||
const nxElectronExecutorPath = require.resolve(
|
||||
'nx-electron/src/executors/package/executor.js'
|
||||
);
|
||||
const nxElectronExecutor = fs.readFileSync(
|
||||
nxElectronExecutorPath,
|
||||
'utf8'
|
||||
);
|
||||
|
||||
assert.doesNotMatch(nxElectronExecutor, /['"]\.\/package\.json['"]/);
|
||||
assert.match(
|
||||
nxElectronExecutor,
|
||||
/filter:\s*\[['"]index\.js['"],\s*['"]package\.json['"]\]/
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user