@react-consulting/rc-kit 0.14.3 → 0.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -128,6 +128,8 @@ describe("migrateToKitPackage", () => {
|
|
|
128
128
|
devDependencies: { "@rc/kit": "link:../_rc-kit" },
|
|
129
129
|
},
|
|
130
130
|
"rc.config.json": '{ "project": "contoso-api", "kit": ">=0.10.0" }\n',
|
|
131
|
+
"vite.config.ts":
|
|
132
|
+
'import { resolveBuildCommitSha } from "./scripts/lib/build-commit-sha.ts"\n',
|
|
131
133
|
})
|
|
132
134
|
|
|
133
135
|
migrateToKitPackage({ root, kitVersion: "0.13.0" })
|
|
@@ -139,6 +141,9 @@ describe("migrateToKitPackage", () => {
|
|
|
139
141
|
expect(manifest.scripts["build:cloudflare"]).toBe(
|
|
140
142
|
"wrangler deploy --dry-run --define __RC_BUILD_SHA__:$(rc build:sha)"
|
|
141
143
|
)
|
|
144
|
+
expect(readFileSync(join(root, "vite.config.ts"), "utf8")).toBe(
|
|
145
|
+
'import { resolveBuildCommitSha } from "@react-consulting/rc-kit/build"\n'
|
|
146
|
+
)
|
|
142
147
|
})
|
|
143
148
|
|
|
144
149
|
test("moves a project from the sibling clone to the npm package", () => {
|
|
@@ -53,7 +53,7 @@ const SCRIPT_REWRITES: [RegExp, string][] = [
|
|
|
53
53
|
[/\brc op:sync\b/g, "rc secrets:pull"],
|
|
54
54
|
]
|
|
55
55
|
const BUILD_IMPORT_RE =
|
|
56
|
-
/(["'])(?:\.\.?\/)+scripts\/(?:build-commit-sha|deployed-public-env)(?:\.ts)?\1/g
|
|
56
|
+
/(["'])(?:\.\.?\/)+scripts\/(?:lib\/)?(?:build-commit-sha|deployed-public-env)(?:\.ts)?\1/g
|
|
57
57
|
const TOOL_CONFIGS = ["biome.json", "biome.jsonc", "tsconfig.json"]
|
|
58
58
|
const TOOL_IGNORE_ENTRY_RE = /"!(?:\.\/)?scripts\/[^"]+"/g
|
|
59
59
|
const SOURCE_EXTENSIONS = /\.(?:[cm]?[jt]sx?|astro|vue|svelte|jsonc)$/
|