From b6a889051fb87ac4b4158f368306d5a9b7e359d0 Mon Sep 17 00:00:00 2001 From: Andrii Bodnar Date: Fri, 5 Jul 2024 10:04:35 +0300 Subject: [PATCH] chore: improve readme and ci (#42) --- .github/workflows/ci.yml | 3 +++ LICENSE | 2 +- README.md | 15 +++++++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 281282f..058097d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,9 @@ on: push: branches: - "main" + pull_request: + branches: + - "*" jobs: build_and_testing: diff --git a/LICENSE b/LICENSE index 0f4081a..5b06c3e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2017 Tomáš Ehrlich +Copyright (c) 2017-2022 Tomáš Ehrlich, (c) 2022-present Crowdin. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 1459105..d3c29d2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ - This repository contains a collection of codemod scripts for use with [JSCodeshift](https://github.com/facebook/jscodeshift) that help update Lingui APIs.
@@ -20,11 +19,9 @@ This repository contains a collection of codemod scripts for use with [JSCodeshi - `transform` - name of transform, see available transforms below. - `path` - files or directory to transform - use the `--dry` option for a dry-run -- use `--print` to print the output for - comparison +- use `--print` to print the output for comparison - use `--remove-unused-imports` to remove unused imports once finished the codemod - This will start an interactive wizard, and then run the specified transform. ### Included Transforms @@ -37,6 +34,16 @@ Converts some outdated standards from `lingui` version 2.x.x to new features and npx @lingui/codemods v2-to-v3 ``` +#### `split-macro-imports` + +Converts `@lingui/macro` imports to `@lingui/core/macro` and `@lingui/react/macro`. + +```sh +npx @lingui/codemods split-macro-imports +``` + +Visit the [Migration guide from 4.x to 5.x](https://lingui.dev/introduction) for more information. + ### jscodeshift options To pass more options directly to jscodeshift, use `--jscodeshift="..."`. For example: