Skip to content

Latest commit

 

History

History
803 lines (402 loc) · 51.9 KB

File metadata and controls

803 lines (402 loc) · 51.9 KB

@marko/language-tools

2.6.6

Patch Changes

  • #575 c42fed4 Thanks @DylanPiercey! - Load the shipped marko.internal.d.ts from the installed @marko/language-tools rather than resolving it from the project being checked, so mtc no longer fails with "Could not resolve marko type files." in pnpm projects where @marko/language-tools is only a transitive dependency.

2.6.5

Patch Changes

  • #566 e193905 Thanks @DylanPiercey! - Update @marko/compiler, marko, and prettier-plugin-marko to their latest releases.

2.6.4

Patch Changes

  • #559 68b0ebe Thanks @DylanPiercey! - Import tags from installed packages by the name their taglib was resolved through, fixing the types for tags installed into a virtual store (eg pnpm).

2.6.3

Patch Changes

  • #547 58e58ef Thanks @DylanPiercey! - Upgrade htmljs-parser to ^5.12.1, which fixes a parse error where a </> comparison inside a static/server/client function with a return-type annotation was treated as a generic bracket, swallowing the rest of the template (e.g. breaking "Show Extracted Script Output").

2.6.2

Patch Changes

  • #541 6d688b7 Thanks @vwong! - Fix getComponentName leaving a trailing ] in the generated identifier when a component file has a bracketed variant suffix (e.g. my-button[variant].marko). The stray ] produced invalid TypeScript (const MyButtonVariant] = new …) which caused TS1005/TS1134/TS1389 parse errors.

2.6.1

Patch Changes

  • #530 1091b69 Thanks @DylanPiercey! - Name the default export of auto-discoverable Marko components (files under a components/tags directory) after the tag, so auto-imports read import MyButton from "..." instead of TypeScript's file-derived MyButtonMarko (and Foo instead of index for foo/index.marko).

  • #534 6450d18 Thanks @DylanPiercey! - Merge a tag's shorthand class names (.foo) with a literal class attribute (eg <button.btn class="foo"/>) the same way Marko does at compile time, instead of emitting two class keys. This removes the spurious "An object literal cannot have multiple properties with the same name" TypeScript error while still type-checking the class attribute value against the tag's class type.

2.6.0

Minor Changes

  • #527 e72de5b Thanks @DylanPiercey! - Add CSS module support (*.module.css, *.module.scss, *.module.less).

    Importing a CSS module from a .marko file now produces a virtual TypeScript module typed from the stylesheet's class and id selectors. This enables completion, hover, go-to-definition, find-references and rename for the imported class/id names, and surfaces type errors for names that do not exist. @marko/type-check (mtc) checks the same usage and emits the conventional foo.module.css.d.ts declaration. In editors, Marko only resolves *.module.css imports for .marko files — imports in plain .ts/.tsx files fall through to normal TypeScript resolution (which picks up that emitted declaration, or whatever CSS-modules setup you already use), so Marko never hijacks resolution for non-Marko files.

    Marko's embedded CSS module blocks (<style/styles>, including <style.scss/styles> etc.) are typed the same way: the tag variable becomes an object of the block's class/id names instead of an HTMLStyleElement, so styles.foo is type-checked and its references/renames stay in sync with the selectors in the <style> block.

2.5.64

Patch Changes

2.5.63

Patch Changes

  • #520 e986bcb Thanks @DylanPiercey! - Expose a template's resolved runtime api as a "~api" export so tooling can read whether a template uses the tags or class api (e.g. import { "~api" as API } from "./template.marko") without importing Input and the circular dependencies that can cause.

2.5.62

Patch Changes

  • #512 35a1050 Thanks @DylanPiercey! - Fix return type extraction when outputting jsdoc.

  • #512 35a1050 Thanks @DylanPiercey! - Fix mutaton tracking when a for loop is used without a variable declaration.

  • #512 35a1050 Thanks @DylanPiercey! - Refactor script extractor to allow for multi in/out source mapping. This allows for hoisted tag variables from multiple sources to all be sourcemapped correctly.

  • #512 35a1050 Thanks @DylanPiercey! - Fix scope mutation tracking when assigning with a destructure pattern.

  • #512 35a1050 Thanks @DylanPiercey! - Fix overlapping mappings in extractor now always leading to consistent tokens. This was a problem for eg default values which sometimes linked to the value attribute instead of the literal value expression.

  • #512 35a1050 Thanks @DylanPiercey! - Refactor extractor to have "anchor" feature which allows mapping back arbitrary code points from the typescript to arbitrary source code. Previously we relied on injected comment mapping and whitespace copying which was both brittle and noisy.

