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

Release v0.5.0 #770

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Release v0.5.0 #770

merged 1 commit into from
Feb 19, 2025

Conversation

Timeless0911
Copy link
Contributor

@Timeless0911 Timeless0911 commented Feb 19, 2025

Highlights ✨

This release brings exciting new features and improvements to Rslib:

  • Support DTS Redirect: Rslib now supports to control the redirect of the import paths in output TypeScript declaration files. (feat: support DTS redirect #742)

    • redirect.dts.path: Redirect the import path in the DTS output file to the corresponding relative path based on the compilerOptions.paths configured in tsconfig.json.
    // For `compilerOptions.paths` set to `{ "@/*": ["src/*"] }` in `tsconfig.json`
    import { foo } from '@/foo'; // source code of './src/bar.ts' ↓
    import { foo } from './foo'; // expected output of './dist/bar.d.ts'
    
    import { foo } from '@/foo'; // source code of './src/utils/index.ts' ↓
    import { foo } from '../foo'; // expected output './dist/utils/index.d.ts'
    • redirect.dts.extension: Redirect the import path in the DTS output file to the corresponding JavaScript extension which can be resolved to corresponding DTS file.
    // For `.d.mts` TypeScript Declaration files
    import { foo } from './foo'; // source code of './src/bar.ts' ↓
    import { foo } from './foo.mjs'; // expected output of './dist/bar.d.mts'
    
    import { foo } from './foo.ts'; // source code of './src/bar.ts' ↓
    import { foo } from './foo.mjs'; // expected output of './dist/bar.d.mts'
  • Support outBase in Bundleless Mode: When building a project where source files exist across multiple directories with bundleless mode, the output directory structure will be replicated relative to the outBase directory in the output directory, see lib.outBase for more details. (feat: support outBase config #745)

  • Add Documents about Assets: Documents related to asset module have been added for common scenarios in component library development, see Import static assets, Import SVGR and Import JSON files for more details. (docs(assets): add assets, json, svgr usage document #741)

  • Support pkg.pr.new: With pkg.pr.new, each of commits in main branch will trigger an instant preview release without publishing anything to NPM. This enables users to access features and bug-fixes without the need to wait for release cycles. (chore(CI): support pkg.pr.new #766)

@Timeless0911 Timeless0911 enabled auto-merge (squash) February 19, 2025 09:48
@Timeless0911 Timeless0911 merged commit b3cf9ea into main Feb 19, 2025
22 checks passed
@Timeless0911 Timeless0911 deleted the release_v0.5.0 branch February 19, 2025 09:49
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