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

refactor: use lit observers #3074

Merged
merged 7 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
1 change: 1 addition & 0 deletions src/elements-experimental/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@sbb-esta/lyne-elements": "0.0.0-PLACEHOLDER"
},
"dependencies": {
"@lit-labs/observers": "0.0.0-LITOBSERVERS",
jeripeierSBB marked this conversation as resolved.
Show resolved Hide resolved
"lit": "0.0.0-LIT"
},
"publishConfig": {
Expand Down
1 change: 1 addition & 0 deletions src/elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"type": "module",
"customElements": "custom-elements.json",
"dependencies": {
"@lit-labs/observers": "0.0.0-LITOBSERVERS",
"lit": "0.0.0-LIT"
},
"publishConfig": {
Expand Down
5 changes: 4 additions & 1 deletion tools/vite/package-json-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export function packageJsonTemplate(
const packageJsonTemplatePath = options.templatePath ?? './package.json';
const rootPackageJson = JSON.parse(readFileSync(new URL(rootPackageJsonPath, root), 'utf8'));
const litMajorVersion = +rootPackageJson.dependencies.lit.match(/\d+/);
const litObserversMajorVersion =
+rootPackageJson.devDependencies['@lit-labs/observers'].match(/\d+/);
const reactMajorVersion = +rootPackageJson.devDependencies.react.match(/\d+/);
const litReactMajorVersion = +rootPackageJson.devDependencies['@lit/react'].match(/\d+/);
const packageJsonTemplate = readFileSync(
Expand All @@ -37,7 +39,8 @@ export function packageJsonTemplate(
.replaceAll('0.0.0-PLACEHOLDER', rootPackageJson.version)
.replaceAll('0.0.0-LITREACT', `^${litReactMajorVersion}.0.0`)
.replaceAll('0.0.0-REACT', `^${reactMajorVersion}.0.0`)
.replaceAll('0.0.0-LIT', `^${litMajorVersion}.0.0`);
.replaceAll('0.0.0-LIT', `^${litMajorVersion}.0.0`)
.replaceAll('0.0.0-LITOBSERVERS', `^${litObserversMajorVersion}.0.0`);
const packageJson = JSON.parse(packageJsonContent);
for (const key of ['author', 'license', 'repository', 'bugs']) {
packageJson[key] = rootPackageJson[key];
Expand Down
Loading