Skip to content

Commit

Permalink
Fix packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
bigorn0 committed Jul 1, 2024
1 parent d011ba5 commit c1c214e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
18 changes: 10 additions & 8 deletions lib/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export async function rescopeOfficialPrebuildsFromPackage({ buildMetadata, resco
const toPublish = [];

for (const meta of buildMetadata) {
log(">>>>>>>>>>>> RESCOPE: %O", meta);
if (!rescopeOnlyPrebuilds) {
const modulePkg = await readPackageData(meta.moduleBaseDir);
const newJSONPkg = sanitizeModulePackageJSON({
Expand All @@ -97,19 +98,20 @@ export async function rescopeOfficialPrebuildsFromPackage({ buildMetadata, resco
relocatePrebuilds: false,
});
}
for (const prebuildNpmMeta of meta.prebuildsAsNpmDependencies) {
for (const {moduleBaseDir, modulePkg: modulePkgMeta ,rescopedModuleBaseDir, prebuildsAsNpmDependencies, rescopedModuleName} of meta.prebuildsAsNpmDependencies) {
if (meta.prebuilds_as_npm_packages) {
const modulePkg = await readPackageData(prebuildNpmMeta.moduleBaseDir);
const modulePkg = await readPackageData(moduleBaseDir);
const newJSONPkg = sanitizeModulePackageJSON({
...prebuildNpmMeta,
prebuildsAsNpmDependencies,
rescopedModuleName,
modulePkg,
version: meta.version,
isPrebuild: true,
});

await pack({
srcBaseDir: prebuildNpmMeta.moduleBaseDir,
destBaseDir: prebuildNpmMeta.rescopedModuleBaseDir,
srcBaseDir: moduleBaseDir,
destBaseDir: rescopedModuleBaseDir,
packageJSONData: newJSONPkg.modulePkg,
modulesToPublish: toPublish,
mainFromConfig: meta.prebuildPackageMainEntry,
Expand All @@ -118,9 +120,9 @@ export async function rescopeOfficialPrebuildsFromPackage({ buildMetadata, resco
} else {
if (!meta.to_build) {
await pack({
srcBaseDir: prebuildNpmMeta.moduleBaseDir,
destBaseDir: prebuildNpmMeta.rescopedModuleBaseDir,
packageJSONData: prebuildNpmMeta.modulePkg,
srcBaseDir: moduleBaseDir,
destBaseDir: rescopedModuleBaseDir,
packageJSONData: modulePkgMeta,
modulesToPublish: toPublish,
mainFromConfig: meta?.prebuildPackageMainEntry,
filesFromConfig: meta?.prebuildPackageFiles,
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,23 @@
"version_format": "<electron major version>.<package major>.<arbitrary patch>",
"nativeModules": {
"@parcel/watcher": {
"version": "31.2.20",
"version": "31.2.21",
"napi": true,
"prebuild_install": false,
"prebuilds_as_npm_packages": true,
"prebuilds_scope": "@parcel",
"to_build": false
},
"couchbase": {
"version": "31.4.20",
"version": "31.4.21",
"napi": true,
"prebuild_install": false,
"prebuilds_as_npm_packages": true,
"prebuilds_scope": "@couchbase",
"to_build": false
},
"desktop-trampoline": {
"version": "31.2.20",
"version": "31.2.21",
"napi": false,
"prebuild_install": true,
"prebuilds_as_npm_packages": false,
Expand All @@ -85,28 +85,28 @@
]
},
"kerberos": {
"version": "31.2.20",
"version": "31.2.21",
"napi": true,
"prebuild_install": true,
"prebuilds_as_npm_packages": false,
"to_build": false
},
"kerberos-plugins": {
"version": "31.1.20",
"version": "31.1.21",
"napi": false,
"prebuild_install": true,
"prebuilds_as_npm_packages": false,
"to_build": true
},
"keytar": {
"version": "31.8.20",
"version": "31.8.21",
"napi": true,
"prebuild_install": true,
"prebuilds_as_npm_packages": false,
"to_build": false
},
"krb5": {
"version": "31.0.20",
"version": "31.0.21",
"napi": true,
"prebuild_install": true,
"prebuilds_as_npm_packages": false,
Expand All @@ -125,7 +125,7 @@
}
},
"mongodb-client-encryption": {
"version": "31.2.20",
"version": "31.2.21",
"prebuild_install": true,
"napi": true,
"prebuilds_as_npm_packages": false,
Expand Down
2 changes: 1 addition & 1 deletion studio-natives-modules/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hackolade/studio-native-modules",
"version": "31.0.20",
"version": "31.0.21",
"description": "A virtual package referencing all of the Studio native modules for a specific Electron version",
"keywords": [
"hackolade",
Expand Down

0 comments on commit c1c214e

Please sign in to comment.