Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
6b84a7c
chore: Fork ts-simple-type repository and add it to the monorepo
JackRobards Mar 23, 2025
af5e607
chore: Run prettier:write on ts-simple-type
JackRobards Mar 23, 2025
ec5be52
chore: Fix build and eslint for ts-simple-type package with new versions
JackRobards Mar 23, 2025
d45e745
chore: Fix incorrect Prettier config and run it on ts-simple-type and…
JackRobards Mar 23, 2025
3300926
chore: Upgrade typescript and ava versions to match the rest of the m…
JackRobards Mar 23, 2025
b454fc6
chore: Update all ts-simple-type imports and references to new monore…
JackRobards Mar 23, 2025
dd07f7c
chore: Remove TypeCheckerWithInternals internal type as isAssignableT…
JackRobards Mar 23, 2025
04c0aac
chore: Fix type exports for ts-simple-type and add esm export to rollup
JackRobards Mar 23, 2025
16cb758
chore: Fix error in infinite types test after TS upgrade
JackRobards Mar 23, 2025
eca8075
chore: Add missing inter-project build dependencies to wireit config
JackRobards Mar 23, 2025
4f97e60
chore: Upgrade ts-simple-type typescript and rollup devDependencies t…
JackRobards Apr 20, 2025
dbe41e8
chore: Added missing tsc build check for web-component-analyzer and t…
JackRobards Apr 20, 2025
bc967c0
fix(ts-simple-type): Update check for Enums against a NUMBER_LITERAL,…
JackRobards Apr 20, 2025
97ba685
chore: Resolve TypeScript errors from enabling type-checking in ts-si…
JackRobards Apr 20, 2025
5b24f10
chore: Add typescript@^5 peerDependency to ts-simple-type
JackRobards Apr 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ out
/packages/*/test
/packages/*/index.*

/packages/ts-simple-type/playground/**/*
/packages/ts-simple-type/.rollup.cache
!/packages/ts-simple-type/test

/packages/vscode-lit-plugin/built

/packages/web-component-analyzer/.rollup.cache
Expand Down
26 changes: 0 additions & 26 deletions .prettierignore

This file was deleted.

