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

Refactor create-app dotfile generation #31

Merged
merged 4 commits into from
Feb 7, 2024

Conversation

tzyl
Copy link
Contributor

@tzyl tzyl commented Feb 5, 2024

  • Match repo structure with test file next to source file
  • Extract TemplateContext type to make it clearer what variables are available during templating
  • Refactor .npmrc / .env file generation with unit test coverage

The .npmrc / .env files are shared across all templates but could technically be in the individual template folders. For now I've kept the structure the same as before

@tzyl tzyl requested a review from zeyadkhaled February 5, 2024 11:42
@changelog-app
Copy link

changelog-app bot commented Feb 5, 2024

Generate changelog in packages/create-app/changelog/@unreleased

What do the change types mean?
  • feature: A new feature of the service.
  • improvement: An incremental improvement in the functionality or operation of the service.
  • fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way.
  • break: Has the potential to break consumers of this service's API, inclusive of both Palantir services
    and external consumers of the service's API (e.g. customer-written software or integrations).
  • deprecation: Advertises the intention to remove service functionality without any change to the
    operation of the service itself.
  • manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration,
    performing database surgery, ...) at the time of upgrade for it to succeed.
  • migration: A fully automatic upgrade migration task with no engineer input required.

Note: only one type should be chosen.

How are new versions calculated?
  • ❗The break and manual task changelog types will result in a major release!
  • 🐛 The fix changelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease.
  • ✨ All others will result in a minor version release.

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Refactor create-app dotfile generation and add unit tests

Check the box to generate changelog(s)

  • Generate changelog entry

osdkPackage: string;
osdkRegistryUrl: string;
}): string {
const withoutProtocol = osdkRegistryUrl.replace(/^https:\/\//, "");
Copy link
Member

Choose a reason for hiding this comment

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

I guess this is safe given promptOsdkRegistryUrl already tests it against a regex. If we plan to use this somewhere that isn't part of this code path, should we consider passing the protocol but have it with a default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the only other protocol that would be relevant would be http but should be safe to only allow https for this url

@bulldozer-bot bulldozer-bot bot merged commit 0c08899 into main Feb 7, 2024
6 checks passed
@bulldozer-bot bulldozer-bot bot deleted the tl/refactor-generate-dotfiles branch February 7, 2024 10:05
ericanderson added a commit that referenced this pull request Feb 13, 2024
* origin/main:
  Autorelease
  Increase CLI max width to 150 columns (#47)
  Debug log site zip stats (#49)
  Clean up yargs and consola imports (#51)
  Autorelease
  Add generated changelog entries
  Breaking: force dollar sign in osdk verbs for where
  Display errors more consistently in @osdk/cli (#41)
  Fix tagPrefix
  Add generated changelog entries
  Create foundry.config.json in create-app
  [3/] Improvement: Use loadedToken for fetching data (#17)
  Move argv override logging to middleware (#42)
  Make sure to run all tests (#39)
  Update create-app to use FOUNDRY_TOKEN in templates (#40)
  Add generated changelog entries
  Fix intellisense for aggregations and fill in more number types
  [2/] Improvement: Introduce new command structure  (#16)
  Autorelease
  Refactor create-app prompts with tests (#32)
  Refactor create-app dotfile generation (#31)
  add changelog
  Add generated changelog entries
  Add generated changelog entries
  put mkdir in right place
  remove generated files
  add ignore for legacy client
  remove deleted file
  added
  add back mkdir
  move mkdir
  fix
  fixes
  keep trying
  remove module
  shared testing infra for legacy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants