Releases: rphlmr/drizzle-lab
0.8.5
What's Changed
Missed what happened in 0.8.0?
https://github.com/rphlmr/drizzle-run/releases/tag/v0.8.2
Fixes
relation "xxx" already exists
is now fixed
0.8.3
What's Changed
PGlite 0.2.3
You can now use vector in your playgrounds!
🔥 Missed what happened in 0.8.0?
https://github.com/rphlmr/drizzle-run/releases/tag/v0.8.2
Breaking changes
PGlite 0.1.5 to 0.2.3
There is a breaking change in the internal schema of PGlite for IndexedDB.
Your local playgrounds have been migrated. If data has been lost, check in local storage, there is a backup.
0.8.2
What's Changed
Hey 👋 massive new things for this release!
Seed tab
You can now put all your seed data in this tab.
It is included when you share your playground and it will run just before executing your code. 🚀
New super fast code runner
I have written a new custom code runner. Your playgrounds now execute instantly 🚀
Works on all browsers (including Safari)
Outputs now display which file produced them.
Previous outputs of a run are now hidden. You can still view them by selecting previous run results. (#3)
It implements a fork of Drizzle Kit. Feel free to open an issue if something is not working.
Visualize your playgrounds
Drizzle Visualizer has been added to all playgrounds.
Explore 🔭
You can now view all shared playgrounds and search by keyword or dialect.
Convert
Experimental Drizzle to SQL and SQL to Drizzle.
Write the code, get instant conversion.
Again, it is based on a fork of Drizzle Kit.
Resize!
You can now resize the playground workspace as you want!
#2
Breaking changes
Faker has been removed
I have removed Faker ($.faker
) and replaced it with a custom ultra-light one: $.random
/**
* Generates a random UUID
*/
uuid() {
return crypto.randomUUID();
},
/**
* Generates a random integer between min and max
* @param min The minimum value (default: -10_000)
* @param max The maximum value (default: 10_000)
*/
integer(min = -10_000, max = 10_000) {
return Math.floor(Math.random() * (max - min + 1)) + min;
},
/**
* Generates a sequence of integers from 0 to length - 1
* @param length The length of the array
*
* @example
* ```
* $.random.sequence(5) // [0, 1, 2, 3, 4]
* ```
*/
sequence(length: number) {
return Array.from({ length }, (_, i) => i);
},
/**
* Generates a random decimal between min and max
* @param min The minimum value (default: -10_000)
* @param max The maximum value (default: 10_000)
*/
decimal(min = -10_000, max = 10_000) {
return (Math.random() * (max - min) + min).toFixed(2);
},
/**
* Generates a random string of lorem ipsum words
* @param wordCount The number of words to generate (default: 5)
*/
lorem(wordCount: number = 5): string {
return Array.from({ length: wordCount }, () => loremWords[Math.floor(Math.random() * loremWords.length)]).join(" ");
},
/**
* Generates a random first name
*/
firstName(): string {
return firstNames[Math.floor(Math.random() * firstNames.length)];
},
/**
* Generates a random last name
*/
lastName(): string {
return lastNames[Math.floor(Math.random() * lastNames.length)];
},
/**
* Generates a random full name
*/
fullName(): string {
return `${this.firstName()} ${this.lastName()}`;
},
/**
* Generates a random email address
*/
email(): string {
const chars = "abcdefghijklmnopqrstuvwxyz";
const length = this.integer(5, 10);
let result = "";
for (let i = 0; i < length; i++) {
result += chars.charAt(Math.floor(Math.random() * chars.length));
}
const number = this.integer(0, 999);
return `${result}${number}@email.com`;
},
/**
* Generates a random date between start and end
* @param start The start date (default: 1970-01-01)
* @param end The end date (default: current date)
*/
date(start: Date = new Date(1970, 0, 1), end: Date = new Date()): Date {
return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()));
},
/**
* Generates a random URL
*/
url(): string {
const domainName = this.lorem(1).toLowerCase();
return `https://www.${domainName}.com`;
},
/**
* Generates a random image URL
*/
imageUrl(): string {
const id = this.integer(0, 99);
return `https://picsum.photos/id/${id}/200/200`;
},
/**
* Generates an array
* @param length The length of the array
* @param generator The generator function
*
* @example
* ```
* $.random.array(4, $.random.date)
* ```
*/
array<T extends () => unknown>(length: number, generator: T) {
return Array.from({ length }, () => generator()) as ReturnType<T>[];
},
0.7.1
Full Changelog: https://github.com/rphlmr/drizzle-run/commits/v0.7.1
0.6.1
0.6.0
What's Changed
Hey 👋 some new things for this release!
Drizzle schema visualizer (wip)
(#21 ) You can now visualize your schema and export it as a PNG.
👉 Try it!
Fixes
- (#12) Memory leak in @vercel/og should be patched
diff --git a/node_modules/@vercel/og/dist/index.node.js b/node_modules/@vercel/og/dist/index.node.js
index c92983c..ac1bb7c 100644
--- a/node_modules/@vercel/og/dist/index.node.js
+++ b/node_modules/@vercel/og/dist/index.node.js
@@ -18786,7 +18786,11 @@ async function render(satori2, resvg, opts, defaultFonts, element) {
value: options.width
}
});
- return resvgJS.render().asPng();
+ const pngData = resvgJS.render();
+ const pngBuffer = pngData.asPng();
+ pngData.free();
+ resvgJS.free();
+ return pngBuffer;
}
// src/figma/index.tsx
0.5.0
What's Changed
Hey 👋 some new things for this release!
Goodies in Schema
(#20) You can now use $.faker
for $default
and $defaultFn
name: text("name")
.notNull()
.$defaultFn(() => $.faker.person.lastName())
New Drizzle extensions
drizzle-zod
and drizzle-valibot
are now available in all playgrounds (#16)
UI reworks
Playgrounds list
You can now identify which playground is shared (you can filter on the keyword shared
)
Share button
The share button has been reworked to easily reflect its status
Publish button (shared playgrounds)
The publish button has been reworked to draw your attention to the fact that your shared playground has some pending changes that have not been pushed.
Discard local changes (shared playgrounds)
You can now discard local changes that have not been pushed and revert to the server version.
Catch playground execution error
Some users can face cryptic errors when they miss some awaits on async function calls.
Now we try to help you.
New formatter
The default formatter has been replaced with prettier