Skip to content

Commit

Permalink
docs(changeset): create @vinxi/plugin-directives page
Browse files Browse the repository at this point in the history
  • Loading branch information
nksaraf committed Oct 23, 2023
1 parent 818e43d commit 5a7aed6
Show file tree
Hide file tree
Showing 19 changed files with 1,741 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/poor-glasses-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vinxi/plugin-directives": patch
---

create @vinxi/plugin-directives page
133 changes: 133 additions & 0 deletions packages/vinxi-directives/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# @vinxi/plugin-references

## 0.0.26

### Patch Changes

- 781cedd: bump to vite-5
- Updated dependencies [49e4e03]
- Updated dependencies [a009733]
- vinxi@0.0.36

## 0.0.25

### Patch Changes

- vinxi@0.0.35

## 0.0.24

### Patch Changes

- 355daea: move vinxi/path to vinxi/lib/path
- Updated dependencies [355daea]
- vinxi@0.0.34

## 0.0.23

### Patch Changes

- Updated dependencies [1dec590]
- vinxi@0.0.33

## 0.0.22

### Patch Changes

- Updated dependencies [982147a]
- vinxi@0.0.32

## 0.0.21

### Patch Changes

- 94f59aa: refactor internals to have user customizable modes
- bc82d8e: refactor vinxi entrypoints to make them simpler, better typescript
- c223ab6: use pathe everywhere
- 94f59aa: fixes
- Updated dependencies [94f59aa]
- Updated dependencies [bc82d8e]
- Updated dependencies [1d8b542]
- Updated dependencies [5bf5e03]
- Updated dependencies [4c7fd35]
- Updated dependencies [0f4b3ee]
- Updated dependencies [ad62318]
- Updated dependencies [c223ab6]
- Updated dependencies [94f59aa]
- vinxi@0.0.31

## 0.0.20

### Patch Changes

- 0f14555: changed `style` to `routes` and removed `compile` nested, flat options API
- Updated dependencies [fd06048]
- Updated dependencies [0f14555]
- Updated dependencies [82267c5]
- vinxi@0.0.30

## 0.0.19

### Patch Changes

- Updated dependencies [8058084]
- vinxi@0.0.29

## 0.0.18

### Patch Changes

- 17693dc: remove console logs
- d6305b8: start middleware API
- Updated dependencies [b934e84]
- Updated dependencies [17693dc]
- Updated dependencies [d6305b8]
- Updated dependencies [cb91c48]
- Updated dependencies [085116d]
- Updated dependencies [f1ee5b8]
- vinxi@0.0.28

## 0.0.17

### Patch Changes

- Updated dependencies [7803042]
- vinxi@0.0.27

## 0.0.16

### Patch Changes

- Updated dependencies [2b17e0d]
- vinxi@0.0.26

## 0.0.15

### Patch Changes

- Updated dependencies [552d8ca]
- vinxi@0.0.25

## 0.0.14

### Patch Changes

- 47abc3c: change "node" target to "server"
- Updated dependencies [47abc3c]
- vinxi@0.0.24

## 0.0.13

### Patch Changes

- 46f3426: bump fixes
- Updated dependencies [46f3426]
- vinxi@0.0.23

## 0.0.12

### Patch Changes

- 5834c1a: add changesets support
- Updated dependencies [5834c1a]
- vinxi@0.0.22
17 changes: 17 additions & 0 deletions packages/vinxi-directives/fixtures/shim-exports-fn.snapshot.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { createReference } from "~/runtime";

export const f1 = createReference(() => {}, "test?split=0", "default");
const f11 = createReference(() => {}, "test?split=1", "default");
export const fn2 = () => {};
export const f2 = createReference(() => {}, "test?split=2", "default");

const f3 = createReference(() => {}, "test?split=3", "default"),
f4 = function () {};
export { f3, f4 };

export const f5 = createReference(() => {}, "test?split=4", "default");
const if6 = createReference(() => {}, "test?split=5", "default");

export { if6 as f6 };
export const x1 = 1;
const x2 = 1;
37 changes: 37 additions & 0 deletions packages/vinxi-directives/fixtures/shim-exports-fn.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
export const f1 = function () {
"use runtime";
console.log("hello");
};
const f11 = function () {
"use runtime";
console.log("hello");
};
export const fn2 = () => {};
export const f2 = () => {
"use runtime";
console.log("hello");
};
const f3 = () => {
"use runtime";
console.log("hello");
},
f4 = function () {};
export { f3, f4 };

export function f5() {
"use runtime";
console.log("hello");
}
function if6() {
"use runtime";
console.log("hello");
}
export { if6 as f6 };

// export default function f7() {
// "use runtime";
// console.log("hello");
// }

export const x1 = 1;
const x2 = 1;
10 changes: 10 additions & 0 deletions packages/vinxi-directives/fixtures/shim-exports.snapshot.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { createReference } from "~/runtime";

