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

ファイルの利用方法の案内の整備 #78

Merged
merged 3 commits into from
Apr 24, 2024
Merged

Conversation

Sinhalite
Copy link
Member

@Sinhalite Sinhalite commented Apr 24, 2024

  • セルフホスティングの方法を追記しました
  • UNPKGの運用状況が不明のため、CDNの利用先をjsDelivrに切り替えました
  • npmやCDN利用の場合の表記も整理しました

Summary by CodeRabbit

  • Documentation
    • Updated installation instructions for the microcms-js-sdk package, specifying Node.js version requirements.
    • Added options for browser usage through self-hosting or CDN.
    • Included warnings about hosting services and production recommendations.

Copy link

coderabbitai bot commented Apr 24, 2024

Walkthrough

The recent update enriches the microcms-js-sdk package with enhanced installation guidelines, detailing Node.js version requirements and options for browser usage via self-hosting or CDN. It also incorporates cautions regarding hosting services and production best practices.

Changes

File(s) Change Summary
README.md Updated installation instructions for microcms-js-sdk, added Node.js version requirements, provided browser usage options (self-hosting or CDN), and included warnings about hosting services and production recommendations.

🐇✨
A hop, a skip, in the code we dip,
Changes new, in README flew,
Browsers cheer, Node.js near,
With each line, our code does shine!
🌟📜


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 2ce277b and 3cf2143.
Files selected for processing (1)
  • README.md (2 hunks)
Additional Context Used
LanguageTool (21)
README.md (21)

Near line 1: Possible spelling mistake found.
Context: # microCMS JavaScript SDK It helps you to use mic...


Near line 3: Possible spelling mistake found.
Context: ...CMS JavaScript SDK It helps you to use microCMS from JavaScript and Node.js application...


Near line 13: Possible spelling mistake found.
Context: ...ted ### Install #### Node.js Install npm package. ```bash $ npm install microcm...


Near line 28: Possible spelling mistake found.
Context: ...owser(Self-hosting) Download and unzip microcms-js-sdk-x.y.z.tgz from the [releases page](https...


Near line 28: Possible spelling mistake found.
Context: ...r choice and use it. The target file is ./dist/umd/microcms-js-sdk.js. ```html <script s...


Near line 47: Possible spelling mistake found.
Context: ...g service (unpkg.com) is not related to microCMS. For production use, we recommend self-...


Near line 101: Possible spelling mistake found.
Context: ...(err) => console.error(err)); ``` And, Api corresponding to each content are also ...


Near line 101: This sentence does not start with an uppercase letter.
Context: ...ing to each content are also available. example. ```javascript // Get list API data cl...


Near line 130: This abbreviation for “identification” is spelled all-uppercase.
Context: ....error(err)); ``` #### Get all content ids This function can be used to retrieve ...


Near line 133: Possible spelling mistake found.
Context: ...content IDs only. Since filters and draftKey can also be specified, it is possible ...


Near line 134: Possible spelling mistake found.
Context: ...de content from a specific draft. \ The alternateField property can also be used to address c...


Near line 296: Possible spelling mistake found.
Context: ...cript If you are using TypeScript, use getList, getListDetail, getObject. This in...


Near line 296: Possible spelling mistake found.
Context: ...ou are using TypeScript, use getList, getListDetail, getObject. This internally contains...


Near line 296: Possible spelling mistake found.
Context: ...Script, use getList, getListDetail, getObject. This internally contains a common typ...


Near line 341: Possible spelling mistake found.
Context: ...({ //other }) The type of `getAllContentIds` is as follows. typescript /** * /...


Near line 377: Possible spelling mistake found.
Context: ...t: { body: 'body', }, }); ``` ## CustomRequestInit ### Next.js App Router You can now us...


Near line 381: Possible spelling mistake found.
Context: ...tch option of the Next.js App Router as CustomRequestInit. Please refer to the official Next.js d...


Near line 397: Possible spelling mistake found.
Context: ...}, endpoint: 'endpoint', }); ``` ### AbortController: abort() method You can abort fetch re...


Near line 433: Possible spelling mistake found.
Context: ... apiKey: 'YOUR_API_KEY', }); ``` ### UploadMedia API Media files can be uploaded using ...


Near line 435: Possible spelling mistake found.
Context: ... files can be uploaded using the 'POST /api/v1/media' endpoint of the Management AP...


Near line 500: Possible spelling mistake found.
Context: ...r(err)); ### Type Definition #### UploadMedia typescript type UploadMediaRequest ...

Additional comments not posted (2)
README.md (2)

24-25: Update Node.js version requirements to align with new software dependencies.

Ensure that all documentation and system checks reflect this version requirement to avoid compatibility issues.


38-43: Update CDN links to jsDelivr as per new provider recommendation.

Verify that all links are correctly pointing to jsDelivr and that they are functional.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Sinhalite Sinhalite changed the title ファイルの利用法方の整備 ファイルの利用方法の案内の整備 Apr 24, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Out of diff range and nitpick comments (3)
README.md (3)

Line range hint 101-101: Start sentences with an uppercase letter.

The sentence "And, Api corresponding to each content are also available. example." should start with an uppercase letter for "Api" and "example".

- And, Api corresponding to each content are also available. example.
+ And, API corresponding to each content are also available. Example:

Line range hint 130-130: Use consistent capitalization for abbreviations.

The word "ids" in "Get all content ids" should be capitalized to "IDs" for consistency and to match the common abbreviation style.

- #### Get all content ids
+ #### Get all content IDs

Line range hint 382-382: Add a comma for clarity.

In the sentence "Please refer to the official Next.js documentation as the available options depend on the Next.js Type file.", adding a comma after "documentation" would improve readability.

- Please refer to the official Next.js documentation as the available options depend on the Next.js Type file.
+ Please refer to the official Next.js documentation, as the available options depend on the Next.js Type file.

README.md Outdated
Comment on lines 36 to 43
Please load and use the URL provided by an external provider.

```html
<script src="https://cdn.jsdelivr.net/npm/microcms-js-sdk@3.1.0/dist/umd/microcms-js-sdk.min.js"></script>

