{"raw":"zely3 rewrote the code to increase development efficiency. The code actually has improved a bit, but the performance became ridiculously bad.\n\nIn zely4, we will focus on performance and add back features that were lost while rewriting the code.\n\n## Plan\n\n> see also [https://github.com/zely-js/zely/issues/405](https://github.com/zely-js/zely/issues/405)\n\n### improve export-default\n\n```ts\nexport default { message: 'Hello' };\n```\n\nAs above, there is a code that exports data by default without setting a handler\n\nThis code will work just like the code below.\n\n```ts\nexport default [ALL((ctx) => ctx.send({ message: 'Hello' }))];\n```\n\nAt first glance, the code has improved readability, and it's much simpler\n\n### improve performance\n\nThe goal of creating the fastest backend framework has not been abandoned yet.  \nI will continue to improve the performance of zely.\n\n<Box type=\"tip\">\n  zely4 can handle about **2.68x more requests** and is **11x faster** than zely3 -\n  [version benchmark](https://github.com/zely-js/benchmark-history)\n</Box>\n\n### support .html\n\nNot long ago, I made [a package](https://segify.vercel.app) as a side project.  \nI will utilize this project and update zely to make it easier to create a frontend page using the `.html` extension\n\n> Note: This will only work if you enable the option separately. Normally, it will just send html through `sendFile`.\n\n### integrating multiple packages\n\nCurrently, Zely is divided into several packages. Questions arise as to whether this division is necessary\n\n### createFrontendPage\n\n`createFrontendPage` is a function that will be used for all the functions related to the frontend mentioned earlier\n","target":{"title":"Breaking Change: zely@4!","date":"24-12-01","description":"A major update to Zely 4, bringing significant changes to its API and internal architecture.","category":"Release"},"compiled":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nfunction _createMdxContent(props) {\n  const _components = {\n    a: \"a\",\n    blockquote: \"blockquote\",\n    br: \"br\",\n    code: \"code\",\n    figure: \"figure\",\n    h2: \"h2\",\n    h3: \"h3\",\n    p: \"p\",\n    pre: \"pre\",\n    span: \"span\",\n    strong: \"strong\",\n    ...props.components\n  }, {Box} = _components;\n  if (!Box) _missingMdxReference(\"Box\", true);\n  return _jsxs(_Fragment, {\n    children: [_jsx(_components.p, {\n      children: \"zely3 rewrote the code to increase development efficiency. The code actually has improved a bit, but the performance became ridiculously bad.\"\n    }), \"\\n\", _jsx(_components.p, {\n      children: \"In zely4, we will focus on performance and add back features that were lost while rewriting the code.\"\n    }), \"\\n\", _jsx(_components.h2, {\n      children: \"Plan\"\n    }), \"\\n\", _jsxs(_components.blockquote, {\n      children: [\"\\n\", _jsxs(_components.p, {\n        children: [\"see also \", _jsx(_components.a, {\n          href: \"https://github.com/zely-js/zely/issues/405\",\n          children: \"https://github.com/zely-js/zely/issues/405\"\n        })]\n      }), \"\\n\"]\n    }), \"\\n\", _jsx(_components.h3, {\n      children: \"improve export-default\"\n    }), \"\\n\", _jsx(_components.figure, {\n      \"data-rehype-pretty-code-figure\": \"\",\n      children: _jsx(_components.pre, {\n        tabIndex: \"0\",\n        \"data-language\": \"ts\",\n        \"data-theme\": \"material-theme-palenight github-light\",\n        children: _jsx(_components.code, {\n          \"data-language\": \"ts\",\n          \"data-theme\": \"material-theme-palenight github-light\",\n          style: {\n            display: \"grid\"\n          },\n          children: _jsxs(_components.span, {\n            \"data-line\": \"\",\n            children: [_jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-dark-font-style\": \"italic\",\n                \"--shiki-light\": \"#D73A49\",\n                \"--shiki-light-font-style\": \"inherit\"\n              },\n              children: \"export\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-dark-font-style\": \"italic\",\n                \"--shiki-light\": \"#D73A49\",\n                \"--shiki-light-font-style\": \"inherit\"\n              },\n              children: \" default\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \" {\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#F07178\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \" message\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \":\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \" '\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \"Hello\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \"'\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \" };\"\n            })]\n          })\n        })\n      })\n    }), \"\\n\", _jsx(_components.p, {\n      children: \"As above, there is a code that exports data by default without setting a handler\"\n    }), \"\\n\", _jsx(_components.p, {\n      children: \"This code will work just like the code below.\"\n    }), \"\\n\", _jsx(_components.figure, {\n      \"data-rehype-pretty-code-figure\": \"\",\n      children: _jsx(_components.pre, {\n        tabIndex: \"0\",\n        \"data-language\": \"ts\",\n        \"data-theme\": \"material-theme-palenight github-light\",\n        children: _jsx(_components.code, {\n          \"data-language\": \"ts\",\n          \"data-theme\": \"material-theme-palenight github-light\",\n          style: {\n            display: \"grid\"\n          },\n          children: _jsxs(_components.span, {\n            \"data-line\": \"\",\n            children: [_jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-dark-font-style\": \"italic\",\n                \"--shiki-light\": \"#D73A49\",\n                \"--shiki-light-font-style\": \"inherit\"\n              },\n              children: \"export\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-dark-font-style\": \"italic\",\n                \"--shiki-light\": \"#D73A49\",\n                \"--shiki-light-font-style\": \"inherit\"\n              },\n              children: \" default\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#BABED8\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \" [\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#82AAFF\",\n                \"--shiki-light\": \"#6F42C1\"\n              },\n              children: \"ALL\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#BABED8\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \"(\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \"(\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#BABED8\",\n                \"--shiki-dark-font-style\": \"italic\",\n                \"--shiki-light\": \"#E36209\",\n                \"--shiki-light-font-style\": \"inherit\"\n              },\n              children: \"ctx\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \")\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C792EA\",\n                \"--shiki-light\": \"#D73A49\"\n              },\n              children: \" =>\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#BABED8\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \" ctx\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \".\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#82AAFF\",\n                \"--shiki-light\": \"#6F42C1\"\n              },\n              children: \"send\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#BABED8\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \"(\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \"{\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#F07178\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \" message\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \":\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \" '\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#C3E88D\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \"Hello\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#032F62\"\n              },\n              children: \"'\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \" }\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#BABED8\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \"))]\"\n            }), _jsx(_components.span, {\n              style: {\n                \"--shiki-dark\": \"#89DDFF\",\n                \"--shiki-light\": \"#24292E\"\n              },\n              children: \";\"\n            })]\n          })\n        })\n      })\n    }), \"\\n\", _jsx(_components.p, {\n      children: \"At first glance, the code has improved readability, and it's much simpler\"\n    }), \"\\n\", _jsx(_components.h3, {\n      children: \"improve performance\"\n    }), \"\\n\", _jsxs(_components.p, {\n      children: [\"The goal of creating the fastest backend framework has not been abandoned yet.\", _jsx(_components.br, {}), \"\\n\", \"I will continue to improve the performance of zely.\"]\n    }), \"\\n\", _jsx(Box, {\n      type: \"tip\",\n      children: _jsxs(_components.p, {\n        children: [\"zely4 can handle about \", _jsx(_components.strong, {\n          children: \"2.68x more requests\"\n        }), \" and is \", _jsx(_components.strong, {\n          children: \"11x faster\"\n        }), \" than zely3 -\\n\", _jsx(_components.a, {\n          href: \"https://github.com/zely-js/benchmark-history\",\n          children: \"version benchmark\"\n        })]\n      })\n    }), \"\\n\", _jsx(_components.h3, {\n      children: \"support .html\"\n    }), \"\\n\", _jsxs(_components.p, {\n      children: [\"Not long ago, I made \", _jsx(_components.a, {\n        href: \"https://segify.vercel.app\",\n        children: \"a package\"\n      }), \" as a side project.\", _jsx(_components.br, {}), \"\\n\", \"I will utilize this project and update zely to make it easier to create a frontend page using the \", _jsx(_components.code, {\n        children: \".html\"\n      }), \" extension\"]\n    }), \"\\n\", _jsxs(_components.blockquote, {\n      children: [\"\\n\", _jsxs(_components.p, {\n        children: [\"Note: This will only work if you enable the option separately. Normally, it will just send html through \", _jsx(_components.code, {\n          children: \"sendFile\"\n        }), \".\"]\n      }), \"\\n\"]\n    }), \"\\n\", _jsx(_components.h3, {\n      children: \"integrating multiple packages\"\n    }), \"\\n\", _jsx(_components.p, {\n      children: \"Currently, Zely is divided into several packages. Questions arise as to whether this division is necessary\"\n    }), \"\\n\", _jsx(_components.h3, {\n      children: \"createFrontendPage\"\n    }), \"\\n\", _jsxs(_components.p, {\n      children: [_jsx(_components.code, {\n        children: \"createFrontendPage\"\n      }), \" is a function that will be used for all the functions related to the frontend mentioned earlier\"]\n    })]\n  });\n}\nfunction MDXContent(props = {}) {\n  const {wrapper: MDXLayout} = props.components || ({});\n  return MDXLayout ? _jsx(MDXLayout, {\n    ...props,\n    children: _jsx(_createMdxContent, {\n      ...props\n    })\n  }) : _createMdxContent(props);\n}\nreturn {\n  default: MDXContent\n};\nfunction _missingMdxReference(id, component) {\n  throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","previousPost":{"title":"New Compiler","date":"25-01-13","description":"Introducing a new compiler architecture for faster and more efficient code transformation.","category":"Engineering"},"nextPost":{"title":"Introducing 3.0!","date":"24-02-27","description":"Zely 3.0 is here with new features, improvements, and a refreshed development experience.","category":"Release"}}