Skip to content

Commit a18cbb1

Browse files
Aiinfo diffcache (#110)
* add changelog to output * add clearCache utility * update cache * add writeChangelog util * ignore package.json in biome lint * @instructure.ai/[email protected] * fix lint issues * @instructure.ai/[email protected] * use vite-node/loader * [email protected] * use loader as an export * [email protected] * use custom loader * [email protected] * quote loader * use correct path * [email protected] * proper quotes * use nextLoad * use register instead of experimentalLoader * --no-git-checks b/c we're building here! * [email protected] * [email protected] * proper quoting * [email protected] * async import * [email protected] * move register to loader script * [email protected] * Update scripts/loader.mjs Co-authored-by: Copilot <[email protected]> * proper release folder * [email protected] * use dirname for loader --------- Co-authored-by: Copilot <[email protected]>
1 parent f51e538 commit a18cbb1

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

.github/workflows/release-package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,25 +94,25 @@ jobs:
9494
PRIVATE=$(jq -r '.private' "$JSON_PATH")
9595
if [ "$ACCESS_PUBLIC" = "public" ] && [ "$PRIVATE" != "true" ]; then
9696
echo "Publishing $PKG_NAME as public..."
97-
pnpm publish ./dist/*.tgz --access public --no-git-checks
97+
pnpm publish ./packages/$PKG_NAME/dist/*.tgz --access public --no-git-checks
9898
elif [ "$PRIVATE" = "true" ]; then
9999
echo "Skipping publish for $PKG_NAME because it is marked private in package.json."
100100
elif [ -n "$ACCESS_PUBLIC" ] && [ "$ACCESS_PUBLIC" != "public" ]; then
101101
echo "Skipping publish for $PKG_NAME because publishConfig.access is set to '$ACCESS_PUBLIC' (not public)."
102102
else
103103
echo "Publishing $PKG_NAME without --access public..."
104-
pnpm publish ./dist/*.tgz --no-git-checks
104+
pnpm publish ./packages/$PKG_NAME/dist/*.tgz --no-git-checks
105105
fi
106106
else
107107
echo "package.json not found for $PKG_NAME in packages or apps, publishing without access check."
108-
pnpm publish ./dist/*.tgz --no-git-checks
108+
pnpm publish ./packages/$PKG_NAME/dist/*.tgz --no-git-checks
109109
fi
110110
fi
111111
112112
# Create GitHub release using gh CLI
113113
if [ "$PKG_NAME" = "shared-configs" ]; then
114114
gh release create "$TAG" --title "$TAG" --generate-notes
115115
else
116-
gh release create "$TAG" ./dist/*.tgz --title "$TAG" --generate-notes
116+
gh release create "$TAG" ./packages/$PKG_NAME/dist/*.tgz --title "$TAG" --generate-notes
117117
fi
118118
done

packages/aiinfo/cache/checksum.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"canvasdiscussionsummaries": "8dea644532ad2b211f6c5bca6bfeebe3a79f0286b2f0a8ba2f44fda2903d32e0",
77
"canvasgradingassistance": "edb6de555dfc2e53ad80cba3f893dd929af293de53642c9a57a8f94f4374cffb",
88
"canvasinboxtranslation": "83554f0eb098ac592eedf73cdccf04e3e570ca670682e6e96719239075b3a545",
9+
"csv": "d781584823e37c17452687527d2fa3fb57d11f4f22c8af74b1825ebf8c927bc1",
910
"discussioninsights": "bf8f800481a6a884bf573692903d4ffdcb2842d33da5d4ee4f3c4d349f53dc11",
1011
"igniteagent": "422effb260b4e53ba74b387832f7d1d835824de58645c1c28ee39620f6c5334e",
1112
"rubricgenerator": "c462f99c082872bcdbd49d5f5ccf25dc97134e30d1bd90b43ff8e056e2d22640",

packages/aiinfo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@
4747
"sideEffects": false,
4848
"type": "module",
4949
"types": "./dist/index.d.ts",
50-
"version": "1.2.9"
50+
"version": "1.2.10"
5151
}

scripts/loader.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { readFile } from "node:fs/promises";
22
import { register } from "node:module";
3-
import { extname } from "node:path";
3+
import { dirname, extname } from "node:path";
44
import { fileURLToPath, pathToFileURL } from "node:url";
55
import { transformWithEsbuild } from "vite";
66

7-
const mtsExtensions = new Set([".ts", ".mts", ".cts", ".tsx"]);
7+
// Use the directory containing loader.mjs as the context
8+
const loaderDir = dirname(fileURLToPath(import.meta.url));
9+
register(new URL(import.meta.url).pathname, pathToFileURL(loaderDir));
810

9-
register(fileURLToPath(import.meta.url), pathToFileURL("./"));
11+
const mtsExtensions = new Set([".ts", ".mts", ".cts", ".tsx"]);
1012

1113
export async function resolve(specifier, context, nextResolve) {
1214
const resolved = await nextResolve(specifier, context, nextResolve);

0 commit comments

Comments
 (0)