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

chore: fix text files using CRLF line endings to use LF #12325

Merged
merged 3 commits into from
May 6, 2021

Conversation

Platonn
Copy link
Contributor

@Platonn Platonn commented May 6, 2021

  • fix text files using CRLF line endings to use LF
  • avoid treating binary files as text ones so to avoid unnecessary changing their line endings, which was the case for me after cloning a fresh repo (or running git add --renormalize . in existing repo):
        modified:   docs/SAP Corporate Contributor License Agreement.pdf
        modified:   docs/assets/spartacus-blue.png
        modified:   projects/storefrontapp/src/assets/icons/icon-128x128.png`
        modified:   projects/storefrontapp/src/assets/icons/icon-144x144.png
        modified:   projects/storefrontapp/src/assets/icons/icon-152x152.png
        modified:   projects/storefrontapp/src/assets/icons/icon-192x192.png
        modified:   projects/storefrontapp/src/assets/icons/icon-384x384.png
        modified:   projects/storefrontapp/src/assets/icons/icon-512x512.png
        modified:   projects/storefrontapp/src/assets/icons/icon-72x72.png
        modified:   projects/storefrontapp/src/assets/icons/icon-96x96.png
        modified:   projects/storefrontapp/src/assets/splash/ipad_splash.png
        modified:   projects/storefrontapp/src/assets/splash/ipadpro1_splash.png
        modified:   projects/storefrontapp/src/assets/splash/ipadpro2_splash.png
        modified:   projects/storefrontapp/src/assets/splash/ipadpro3_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphone5_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphone6_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphoneplus_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphonex_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphonexr_splash.png
        modified:   projects/storefrontapp/src/assets/splash/iphonexsmax_splash.png

Consequences for developers

When it's merged to develop, those 4 files will use LF line endings:

   .github/api-extractor-action/tsconfig.json
   .github/cache-builded-libs/tsconfig.json
   .github/cache-builded-libs/yarn.lock
   NOTICE.txt

Then when someone switches locally from develop to any other old side branch (i.e. old feature or release branch), he/she will get annoying git dirty status in his/her branch for those 4 files. There are 2 options I know how fix it:
a) merge develop to your branch (good for feature branches; no-go for old release branches):

git add --renormalize .
git merge develop
git add --renormalize .

b) or commit those 4 files in your branch

closes #12324

@cypress
Copy link

cypress bot commented May 6, 2021



Test summary

482 0 11 0Flakiness 1


Run details

Project spartacus
Status Passed
Commit f66a988 ℹ️
Started May 6, 2021 11:41 AM
Ended May 6, 2021 11:50 AM
Duration 08:48 💡
OS Linux Ubuntu - 18.04
Browser Electron 87

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/regression/site-context/currency/currency-checkout-page.e2e-spec.ts Flakiness
1 Currency switch - checkout page > checkout page > should change currency in the shipping address url

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2021

Hosting service deployment

❗ Spartacus deployment failed ( ERR Failed to execute command [application deploy] due to: Error: Deploy
Failed. Could not generate environment or presigned URL.
Response code: 500
Message: Could not deploy new application, the limit: 10 for the
tenant: spartacus has been reached
Type: internal_service_error

). Check job logs for details.)

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2021

Public API changes

✔️ Nothing changed in analyzed entry points.

⚠️ Some entry points are currently impossible to analyze.

Read more
  • @spartacus/asm/core - ERROR: "import * as ___ from ___;" is not supported yet for local files.
  • @spartacus/cart/saved-cart/core - ERROR: "import * as ___ from ___;" is not supported yet for local files.
  • @spartacus/core - ERROR: "import * as ___ from ___;" is not supported yet for local files.
  • @spartacus/organization/administration/core - ERROR: "import * as ___ from ___;" is not supported yet for local files.
  • @spartacus/organization/order-approval - ERROR: "import * as ___ from ___;" is not supported yet for local files.
  • @spartacus/product-configurator/rulebased - ERROR: "import * as ___ from ___;" is not supported yet for local files.
  • @spartacus/storefinder/core - ERROR: "import * as ___ from ___;" is not supported yet for local files.
  • @spartacus/storefront - ERROR: The expression contains an import() type, which is not yet supported by API Extractor:
  • @spartacus/user/account/components - ERROR: The expression contains an import() type, which is not yet supported by API Extractor:
  • @spartacus/user/profile/components - ERROR: The expression contains an import() type, which is not yet supported by API Extractor:

💰 How to debug problems?

Read more

Problem with import() type

It happens when type is deduced by TS based on code and at the same time the deduced type is not present in the file.
In this specific case to support api-extractor it's worth to add type declaration explicitly.

Debugging steps:

  • go to the bot action logs
  • find api-extractor logs for broken library
  • check in which file and line the problems exists
  • build the library locally and check content of the file mentioned in logs (look for import()
  • add explicit type to problematic source code
  • build the library once again and verify that the import( is no longer present
  • commit and push the code with defined type

Problem with import * as ___

Api-extractor doesn't support this namespace syntax.
Check if you really need to use namespace in the library. Try to avoid namespaces when possible.

@Platonn Platonn merged commit be597c2 into develop May 6, 2021
@Platonn Platonn deleted the feature/GH-12324 branch May 6, 2021 19:49
@Platonn Platonn temporarily deployed to dev May 6, 2021 19:49 Inactive
marcinkapica added a commit that referenced this pull request May 11, 2021
* develop: (23 commits)
  fix: remove tabbing focus when using mouse (#12349)
  refactor: Revert previous commit: "Remove checkout dependency in user lib." (#12373)
  chore: update e2e cart helper functions (#12368)
  refactor: Remove checkout dependency in user lib.  (#12307)
  chore: Schematics - improve lib utils to support feature name constants (#12238)
  fix: Fix usage of redirectUri config on SSR (#12364)
  test: refactor product configuration e2e cypress helper and test classes (#12352)
  feat: Add new slot for template definition (#12251)
  fix: Check availability of config form before setting focus (#12342)
  chore: Update schematics + run.sh script (#12344)
  Revert "chore: Update the run.sh script to include saved cart as a general feature-lib instead of only b2b (#12332)" (#12343)
  chore: require successful SSR in the epic release checklist (#12337)
  chore: Fix strict mode issues in common entry point (#12312)
  chore: Update the run.sh script to include saved cart as a general feature-lib instead of only b2b (#12332)
  chore: fix text files using CRLF line endings to use LF (#12325)
  fix: Add cart context check for cart bundle and issue component (#12322)
  fix: Re-enable check for applicable cart context (#12296)
  fix: Provide breakpoint service as mandatory dependency (#12310)
  Revert "chore: TMS migration (#12249)" (#12306)
  fix: Configurator menu should not be displayed twice on screen resize (#12250)
  ...
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.

Fix text files using CRLF line endings to use LF
3 participants