2.5.61

Patch Changes

  • #507 3401932 Thanks @DylanPiercey! - Detect the Input type when it is imported into the module scope (eg import { Input } from "..." or import type { Input } from "...") instead of only an inline interface/type declaration.

2.5.60

Patch Changes

  • #500 4be96c5 Thanks @DylanPiercey! - Fix several smaller Windows path handling issues: auto import completion details no longer show absolute paths, go to definition for tags declared in a marko.json now jumps to the tag's entry, and tags discovered from npm packages show their package documentation again. Also fix taglib cache invalidation not firing for marko.json changes (only marko-tag.json) and a stateful regex that could flip the default script language between projects.

  • #500 4be96c5 Thanks @DylanPiercey! - Fix incorrect diagnostic and mapping positions on Windows. File paths are now canonicalized to native separators before script extraction so the generated code (which embeds relative import paths for custom tags) is identical regardless of how the file name was spelled, and extracted snapshot caches now use canonicalized keys so cache eviction works when TypeScript and the file system disagree on path separators.

2.5.59

Patch Changes

  • #495 5e05dff Thanks @DylanPiercey! - Prefer intersection for dynamic tag input types to improve type checking performance.

2.5.58

Patch Changes

2.5.57

Patch Changes

2.5.56

Patch Changes

2.5.55

Patch Changes

2.5.54

Patch Changes

2.5.53

Patch Changes

2.5.52

Patch Changes

  • #454 8a76656 Thanks @DylanPiercey! - Align reading own tag variables within body content with the Marko 6 runtime. (Fixes a regression with recursive define tag types).

2.5.51

Patch Changes

2.5.50

Patch Changes

2.5.49

Patch Changes

2.5.48

Patch Changes

2.5.47

Patch Changes

2.5.46

Patch Changes

2.5.45

Patch Changes

  • #437 de8c189 Thanks @DylanPiercey! - Improve tag var mutation codegen to be separate from scope handling which fixes an issue where some tags change handlers were not being output.

  • #437 91da58b Thanks @DylanPiercey! - Optimize native tag var codegen.

2.5.44

Patch Changes

2.5.43

Patch Changes

2.5.42

Patch Changes

2.5.41

Patch Changes

2.5.40

Patch Changes

2.5.39

Patch Changes

2.5.38

Patch Changes

2.5.37

Patch Changes

2.5.36

Patch Changes

2.5.35

Patch Changes

  • #411 c0357a1 Thanks @DylanPiercey! - Fix issue with d.marko generation for jsdoc Marko files with an external component file.

2.5.34

Patch Changes

2.5.33

Patch Changes

2.5.32

Patch Changes

2.5.31

Patch Changes

2.5.30

Patch Changes

2.5.29

Patch Changes

2.5.28

Patch Changes

  • #384 5afb642 Thanks @DylanPiercey! - Expose source/generated range helpers and use that when remapping generated traces in mtc.

2.5.27

Patch Changes

2.5.26

Patch Changes

2.5.25

Patch Changes

2.5.24

Patch Changes

2.5.23

Patch Changes

2.5.22

Patch Changes

2.5.21

Patch Changes

2.5.20

Patch Changes

2.5.19

Patch Changes

2.5.18

Patch Changes

2.5.17

Patch Changes

2.5.16

Patch Changes

  • #344 ed43a8d Thanks @rturnq! - Ignore types for non-Marko templates to remove errors for missing types

2.5.15

Patch Changes

  • #342 263a8f5 Thanks @rturnq! - Reduce recursion in complex input types to prevent excessive depth errors

2.5.14

Patch Changes

  • #340 4607c2d Thanks @DylanPiercey! - Fix issue where tag var mutations at multiple levels were causing higher levels to be non writable.

2.5.13

Patch Changes

2.5.12

Patch Changes

2.5.11

Patch Changes

2.5.10

Patch Changes

2.5.9

Patch Changes

2.5.8

Patch Changes

2.5.7

Patch Changes

2.5.6

Patch Changes

2.5.5

Patch Changes

2.5.4

Patch Changes

2.5.3

Patch Changes

2.5.2

Patch Changes

  • #314 a839384 Thanks @DylanPiercey! - Ensure script tags are only processed as javascript when they contain no other attributes or placeholders in the body content.

