Repository navigation
chore: support extensionless TypeScript imports - #45
Merged
Merged
Conversation
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ملخص التغيير (Summary)
Allow TypeScript source imports such as
import { setCharAt } from '../utils'instead of explicit.jspaths. Static relative imports and barrel exports are extensionless; type-only imports explicitly useimport type.tscfor ES5 CommonJS and use pinnedtsdown@0.21.10for unbundled ES2020 ESM JavaScript and declarations with Node-compatible.jsspecifiers.tsdown.config.mtsto explicitly identify the build configuration as ESM.التوافق (Compatibility)
Public package entry paths, named/default exports, ArabicServices method names, and text-processing logic remain intact. CJS, ESM, browser UMD, and declarations are exercised; no runtime dependency is added.
Known observable differences: tsdown synthesizes
ArabicServices.constantsand.utilsnamespace objects in ESM. Their prototype, extensibility, and property descriptors differ from native ESM namespaces, although values/function identities are retained. No reliance on those descriptors was found in the inspected local API/website consumers; this is not proof about all external consumers.Selected function and declaration maps resolve to source. Three generated JS facade maps and two declaration facade maps are empty; the generated Rolldown runtime helper has no map. These limitations remain visible in artifact checks.
التحقق (Validation)
npm run format:checknpm run lintnpm testcompleted 119 source tests and the full build, then hit a 10-secondnpm pack --dry-runtimeout in one artifact test (17/18 passed). An artifact retry under portable Node 22.18 repeated that timeout.npm run test:artifacts -- --maxWorkers=1 --no-file-parallelism: 18/18 passed, including package and tree-shaking checks. No tests or timeouts were changed.npm pack --dry-run --ignore-scripts --json: passed (134 files).MODULE_TYPELESS_PACKAGE_JSON; no global Node upgrade.git diff --checkValidation is local on Windows. Cross-platform/older-runtime matrices and CI results have not been verified. The existing Node 22.17 build-tool deprecation warning remains separate from the resolved config-module warning.