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

chore(js): Bump dotprompt for breaking classname change. #1665

Merged
merged 2 commits into from
Jan 26, 2025
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
2 changes: 1 addition & 1 deletion js/ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"node-fetch": "^3.3.2",
"partial-json": "^0.1.7",
"uuid": "^10.0.0",
"dotprompt": "^1.0.0-dev || ^1"
"dotprompt": "^1.0.0-dev.3 || ^1"
},
"devDependencies": {
"npm-run-all": "^4.1.5",
Expand Down
2 changes: 1 addition & 1 deletion js/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"json-schema": "^0.4.0",
"zod": "^3.23.8",
"zod-to-json-schema": "^3.22.4",
"dotprompt": "^1.0.0-dev || ^1"
"dotprompt": "^1.0.0-dev.3 || ^1"
},
"devDependencies": {
"@types/express": "^4.17.21",
Expand Down
4 changes: 2 additions & 2 deletions js/core/src/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import { DotpromptEnvironment } from 'dotprompt';
import { Dotprompt } from 'dotprompt';
import { AsyncLocalStorage } from 'node:async_hooks';
import * as z from 'zod';
import { Action } from './action.js';
Expand Down Expand Up @@ -71,7 +71,7 @@ export class Registry {
private allPluginsInitialized = false;

readonly asyncStore = new AsyncStore();
readonly dotprompt = new DotpromptEnvironment({
readonly dotprompt = new Dotprompt({
schemaResolver: async (name) => {
const resolvedSchema = await this.lookupSchema(name);
if (!resolvedSchema) {
Expand Down
2 changes: 1 addition & 1 deletion js/plugins/evaluators/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"compute-cosine-similarity": "^1.1.0",
"node-fetch": "^3.3.2",
"path": "^0.12.7",
"dotprompt": "^1.0.0-dev || ^1"
"dotprompt": "^1.0.0-dev.3 || ^1"
},
"peerDependencies": {
"genkit": "workspace:*"
Expand Down
4 changes: 2 additions & 2 deletions js/plugins/evaluators/src/metrics/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* limitations under the License.
*/

import { dotprompt, PromptFunction } from 'dotprompt';
import { Dotprompt, PromptFunction } from 'dotprompt';
import { readFileSync } from 'fs';

/** Helper function to get current directory, isolated in a separate file to work with ESM */
export function getDirName() {
return __dirname;
}

const dp = dotprompt();
const dp = new Dotprompt();

export function loadPromptFile(path: string): Promise<PromptFunction> {
return dp.compile(dp.parse(readFileSync(path, 'utf8')));
Expand Down
18 changes: 9 additions & 9 deletions js/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading