Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clone sfdx-project.json deps to avoid writing back to the file #117

Merged
merged 7 commits into from
Nov 9, 2022

Conversation

WillieRuemmele
Copy link
Member

@WillieRuemmele WillieRuemmele commented Nov 1, 2022

@W-11935313@
forcedotcom/cli#1764

fixes dependencies being written as subscriberPackageVersionId: XXX

  1. in dreamhouse, create a package from force-app (main)
  2. create another package with an empty default class pkg/classes/newClass.cls (dep)
  3. create a dep package version
  4. add
      "dependencies": [
        {
          "package": "[email protected]"
        }
      ]

to your main package entry
5. create a new package version of main


@W-11927980@
forcedotcom/cli#1743

  1. clone the fork
  2. remove the DreamhouseLWC in the package aliases section
  3. create a package
  4. create a new package version with beta commands
  5. profit.

@@ -368,7 +368,8 @@ export class PackageVersionCreate {

// All dependencies for the packaging dir should be resolved to an 04t id to be passed to the server.
// (see _retrieveSubscriberPackageVersionId for details)
const dependencies = packageDescriptorJson.dependencies;
// can be changed to structuredClone once node18 is the minimum version
const dependencies = JSON.parse(JSON.stringify(packageDescriptorJson.dependencies)) as PackageDirDependency[];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WillieRuemmele could use kit#cloneJson

@WillieRuemmele WillieRuemmele changed the title fix: clonse sfdx-project.json deps to avoid writing back to the file fix: clone sfdx-project.json deps to avoid writing back to the file Nov 8, 2022
@peternhale peternhale merged commit 87334b2 into main Nov 9, 2022
@peternhale peternhale deleted the wr/packageDependencies branch November 9, 2022 19:42
tshopshireSalesforce pushed a commit to tshopshireSalesforce/packaging that referenced this pull request Jan 24, 2023
…orcedotcom#117)

* fix: clonse sfdx-project.json deps to avoid writing back to the file

* chore: node 16 way of copying

* chore: change to cloneJson from kit

* chore: guard against no deps when cloning

* fix: clone entry to include unpackagedMetadata entry, add UT

* chore: clone at top level only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants