Skip to content

Commit

Permalink
feat(airbyte-ci): format: pick up .prettierc and .prettierignore (#46274
Browse files Browse the repository at this point in the history
)
  • Loading branch information
natikgadzhi authored Sep 30, 2024
1 parent 94fd65e commit cff3211
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output
airbyte-ci/connectors/pipelines/tests/test_changelog/result_files
airbyte-integrations/bases/connector-acceptance-test/unit_tests/data/docs

# Ignore manifest files in manifest-only connectors
# This is done due to prettier being overly opinionated on the formatting of quotes
# Ref: https://github.com/prettier/prettier/issues/973
# And it not allowing rule opt outs
# Ref: https://github.com/prettier/prettier/discussions/13925
# Instead we rely on the contribution service to format these files
# See: https://github.com/airbytehq/airbyte/blob/master/CONTRIBUTING.md#adding-a-new-connector
airbyte-integrations/connectors/*/manifest.yaml
1 change: 1 addition & 0 deletions airbyte-ci/connectors/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@ airbyte-ci connectors --language=low-code migrate-to-manifest-only

| Version | PR | Description |
| ------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| 4.36.1 | | `airbyte-ci format js` respects `.prettierc` and `.prettierignore` |
| 4.36.0 | [#44877](https://github.com/airbytehq/airbyte/pull/44877) | Implement `--promote/rollback-release-candidate` in `connectors publish`. |
| 4.35.6 | [#45632](https://github.com/airbytehq/airbyte/pull/45632) | Add entry to format file ignore list (`destination-*/expected-spec.json`) |
| 4.35.5 | [#45672](https://github.com/airbytehq/airbyte/pull/45672) | Fix docs mount during publish |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ class Formatter(Enum):
],
Formatter.PYTHON: ["pyproject.toml", "poetry.lock"],
Formatter.LICENSE: [LICENSE_FILE_NAME],
Formatter.JS: [".prettierrc", ".prettierignore"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def format_js_container(dagger_client: dagger.Client, js_code: dagger.Directory,
return build_container(
dagger_client,
base_image=NODE_IMAGE,
warmup_dir=warmup_directory(dagger_client, Formatter.JS),
dir_to_format=js_code,
install_commands=[f"npm install -g [email protected] prettier@{prettier_version}"],
cache_volume=dagger_client.cache_volume(cache_keys.get_prettier_cache_key(prettier_version)),
Expand Down
2 changes: 1 addition & 1 deletion airbyte-ci/connectors/pipelines/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pipelines"
version = "4.36.0"
version = "4.36.1"
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
authors = ["Airbyte <[email protected]>"]

Expand Down

0 comments on commit cff3211

Please sign in to comment.