or

<script src="https://unpkg.com/microcms-js-sdk@latest/dist/umd/microcms-js-sdk.js"></script>
<script src="https://cdn.jsdelivr.net/npm/microcms-js-sdk/dist/umd/microcms-js-sdk.min.js"></script>
Copy link

Choose a reason for hiding this comment

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

Update CDN links to reflect the new provider.

The documentation section for CDN usage still references unpkg.com in the warning message at lines 46-47, which is inconsistent with the switch to jsDelivr. Update the warning to reflect the new CDN provider or adjust the message to be more generic about third-party hosting risks.

- > The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server.
+ > Be cautious when using third-party hosting services for production. We recommend self-hosting on your own server or using a trusted CDN provider.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
Please load and use the URL provided by an external provider.
```html
<script src="https://cdn.jsdelivr.net/npm/microcms-js-sdk@3.1.0/dist/umd/microcms-js-sdk.min.js"></script>
or
<script src="https://unpkg.com/microcms-js-sdk@latest/dist/umd/microcms-js-sdk.js"></script>
<script src="https://cdn.jsdelivr.net/npm/microcms-js-sdk/dist/umd/microcms-js-sdk.min.js"></script>
Please load and use the URL provided by an external provider.
```html
<script src="https://cdn.jsdelivr.net/npm/microcms-js-sdk@3.1.0/dist/umd/microcms-js-sdk.min.js"></script>
or
<script src="https://cdn.jsdelivr.net/npm/microcms-js-sdk/dist/umd/microcms-js-sdk.min.js"></script>

Be cautious when using third-party hosting services for production. We recommend self-hosting on your own server or using a trusted CDN provider.


</details>
<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->

Copy link
Contributor

@himorishige himorishige left a comment

Choose a reason for hiding this comment

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

対応ありがとうございます!

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Out of diff range and nitpick comments (2)
README.md (2)

Line range hint 101-101: Capitalize the first letter of the sentence for proper grammar.

- And, Api corresponding to each content are also available. example.
+ And, API corresponding to each content are also available. Example:

Line range hint 130-130: Ensure consistent spelling of "IDs" in all uppercase.

- #### Get all content ids
+ #### Get all content IDs

```

> [!WARNING]
> The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server.
Copy link

Choose a reason for hiding this comment

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

Update the warning message to reflect the new CDN provider or make it generic.

- > The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server.
+ > Be cautious when using third-party hosting services for production. We recommend self-hosting on your own server or using a trusted CDN provider.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
> The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server.
> Be cautious when using third-party hosting services for production. We recommend self-hosting on your own server or using a trusted CDN provider.

Copy link
Contributor

@himorishige himorishige left a comment

Choose a reason for hiding this comment

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

対応ありがとうございます!

@himorishige himorishige merged commit 765bc9c into main Apr 24, 2024
2 checks passed
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.

2 participants