2.5.1

Patch Changes

2.5.0

Minor Changes

Patch Changes

2.4.8

Patch Changes

2.4.7

Patch Changes

  • #305 2414702 Thanks @LuLaValva! - client and server statements, satisfies keyword, explicit type annotations on let

2.4.6

Patch Changes

2.4.5

Patch Changes

2.4.4

Patch Changes

2.4.3

Patch Changes

2.4.2

Patch Changes

  • #286 f585449 Thanks @DylanPiercey! - Revert change to renderBody codegen which caused a regression with the <await> tag.

2.4.1

Patch Changes

2.4.0

Minor Changes

Patch Changes

2.3.1

Patch Changes

2.3.0

Minor Changes

2.2.6

Patch Changes

  • #262 521a0da Thanks @DylanPiercey! - Fix issue with typescript output when using static attr tags, dynamic attr tags and a renderBody all together.

2.2.5

Patch Changes

2.2.4

Patch Changes

2.2.3

Patch Changes

2.2.2

Patch Changes

2.2.1

Patch Changes

2.2.0

Minor Changes

  • #241 842b5ba Thanks @DylanPiercey! - Automatically add .js extensions where necessary in files output by @marko/type-check to work better with native es modules.

2.1.11

Patch Changes

  • #237 a59b23d Thanks @DylanPiercey! - Fix issue where mtc was striping Input type if it was an empty interface with an extends clause.

  • #237 b0f43ce Thanks @DylanPiercey! - Correctly resolve ts errors related to Symbol.iterator in the template.

2.1.10

Patch Changes

2.1.9

Patch Changes

2.1.8

Patch Changes

2.1.7

Patch Changes

2.1.6

Patch Changes

2.1.5

Patch Changes

  • #212 5fbd91d Thanks @DylanPiercey! - When considering if a Marko file should be parsed as typescript, it will now default to typescript for any file containing tsconfig. Previously this would exclusively match tsconfig.json which would fail with files like tsconfig.build.json.

  • #214 97787c2 Thanks @DylanPiercey! - Upgrade dependencies.

2.1.4

Patch Changes

  • #209 dbcee5a Thanks @DylanPiercey! - Upgrade dependencies.

  • #209 374392e Thanks @DylanPiercey! - Fix issue where directory names instead of file names were being passed to createRequire causing some lookups to be one directory too high and missing resolving installed modules.

2.1.3

Patch Changes

  • #204 6c97a4a Thanks @DylanPiercey! - Fallback to loading compiler relative to the Marko runtime if not hoisted.

  • #204 6c97a4a Thanks @DylanPiercey! - When no default compiler registered, avoid swallowing original error when unable to load compiler.

2.1.2

Patch Changes

2.1.1

Patch Changes

2.1.0

Minor Changes

2.0.11

Patch Changes

2.0.10

Patch Changes

2.0.9

Patch Changes

  • #181 15cf245 Thanks @DylanPiercey! - Fixes an issue where Marko files within node_modules without an explicit marko.json were not being loaded. Internally this switches to a new api that should not be tripped up by either export maps and / or a missing marko.json when trying to resolve Marko files.

2.0.8

Patch Changes

  • #179 b743baa Thanks @DylanPiercey! - The format command should now propely output export statements which can be parsed by the Marko parser.

  • #179 b743baa Thanks @DylanPiercey! - Downgrade the strip-json-comments module to match the version used by Marko. The latest version does not work in commonjs environments.

2.0.7

Patch Changes

  • #171 6259092 Thanks @DylanPiercey! - Fix issue where trailing commas in the arguments of some tags would produce invalid typescript.

2.0.6

Patch Changes

2.0.5

Patch Changes

2.0.4

Patch Changes

2.0.3

Patch Changes

2.0.2

Patch Changes

2.0.1

Patch Changes

  • #153 c147a8e Thanks @DylanPiercey! - Fix regression that caused ts-plugin to crash and a failure to resolve the internal Marko types.

2.0.0

Major Changes

  • #151 25e4131 Thanks @DylanPiercey! - Refactor script extractor and expose Processor helpers (shared between CLI and language server)

Patch Changes

1.0.3

Patch Changes

  • #148 e823df5 Thanks @DylanPiercey! - No longer use a default Input type of Component['input'] for inline class components.

1.0.2

Patch Changes

1.0.1

Patch Changes

1.0.0

Major Changes