You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/21 20:29:42 UTC

[GitHub] [apisix-website] barchielAbyss opened a new pull request, #1109: chore: add jest. add project vscode recommendation.

barchielAbyss opened a new pull request, #1109:
URL: https://github.com/apache/apisix-website/pull/1109

   ## Styles: 
   @SkyeYoung 
   abort :
   > commit HASH `a2b86a5f3cbb6482118d6ea9543fbad56963f1b7`
   > commit PR [fix: remove error page](https://github.com/apache/apisix-website/pull/1092)
   
   filePath: `apisix-website/website/src/components/HeroCanvas.tsx`
   remove raw-loader package, change 2 `es module` export Object
   
   ```ts
   interface HeroCanvas {
       fragment: string
       vertex: string
   }
   ```
   
   ## Changes:
   1. added the test framework `jest`, and git push auto check
   2. added project VsCode recommendation config
   
   
   ## WantChange:
   @SkyeYoung I think use `shell` run githook is not good, can i write in `package.json` like this?
   
   ```json
   // package.json
   ...
   "script": {
      "lint:eslint": "eslint --fix"
   },
    "husky": {
       "hooks": {
         "pre-commit": "lint-staged",
         "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
       }
     },
   ...
   ```
   
   ```
   // lint-staged.config
   
   module.exports = {
     '*.{js,ts}': ['yarn lint:eslint', 'yarn test'],
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] netlify[bot] commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
netlify[bot] commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133764204

   ### <span aria-hidden="true">👷</span> Deploy Preview for *apache-apisix* processing.
   
   
   |  Name | Link |
   |---------------------------------|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | 973e4da6210a220fe40cd54965d667ab759831ff |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/sites/apache-apisix/deploys/62894bb56d1425000808c8c1 |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] SkyeYoung commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133789805

   Sorry, I need to point out some problems.
   
   Before you do something, please consider as much as possible whether we really need these improvements, and if you don't know, please create a proposal.
   
   For example, do we really need a configuration for vscode? Does your configuration work for everyone? I think the answer is obviously no.
   
   For example, does the addition of jest make sense? Does it cover all use cases that need to be tested?
   
   There are other problems that I don't want to enumerate.
   
   Also, I recommend doing one thing per PR, not everything.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] barchielAbyss commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
barchielAbyss commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133816229

   > Sorry, I need to point out some problems.
   > 
   > Before you do something, please consider as much as possible whether we really need these improvements, and if you don't know, please create a proposal.
   > 
   > For example, do we really need a configuration for vscode? Does your configuration work for everyone? I think the answer is obviously no.
   > 
   > For example, does the addition of jest make sense? Does it cover all use cases that need to be tested?
   > 
   > There are other problems that I don't want to enumerate.
   > 
   > Also, I recommend doing one thing per PR, not everything.
   
   I understand your concern about why the `vscode` folder needs to be uploaded. It is because everyone may modify the code of this project, so you should provide a basic configuration of the vscode for this project, which may increase Your code review work, see if anyone has modified this file, but the advantage of this is that everyone will have a default configuration in the project's workspace, which can greatly reduce their configuration of this project time


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] SkyeYoung commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133791211

   I know you put a lot of effort and time into this PR, but I feel like I should have pointed out your mistakes earlier and you should have realized the importance of communicating with the community.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] juzhiyuan commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133810485

   Hi @barchielAbyss, as @SkyeYoung said:
   
   1. We should submit proposals to explain why we need this new feature and how to implement it before submitting PRs, or this project will lose control and become a hodgepodge.
   2. If most people like your proposal and say "Yes", you could start contributing codes, but you need one PR to do one Thing.
   
   > added the test framework jest
   
   I'm not clear why we need Jest to test pages 😂 This is more like a "Marketing" project than an "Application" project.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] barchielAbyss commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
barchielAbyss commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133816745

   > > > I think use shell run githook is not good, can i write in package.json like this?
   > > 
   > > 
   > > All transactions will eventually run as a shell after parsing.
   > > If I remember correctly, so why is it _not good_? We don't have to rewrite everything in JS.
   > 
   > We may need many stages of checks, such as `pre-commit`, `commit-msg`, if different files are required to maintain it with shell commands, the check stage is likely to be added according to certain conditions, so that the new file There will be more and more. If it is your design idea to maintain the stage through files, I think it is feasible, but I recommend only changing the rules of the content of the checked files, rather than adding new files to add process configuration.
   
   If you care about file matching rules, you can configure them like this:
   
   ```
   // lint-staged.config
   
   module.exports = {
     '*': ['yarn lint:eslint'],
     '*.{js,ts}': ['yarn test'],
   }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] SkyeYoung commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133818022

   Let's divide these discussions into several issues:
   
   1. #1110
   2. #1111


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] github-actions[bot] commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133766175

   <!-- NETLIFY DEPLOY COMMENT GENERATED BY ACTIONS_NETLIFY - APP ID SHA256: 4a1e2936f4b00e970c8b5babdfe5b33e6e83e97b6f6d6dda75b1fe8399056321 -->
   🚀 Deployed on https://62894ecda700c15130e7fe26--apache-apisix.netlify.app


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] barchielAbyss closed pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
barchielAbyss closed pull request #1109: chore: add jest. add project vscode recommendation. 
URL: https://github.com/apache/apisix-website/pull/1109


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] barchielAbyss commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
barchielAbyss commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133814629

   > > remove raw-loader package, change 2 es module export Object
   > 
   > I also want to remove rawloader, but I don't think it should be done this way.
   > 
   > We should configure webpack5 directly, this is a capability that docusaurus has not provided so far.
   > 
   > I'm making some efforts to make our dependency on docusaurus as little as possible. But it's a step-by-step process, not removing configurations that we can't handle at the moment
   
   yep, but
   
   > docusaurus
   
   emm, docusaurus can configure it,  maybe u can see [there](https://github.com/algolia/docsearch-website/blob/master/plugins/my-loaders/index.js),
   
   and `docusaurus.config.js` add
   ```
   plugins: ['your-plugins']
   ```
   
   seted webpack5 after,  will corrects typescript checks,
   
   I try 2 add, but it is not work
   ```
   // typings/index.d.ts
   
   declare module '*.txt' {
     const content: string;
     export default content;
   }
   
   declare module '*.vert' {
     const content: string;
     export default content;
   }
   
   declare module '*.frag' {
     const content: string;
     export default content;
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] barchielAbyss commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
barchielAbyss commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133816405

   > Hi @barchielAbyss, as @SkyeYoung said:
   > 
   > 1. We should submit proposals to explain why we need this new feature and how to implement it before submitting PRs, or this project will lose control and become a hodgepodge.
   > 2. If most people like your proposal and say "Yes", you could start contributing codes, but you need one PR to do one Thing.
   > 
   > > added the test framework jest
   > 
   > I'm not clear why we need Jest to test pages 😂 This is more like a "Marketing" project than an "Application" project.
   
   When I write any script, I have the habit of writing test cases first, if you think it is not applicable in this project, I can delete it first 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] SkyeYoung commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133790878

   > remove raw-loader package, change 2 es module export Object
   
   I also want to remove rawloader, but I don't think it should be done this way.
   
   We should configure webpack5 directly, this is a capability that docusaurus has not provided so far.
   
   I'm making some efforts to make our dependency on docusaurus as little as possible. But it's a step-by-step process, not removing configurations that we can't handle at the moment


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] juzhiyuan commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133810608

   > For example, do we really need a configuration for vscode? Does your configuration work for everyone? I think the answer is obviously no.
   
   For VSCode, I tend to maintain a VSCode configuration file, as I use VSCode, and I know some active contributors also use VSCode. It will not work for everyone but work for most :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] SkyeYoung commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133790370

   > I think use shell run githook is not good, can i write in package.json like this?
   
   All transactions will eventually run as a shell after parsing.
   
   If I remember correctly, so why is it _not good_? We don't have to rewrite everything in JS.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] barchielAbyss commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
barchielAbyss commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133815882

   > > I think use shell run githook is not good, can i write in package.json like this?
   > 
   > All transactions will eventually run as a shell after parsing.
   > 
   > If I remember correctly, so why is it _not good_? We don't have to rewrite everything in JS.
   
   We may need many stages of checks, such as `pre-commit`, `commit-msg`, if different files are required to maintain it with shell commands, the check stage is likely to be added according to certain conditions, so that the new file There will be more and more. If it is your design idea to maintain the stage through files, I think it is feasible, but I recommend only changing the rules of the content of the checked files, rather than adding new files to add process configuration.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-website] barchielAbyss commented on pull request #1109: chore: add jest. add project vscode recommendation.

Posted by GitBox <gi...@apache.org>.
barchielAbyss commented on PR #1109:
URL: https://github.com/apache/apisix-website/pull/1109#issuecomment-1133818227

   > [Site][Discussion]: remove raw-loader #1111
   
   I like the way you work


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org