4 changes: 0 additions & 4 deletions STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,3 @@ The Lit team also have [this RFC](https://github.com/lit/rfcs/pull/41) outlining

As a shoutout, some of the tools by break-stuff are great if you are wanting to generate a custom element manifest file. I would highly recommend checking them out:
https://github.com/break-stuff/cem-tools

## TS Simple Type

Currently, this repo doesn't include the [ts-simple-type](https://github.com/runem/ts-simple-type) repo that was also created by Rune. There is a good chance it will be included here in the future, or an alternative will be found. If there is an update that you'd like to make to this package let me know, and I can see about getting it added here as well so that it is easier to do so!
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default tseslint.config(
"packages/*/scripts",
"packages/*/test",
"packages/*/index.*",
"packages/ts-simple-type/.rollup.cache",
"!packages/ts-simple-type/test",
"packages/vscode-lit-plugin/built",
"packages/web-component-analyzer/.rollup.cache",
"!packages/web-component-analyzer/test",
Expand Down
33 changes: 23 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"workspaces": [
"packages/lit-analyzer",
"packages/ts-lit-plugin",
"packages/ts-simple-type",
"packages/vscode-lit-plugin",
"packages/web-component-analyzer"
],
Expand All @@ -32,7 +33,7 @@
"template"
],
"scripts": {
"prettier:write": "prettier --write \"packages/*/src/**/*.ts\"",
"prettier:write": "prettier --write \"packages/**/*.ts\"",
"readme": "wireit",
"dev": "cd dev && TSS_DEBUG=5999 code . --disable-extension jackolope.lit-analyzer-plugin",
"dev:logs": "touch dev/lit-plugin.log && tail -f dev/lit-plugin.log",
Expand All @@ -53,6 +54,7 @@
"dependencies": [
"./packages/lit-analyzer:build",
"./packages/ts-lit-plugin:build",
"./packages/ts-simple-type:build",
"./packages/vscode-lit-plugin:build",
"./packages/web-component-analyzer:build"
]
Expand All @@ -72,6 +74,7 @@
"test:headless": {
"dependencies": [
"./packages/lit-analyzer:test",
"./packages/ts-simple-type:test",
"./packages/web-component-analyzer:test:all"
]
},
Expand All @@ -94,6 +97,7 @@
"dependencies": [
"./packages/lit-analyzer:eslint",
"./packages/ts-lit-plugin:eslint",
"./packages/ts-simple-type:eslint",
"./packages/vscode-lit-plugin:eslint",
"./packages/web-component-analyzer:eslint"
]
Expand All @@ -103,7 +107,7 @@
"packages/*/src/**/*.ts",
"prettier.config.js"
],
"command": "prettier --check \"packages/*/src/**/*.ts\""
"command": "prettier --check \"packages/**/*.ts\""
},
"package": {
"dependencies": [
Expand All @@ -123,6 +127,7 @@
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.0",
"@eslint/js": "^9.24.0",
"@types/node": "^22.14.1",
"@vscode/test-electron": "^2.3.8",
"eslint": "^9.24.0",
"eslint-config-prettier": "^10.1.2",
Expand Down
13 changes: 8 additions & 5 deletions packages/lit-analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@jackolope/lit-analyzer",
"version": "3.1.2",
"description": "CLI that type checks bindings in lit-html templates",
"author": "runem",
"author": "JackRobards",
"license": "MIT",
"repository": {
"type": "git",
Expand Down Expand Up @@ -36,6 +36,10 @@
},
"wireit": {
"build": {
"dependencies": [
"../ts-simple-type:build",
"../web-component-analyzer:build"
],
"command": "tsc --build --pretty",
"files": [
"src/**/*",
Expand Down Expand Up @@ -90,18 +94,17 @@
"cli.mjs"
],
"dependencies": {
"@jackolope/ts-simple-type": "^3.0.0",
"@jackolope/web-component-analyzer": "^4.0.1",
"@vscode/web-custom-data": "^0.5.0",
"chalk": "^5.4.0",
"didyoumean2": "7.0.4",
"fast-glob": "^3.2.11",
"parse5": "7.2.1",
"ts-simple-type": "~2.0.0-next.0",
"vscode-css-languageservice": "6.3.4",
"vscode-html-languageservice": "5.3.3",
"@jackolope/web-component-analyzer": "^4.0.1"
"vscode-html-languageservice": "5.3.3"
},
"devDependencies": {
"@types/node": "^22.14.1",
"ava": "^6.2.0",
"tslib": "^2.0.0",
"typescript": "^5.8.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SimpleType, SimpleTypeStringLiteral, SimpleTypeUnion } from "ts-simple-type";
import type { SimpleType, SimpleTypeStringLiteral, SimpleTypeUnion } from "@jackolope/ts-simple-type";
import { makePrimitiveArrayType } from "../util/type-util.js";

const HTML_5_ATTR_TYPES: { [key: string]: string | string[] | [string[]] } = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SimpleType } from "ts-simple-type";
import type { SimpleType } from "@jackolope/ts-simple-type";
import type { HTMLDataV1 } from "vscode-html-languageservice";
import htmlDataJson from "@vscode/web-custom-data/data/browsers.html-data.json";
import type { HtmlAttr, HtmlDataCollection } from "../parse/parse-html-data/html-tag.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { existsSync, readFileSync } from "fs";
import type { SimpleType } from "ts-simple-type";
import type { SimpleType } from "@jackolope/ts-simple-type";
import type { HTMLDataV1 } from "vscode-html-languageservice";
import type { LitAnalyzerConfig } from "../lit-analyzer-config.js";
import type { HtmlAttr, HtmlDataCollection, HtmlEvent, HtmlTag } from "../parse/parse-html-data/html-tag.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SimpleType } from "ts-simple-type";
import { isSimpleTypeLiteral } from "ts-simple-type";
import type { SimpleType } from "@jackolope/ts-simple-type";
import { isSimpleTypeLiteral } from "@jackolope/ts-simple-type";
import type { LitAnalyzerContext } from "../../../lit-analyzer-context.js";
import { HtmlNodeAttrAssignmentKind } from "../../../types/html-node/html-node-attr-assignment-types.js";
import type { HtmlNodeAttr } from "../../../types/html-node/html-node-attr-types.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SimpleType } from "ts-simple-type";
import { isAssignableToSimpleTypeKind } from "ts-simple-type";
import type { SimpleType } from "@jackolope/ts-simple-type";
import { isAssignableToSimpleTypeKind } from "@jackolope/ts-simple-type";
import {
LIT_HTML_BOOLEAN_ATTRIBUTE_MODIFIER,
LIT_HTML_EVENT_LISTENER_ATTRIBUTE_MODIFIER,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SimpleType, SimpleTypeAny } from "ts-simple-type";
import { isSimpleType, toSimpleType } from "ts-simple-type";
import type { SimpleType, SimpleTypeAny } from "@jackolope/ts-simple-type";
import { isSimpleType, toSimpleType } from "@jackolope/ts-simple-type";
import type { TypeChecker } from "typescript";
import type { AnalyzerResult, ComponentDeclaration, ComponentDefinition, ComponentFeatures } from "@jackolope/web-component-analyzer";
import { lazy } from "../util/general-util.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SimpleType } from "ts-simple-type";
import { isAssignableToSimpleTypeKind, typeToString } from "ts-simple-type";
import type { SimpleType } from "@jackolope/ts-simple-type";
import { isAssignableToSimpleTypeKind, typeToString } from "@jackolope/ts-simple-type";
import type {
ComponentCssPart,
ComponentCssProperty,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SimpleType, SimpleTypeStringLiteral } from "ts-simple-type";
import type { SimpleType, SimpleTypeStringLiteral } from "@jackolope/ts-simple-type";
import type { HTMLDataV1, IAttributeData, ITagData, IValueData, IValueSet } from "vscode-html-languageservice";
import type { MarkupContent } from "vscode-languageserver-types";
import { lazy } from "../../util/general-util.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SimpleType, SimpleTypeUnion } from "ts-simple-type";
import type { SimpleType, SimpleTypeUnion } from "@jackolope/ts-simple-type";
import type {
HtmlAttr,
HtmlCssPart,
Expand Down
2 changes: 1 addition & 1 deletion packages/lit-analyzer/src/lib/analyze/ts-module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setTypescriptModule as tsSimpleTypeSetTypescriptModule } from "ts-simple-type";
import { setTypescriptModule as tsSimpleTypeSetTypescriptModule } from "@jackolope/ts-simple-type";
import * as tsModuleType from "typescript";

export const tsModule: { ts: typeof tsModuleType } = { ts: tsModuleType };
Expand Down
2 changes: 1 addition & 1 deletion packages/lit-analyzer/src/lib/analyze/util/type-util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SimpleType, SimpleTypeUnion } from "ts-simple-type";
import type { SimpleType, SimpleTypeUnion } from "@jackolope/ts-simple-type";

const PRIMITIVE_STRING_ARRAY_TYPE_BRAND = Symbol("PRIMITIVE_STRING_ARRAY_TYPE");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isAssignableToSimpleTypeKind } from "ts-simple-type";
import { isAssignableToSimpleTypeKind } from "@jackolope/ts-simple-type";
import { LIT_HTML_BOOLEAN_ATTRIBUTE_MODIFIER } from "../analyze/constants.js";
import { HtmlNodeAttrAssignmentKind } from "../analyze/types/html-node/html-node-attr-assignment-types.js";
import { HtmlNodeAttrKind } from "../analyze/types/html-node/html-node-attr-types.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isAssignableToPrimitiveType, typeToString } from "ts-simple-type";
import { isAssignableToPrimitiveType, typeToString } from "@jackolope/ts-simple-type";
import { HtmlNodeAttrAssignmentKind } from "../analyze/types/html-node/html-node-attr-assignment-types.js";
import { HtmlNodeAttrKind } from "../analyze/types/html-node/html-node-attr-types.js";
import type { RuleModule } from "../analyze/types/rule/rule-module.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SimpleType, SimpleTypeKind } from "ts-simple-type";
import { isAssignableToSimpleTypeKind, isSimpleType, toSimpleType, typeToString } from "ts-simple-type";
import type { SimpleType, SimpleTypeKind } from "@jackolope/ts-simple-type";
import { isAssignableToSimpleTypeKind, isSimpleType, toSimpleType, typeToString } from "@jackolope/ts-simple-type";
import type { Node } from "typescript";
import type { LitElementPropertyConfig } from "@jackolope/web-component-analyzer";
import type { RuleModule } from "../analyze/types/rule/rule-module.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isAssignableToType } from "ts-simple-type";
import { isAssignableToType } from "@jackolope/ts-simple-type";
import { HtmlNodeAttrAssignmentKind } from "../analyze/types/html-node/html-node-attr-assignment-types.js";
import { HtmlNodeAttrKind } from "../analyze/types/html-node/html-node-attr-types.js";
import type { RuleModule } from "../analyze/types/rule/rule-module.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SimpleType } from "ts-simple-type";
import { isAssignableToSimpleTypeKind, typeToString, validateType } from "ts-simple-type";
import type { SimpleType } from "@jackolope/ts-simple-type";
import { isAssignableToSimpleTypeKind, typeToString, validateType } from "@jackolope/ts-simple-type";
import { HtmlNodeAttrKind } from "../analyze/types/html-node/html-node-attr-types.js";
import type { RuleModule } from "../analyze/types/rule/rule-module.js";
import { rangeFromHtmlNodeAttr } from "../analyze/util/range-util.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isAssignableToSimpleTypeKind, typeToString } from "ts-simple-type";
import { isAssignableToSimpleTypeKind, typeToString } from "@jackolope/ts-simple-type";
import { HtmlNodeAttrAssignmentKind } from "../analyze/types/html-node/html-node-attr-assignment-types.js";
import { HtmlNodeAttrKind } from "../analyze/types/html-node/html-node-attr-types.js";
import type { RuleModule } from "../analyze/types/rule/rule-module.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SimpleType } from "ts-simple-type";
import { toSimpleType } from "ts-simple-type";
import type { SimpleType } from "@jackolope/ts-simple-type";
import { toSimpleType } from "@jackolope/ts-simple-type";
import type { Expression } from "typescript";
import type { HtmlNodeAttrAssignment } from "../../../analyze/types/html-node/html-node-attr-assignment-types.js";
import { HtmlNodeAttrAssignmentKind } from "../../../analyze/types/html-node/html-node-attr-assignment-types.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SimpleType } from "ts-simple-type";
import type { SimpleType } from "@jackolope/ts-simple-type";

const partTypeNames: ReadonlySet<string | undefined> = new Set([
"Part",
Expand Down
Loading
Loading