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

Api refactor #1853

Merged
merged 15 commits into from
Jul 9, 2024
Merged

Api refactor #1853

merged 15 commits into from
Jul 9, 2024

Conversation

bdemann
Copy link
Member

@bdemann bdemann commented Jun 21, 2024

  1. Convert canisters to classes
    1. export default Canister\(\{\n*((.*\n)*)\}\);
    2. export default class {\n$1}
  2. Export queries and updates to decorators
    1. (.*): ((update)|(query))\((\[.*\]),\s*(.*),\s*(\(.*\))\s*=>\s*
    2. @$2($5, $6)\n$1$7
  3. Export async queries and updates to decorators
    1. \s*(.*): ((update)|(query))\((\[.*\]),\s*(.*),\s*\sasync\s(\(.*\))\s*=>\s*
    2. @$2($5, $6)\nasync $1$7
  4. Update init and postUpgrade to decorators
    1. (.*): ((init)|(postUpgrade))\((\[.*\]),\s*\s*(\(.*\))\s*=>\s*
    2. @$2($5)\n$1$6
  5. Convert async queries and updates with lots of line breaks to decorators
    1. \s*(.*):\s((update)|(query))\(\n*\s*(\[.*\]),\n*\s*(.*),\n*\s*async\s*(\(.*\))\s*=>\s*
    2. \n @$2($5, $6)\n async $1$7
  6. Convert queries and updates with lots of line breaks to decorators
    1. \s*(.*):\s((update)|(query))\(\n*\s*(\[.*\]),\n*\s*(.*),\n*\s*\s*(\(.*\))\s*=>\s*
    2. \n @$2($5, $6)\n $1$7
  7. Change all manual return values to manual options args
    1. Manual\((.*)\)\)
    2. $1, { manual: true})

@bdemann bdemann force-pushed the api_refactor branch 3 times, most recently from af8fcea to e33f755 Compare June 28, 2024 22:16
@bdemann bdemann force-pushed the api_refactor branch 6 times, most recently from da9fc0d to fef1063 Compare July 9, 2024 17:53
@bdemann bdemann changed the base branch from main to trivial_api_refactor July 9, 2024 18:20
@bdemann bdemann changed the base branch from trivial_api_refactor to main July 9, 2024 19:55
@bdemann bdemann marked this pull request as ready for review July 9, 2024 19:55
This was referenced Jul 9, 2024
@lastmjs lastmjs merged commit 0fc8322 into main Jul 9, 2024
194 of 195 checks passed
@bdemann bdemann deleted the api_refactor branch July 9, 2024 20:12
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