Skip to content

v0.0.120

Compare
Choose a tag to compare
@peterpeterparker peterpeterparker released this 14 Mar 15:18
· 173 commits to main since this release

@junobuild/functions

Breaking Changes

  • Review functions API to avoid duplication.
// Previous syntax
export const onSetDoc = defineHook({
	collections: ['demo', 'console'],
	onSetDoc: async (context: OnSetDocContext) => {
		console.log('onSetDoc');
	}
});

// New syntax
export const onSetDoc = defineHook<OnSetDocConfig>({
	collections: ['demo', 'console'],
	run: async (context) => {
		console.log('onSetDoc');
	}
});

Features

  • Use zod for hooks and assertions definitions.