Skip to content

Fixtures மற்றும் static runs

Tool-ஐ stress test பண்ண எழுதின fixtures

Fixture என்ன சோதிக்குது Result
tests/fixtures/async ரெண்டு bridges-லயும் async functions 900/900, ரெண்டு gates-உம் pass ஆகுது
tests/fixtures/classes classes: state, constructor errors, Map order, emoji-ல split('') 600/600 scenarios, ரெண்டு gates-உம் pass ஆகுது
tests/fixtures/aliases extends, comments, trailing commas கொண்ட tsconfig paths analyze மற்றும் record அவற்றை follow பண்ணுது
tests/fixtures/monorepo build output இல்லாத ஒரு sibling-ஐ import பண்ற package record அதை source-க்கு resolve பண்ணுது

Tool-ல கண்டுபிடிச்சு, fix பண்ணப்பட்டது: napi None-ஐ null-ஆ மாத்திச்சு (JS undefined தரும்); ஒரு stateful bug-ஐப் பிடிக்க முடியாத அளவுக்குச் சின்னதாவும் ரொம்ப random-ஆவும் இருந்த scenarios (இப்போ 12 calls வரை, முந்தைய strings-ஐ மறுபடியும் பயன்படுத்துது); clippy reject பண்ற generate ஆன let out = () மற்றும் உடனே call ஆகுற closures.

External libraries (static மட்டும்)

unjs/scule, unjs/ufo மற்றும் unjs/pathe clone பண்ணப்பட்டு analyze மற்றும் bridge செய்யப்பட்டுச்சு. Internet-ல இருந்து download ஆன code-க்கான session-ஓட safety policy அவற்றோட code-ஐ run பண்ண (record original-ஐ execute பண்ணும்) அனுமதிக்கல, அதனால இந்த runs record-க்கு முன்னாடியே நின்னுடுச்சு.

Library analyze bridge
scule (case conversion) 2 units, ready கீழ உள்ள fix-க்கு அப்புறம் எல்லா 11 functions-உம் bridgeable
ufo (URL utilities) 7 units, ready; punycode.ts முதல்ல rank ஆச்சு toASCII bridge ஆச்சு (untyped JS: JSON-ஆ cross ஆகுது)
pathe (path utilities) 5 units; _glob.ts caution (dynamic regex) 13 functions bridge ஆச்சு; typeof path.join-typed exports JSON-ஆ cross ஆகுது

Tool-ல கண்டுபிடிச்சு, fix பண்ணப்பட்டது: constrained generics (camelCase<T extends string | readonly string[]>) "எந்த value-ஆ இருந்தாலும் சரி, functions உட்பட"-னு எடுத்துக்கப்பட்டுச்சு, அது scule-ஓட 11 functions-ல 10-ஐ TS-லயே வெச்சிருந்துச்சு. Data constraints கொண்ட type parameters இப்போ அந்த constraint-ஆல replace ஆகுது.

scule-க்கு ஒரு port எழுதப்பட்டுச்சு (demo சேர்க்கப்படல: இது original கூட எப்பவும் record ஆகல).

GitHub-ல இந்தப் பக்கத்தை edit பண்ணுங்க →