feat(test): experiment unplugin with tgz published.#1779
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new experiment workflow and directory structure for testing @typia/unplugin with locally-built tarballs. It moves the tarball build script from website/build/tgz.js to experiments/tarballs/index.js, creates a new experiments/unplugin project that installs packages from tarballs and runs vitest tests, and adds a GitHub Actions workflow to automate this. It also removes committed snapshot files from tests/test-unplugin (now gitignored), adds external to the tsdown config, removes compiled svelte language files, and updates documentation examples.
Changes:
- Added experiments infrastructure: tarball build script relocation, unplugin experiment project with vitest setup, and CI workflow
- Removed committed test snapshots from
tests/test-unplugin(now auto-generated and gitignored), and cleaned up compiled output files (tsdown.config.js,tsdown.config.d.ts, svelte.js/.d.ts) - Updated documentation comment import paths across all unplugin entry files and added
externalconfig andworkspace:^peer dependency
Reviewed changes
Copilot reviewed 65 out of 69 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/experiments.yml |
New CI workflow to build tarballs and test the unplugin experiment |
experiments/tarballs/index.js |
Refactored tarball build script; copies to experiments/tarballs/ directly |
experiments/tarballs/.gitignore |
Ignore generated .tgz files |
experiments/tarballs/README.md |
Brief description of the tarballs directory |
experiments/unplugin/package.json |
New experiment project installing from local tarballs |
experiments/unplugin/vitest.config.mts |
Vitest config with UnpluginTypia plugin |
experiments/unplugin/tsconfig.json |
TypeScript config for the experiment |
experiments/unplugin/src/is.spec.ts |
Basic typia.is test |
package.json |
Updated package:tgz script path |
website/package.json |
Updated tarball dependency paths |
packages/unplugin/package.json |
Changed typia peer dep to workspace:^ |
packages/unplugin/tsdown.config.ts |
Added external for typescript and typia |
packages/unplugin/tsdown.config.js |
Removed compiled config output |
packages/unplugin/tsdown.config.d.ts |
Removed compiled config type declarations |
packages/unplugin/src/bun.ts |
Updated doc examples and added comment about incorrect typing |
packages/unplugin/src/esbuild.ts |
Updated doc example import path |
packages/unplugin/src/farm.ts |
Updated doc example import path |
packages/unplugin/src/next.ts |
Updated doc example import path |
packages/unplugin/src/rolldown.ts |
Updated doc example import path |
packages/unplugin/src/rollup.ts |
Updated doc example import path |
packages/unplugin/src/rspack.ts |
Updated doc example import path |
packages/unplugin/src/vite.ts |
Updated doc example import path |
packages/unplugin/src/webpack.ts |
Updated doc example import path |
packages/unplugin/src/core/languages/svelte.js |
Removed compiled JS (TS source remains) |
packages/unplugin/src/core/languages/svelte.d.ts |
Removed compiled declarations (TS source remains) |
tests/test-unplugin/package.json |
Added repository/author/license metadata |
tests/test-unplugin/.gitignore |
Added gitignore for auto-generated snapshots |
tests/test-unplugin/tests/fixtures/__snapshots__/* |
Removed committed snapshot files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces a new experiment workflow and directory structure for testing local tarball builds of packages, along with updates to package installation and documentation. The changes streamline the process of building, storing, and testing
.tgzpackage tarballs, and add a dedicated experiment for the@typia/unpluginpackage. Additionally, several documentation and code comments are updated for clarity and correctness.Experiment workflow and tarball management:
.github/workflows/experiments.ymlto automate building tarballs and testing theunpluginexperiment on Ubuntu CI, including dependency installation and running tests.website/build/tgz.jstoexperiments/tarballs/index.js, simplifying directory management and tarball output..gitignoreto exclude.tgzfiles inexperiments/tarballs, and aREADME.mddescribing the purpose of the directory. [1] [2]package.jsonto use the new tarball build script location.Unplugin experiment setup:
experiments/unpluginwith apackage.jsonthat installs@typia/unpluginandtypiafrom locally built tarballs, and sets up testing withvitest.src/is.spec.ts) to verifytypia.isfunctionality.tsconfig.jsonwith TypeScript and transformer plugin configuration.vitest.config.mtsto configure testing and plugin usage.Documentation and code comment updates:
packages/unplugin/src/*files to reference the new package scope (@ryoppippi/unplugin-typia) for clarity in documentation. [1] [2] [3] [4] [5] [6] [7] [8]bun.ts.Peer dependency update:
typiapeer dependency inpackages/unplugin/package.jsonto use workspace versioning for better compatibility with local builds.Code cleanup:
packages/unplugin/src/core/languages/svelte.js.