Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .changeset/mighty-geckos-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"jsrepo": patch
---

Use `vue/compiler-sfc` instead of `@vue/compiler-sfc` to avoid compiler issues.
18 changes: 13 additions & 5 deletions examples/registry/blocks/vue/Test.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<script setup lang="ts">
import type { PropType } from './type';
import {
AccordionRoot,
type AccordionRootEmits,
type AccordionRootProps,
useForwardPropsEmits,
} from 'radix-vue'

const props = defineProps<PropType>();
const props = defineProps<AccordionRootProps>()
const emits = defineEmits<AccordionRootEmits>()

const forwarded = useForwardPropsEmits(props, emits)
</script>

<template>
<div>
{{ value }}
</div>
<AccordionRoot v-bind="forwarded">
<slot />
</AccordionRoot>
</template>
10 changes: 4 additions & 6 deletions examples/registry/jsrepo-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,11 @@
"files": [
"Test.vue"
],
"localDependencies": [
"vue/type"
"localDependencies": [],
"_imports_": {},
"dependencies": [
"radix-vue@^1.9.12"
],
"_imports_": {
"./type": "{{vue/type}}"
},
"dependencies": [],
"devDependencies": []
},
{
Expand Down
4 changes: 3 additions & 1 deletion examples/registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
"license": "ISC",
"devDependencies": {
"jsrepo": "^1.2.4",
"typescript": "^5.7.2",
"vitest": "^2.1.5"
},
"dependencies": {
"chalk": "^5.3.0"
"chalk": "^5.3.0",
"radix-vue": "^1.9.12"
}
}
24 changes: 6 additions & 18 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,12 @@
"bugs": {
"url": "https://github.com/ieedan/jsrepo/issues"
},
"keywords": [
"repo",
"cli",
"svelte",
"vue",
"typescript",
"javascript",
"shadcn",
"registry"
],
"keywords": ["repo", "cli", "svelte", "vue", "typescript", "javascript", "shadcn", "registry"],
"type": "module",
"exports": "./dist/index.js",
"bin": "./dist/index.js",
"main": "./dist/index.js",
"files": [
"./schemas/**/*",
"dist"
],
"files": ["./schemas/**/*", "dist"],
"scripts": {
"start": "tsup --silent && node ./dist/index.js",
"build": "tsup",
Expand All @@ -57,7 +45,6 @@
"@biomejs/js-api": "^0.7.1",
"@biomejs/wasm-nodejs": "^1.9.4",
"@clack/prompts": "^0.9.0",
"@vue/compiler-sfc": "^3.5.13",
"ansi-regex": "^6.1.0",
"chalk": "^5.4.1",
"commander": "^13.0.0",
Expand All @@ -74,9 +61,10 @@
"pathe": "^2.0.0",
"prettier": "^3.4.2",
"semver": "^7.6.3",
"svelte": "^5.16.1",
"svelte": "^5.16.2",
"ts-morph": "^25.0.0",
"valibot": "1.0.0-beta.9",
"validate-npm-package-name": "^6.0.0"
"valibot": "1.0.0-beta.10",
"validate-npm-package-name": "^6.0.0",
"vue": "^3.5.13"
}
}
7 changes: 1 addition & 6 deletions packages/cli/src/utils/language-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import fs from 'node:fs';
import { builtinModules } from 'node:module';
import { Biome, Distribution } from '@biomejs/js-api';
import type { PartialConfiguration } from '@biomejs/wasm-nodejs';
import * as v from '@vue/compiler-sfc';
import color from 'chalk';
import { type Node, walk } from 'estree-walker';
import { type TsConfigResult, createPathsMatcher, getTsconfig } from 'get-tsconfig';
Expand All @@ -12,6 +11,7 @@ import * as prettier from 'prettier';
import * as sv from 'svelte/compiler';
import { Project } from 'ts-morph';
import validatePackageName from 'validate-npm-package-name';
import * as v from 'vue/compiler-sfc';
import * as ascii from './ascii';
import { Err, Ok, type Result } from './blocks/types/result';
import * as lines from './blocks/utils/lines';
Expand Down Expand Up @@ -392,11 +392,6 @@ const vue: Lang = {
try {
compiled = v.compileScript(parsed.descriptor, {
id: 'shut-it',
fs: {
fileExists: fs.existsSync,
readFile: (file) => fs.readFileSync(file).toString(),
realpath: fs.realpathSync,
},
}); // you need this id to remove a warning
} catch (err) {
return Err(`Compile error: ${err}`);
Expand Down
Loading
Loading