export const f1 = createReference(() => {}, "test", "f1");
export const f2 = createReference(() => {}, "test", "f2");
export const f3 = createReference(() => {}, "test", "f3");
export const f4 = createReference(() => {}, "test", "f4");
export const f5 = createReference(() => {}, "test", "f5");
export const f6 = createReference(() => {}, "test", "f6");
export default createReference(() => {}, "test", "default");
export const x1 = createReference(() => {}, "test", "x1");
16 changes: 16 additions & 0 deletions packages/vinxi-directives/fixtures/shim-exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"use runtime";

export const f1 = function () {};
export const f2 = () => {};
const f3 = () => {},
f4 = function () {};
export { f3, f4 };

export function f5() {}
function if6() {}
export { if6 as f6 };

export default function f7() {}

export const x1 = 1;
const x2 = 1;
53 changes: 53 additions & 0 deletions packages/vinxi-directives/fixtures/wrap-exports-fn.snapshot.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { createReference } from "~/runtime";

export const f1 = createReference(
function () {
console.log("hello");
},
"test?split=0",
"default",
);
const f11 = createReference(
function () {
console.log("hello");
},
"test?split=1",
"default",
);
export const fn2 = () => {};
export const f2 = createReference(
() => {
console.log("hello");
},
"test?split=2",
"default",
);

const f3 = createReference(
() => {
console.log("hello");
},
"test?split=3",
"default",
),
f4 = function () {};
export { f3, f4 };

export const f5 = createReference(
function f5() {
console.log("hello");
},
"test?split=4",
"default",
);
const if6 = createReference(
function if6() {
console.log("hello");
},
"test?split=5",
"default",
);

export { if6 as f6 };
export const x1 = 1;
const x2 = 1;
37 changes: 37 additions & 0 deletions packages/vinxi-directives/fixtures/wrap-exports-fn.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
export const f1 = function () {
"use runtime";
console.log("hello");
};
const f11 = function () {
"use runtime";
console.log("hello");
};
export const fn2 = () => {};
export const f2 = () => {
"use runtime";
console.log("hello");
};
const f3 = () => {
"use runtime";
console.log("hello");
},
f4 = function () {};
export { f3, f4 };

export function f5() {
"use runtime";
console.log("hello");
}
function if6() {
"use runtime";
console.log("hello");
}
export { if6 as f6 };

// export default function f7() {
// "use runtime";
// console.log("hello");
// }

export const x1 = 1;
const x2 = 1;
17 changes: 17 additions & 0 deletions packages/vinxi-directives/fixtures/wrap-exports.snapshot.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { createReference } from "~/runtime";

export const f1 = createReference(function () {}, "test", "f1");
export const f2 = createReference(() => {}, "test", "f2");
const f3 = () => {},
f4 = function () {};
const f3$ref = createReference(f3, "test", "f3");
const f4$ref = createReference(f4, "test", "f4");
export { f3$ref as f3, f4$ref as f4 };
export const f5 = createReference(function f5() {}, "test", "f5");
function if6() {}
const f6$ref = createReference(if6, "test", "f6");
export { f6$ref as f6 };
export default createReference(function f7() {}, "test", "default");

export const x1 = createReference(1, "test", "x1");
const x2 = 1;
16 changes: 16 additions & 0 deletions packages/vinxi-directives/fixtures/wrap-exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"use runtime";

export const f1 = function () {};
export const f2 = () => {};
const f3 = () => {},
f4 = function () {};
export { f3, f4 };

export function f5() {}
function if6() {}
export { if6 as f6 };

export default function f7() {}

export const x1 = 1;
const x2 = 1;
2 changes: 2 additions & 0 deletions packages/vinxi-directives/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { directives } from "./plugin.js";
export { shimExportsPlugin, splitPlugin } from "./transform.js";
38 changes: 38 additions & 0 deletions packages/vinxi-directives/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "@vinxi/plugin-directives",
"version": "0.0.26",
"type": "module",
"author": "Nikhil Saraf <nsaraf98@gmail.com>",
"files": [
"*.js",
"*.d.ts"
],
"types": "./index.d.ts",
"exports": {
".": "./index.js",
"./*": "./*.js"
},
"typesVersions": {
"*": {
".": [
"./index.d.ts"
]
}
},
"devDependencies": {
"@vitest/ui": "^0.34.6",
"vinxi": "^0.0.36",
"vitest": "^0.28.5"
},
"peerDependencies": {
"vinxi": "^0.0.36"
},
"dependencies": {
"acorn": "^8.10.0",
"acorn-loose": "^8.3.0",
"acorn-typescript": "^1.4.3",
"astring": "^1.8.6",
"magicast": "^0.2.10",
"recast": "^0.23.4"
}
}
Loading

0 comments on commit 5a7aed6

Please sign in to comment.