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

feat(manager): add devbox manager module #33638

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

burritobill
Copy link
Contributor

Changes

This PR adds the devbox manager, https://www.jetify.com/devbox. Devbox is a local development tool which creates local reproducible environments without docker containers.

Context

This PR is related to #30002
where I was asked to split that PR into one for the versioning, datasource and manager.

I am making these changes on behalf of Culture Amp as we are using renovate internally and have recently migrated to using devbox for our local developer environments.
This PR will ensure that all of our devbox.json files stay up to date with the rest of our repos.

#27543

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@burritobill burritobill marked this pull request as draft January 16, 2025 11:10
@burritobill burritobill marked this pull request as ready for review January 16, 2025 11:37
rarkins
rarkins previously approved these changes Jan 16, 2025
@rarkins rarkins requested review from viceice and secustor January 16, 2025 12:40
lib/modules/manager/devbox/index.ts Outdated Show resolved Hide resolved
lib/modules/manager/devbox/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/devbox/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/devbox/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/devbox/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/devbox/extract.ts Outdated Show resolved Hide resolved
};

let cmd = '';
if (updateConfig.config.isLockFileMaintenance) {
Copy link
Member

Choose a reason for hiding this comment

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

you need an additional check

const isLockFileMaintenance = config.updateType === 'lockFileMaintenance';
if (is.emptyArray(updatedDeps) && !isLockFileMaintenance) {
logger.debug('No updated bun deps - returning null');
return null;
}

Copy link
Member

Choose a reason for hiding this comment

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

☝️ ❓ There are edge cases where config.isLockFileMaintenance === false but config.updateType === 'lockFileMaintenance'

lib/modules/manager/devbox/artifacts.ts Outdated Show resolved Hide resolved
};

let cmd = '';
if (updateConfig.config.isLockFileMaintenance) {
Copy link
Member

Choose a reason for hiding this comment

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

☝️ ❓ There are edge cases where config.isLockFileMaintenance === false but config.updateType === 'lockFileMaintenance'

datasource: 'devbox',
depName: 'nodejs',
packageName: 'nodejs',
skipReason: 'invalid-version',
Copy link
Member

Choose a reason for hiding this comment

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

why is this invalid?

return { deps };
}

return null;
Copy link
Member

Choose a reason for hiding this comment

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

missing coverage

}),
);

export type DevboxFile = z.infer<typeof DevboxFile>;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export type DevboxFile = z.infer<typeof DevboxFile>;

unused

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.

3 participants