diff --git a/packages/cli/package.json b/packages/cli/package.json index 9db12381b7..d340fa89fb 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -24,7 +24,6 @@ }, "files": [ "dist", - "templates", "README.md", "CHANGELOG.md", "LICENSE" diff --git a/packages/create-plugin/package.json b/packages/create-plugin/package.json index d13a6ddbb0..1162139f89 100644 --- a/packages/create-plugin/package.json +++ b/packages/create-plugin/package.json @@ -9,7 +9,6 @@ }, "files": [ "dist", - "templates", "README.md", "CHANGELOG.md", "LICENSE" diff --git a/packages/create-plugin/src/index.ts b/packages/create-plugin/src/index.ts index 16031e6c6b..3f532d9d48 100644 --- a/packages/create-plugin/src/index.ts +++ b/packages/create-plugin/src/index.ts @@ -12,10 +12,6 @@ import chalk from 'chalk'; import prompts from 'prompts'; import * as path from 'path'; import fs from 'fs-extra'; -import { fileURLToPath } from 'url'; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); const program = new Command(); @@ -111,9 +107,6 @@ async function createPlugin(pluginName?: string, options: PluginOptions = {}) { fs.mkdirpSync(targetDir); fs.mkdirpSync(path.join(targetDir, 'src')); - // Get template directory - const templateDir = path.join(__dirname, '..', 'templates', 'plugin'); - // Template variables const vars = { PACKAGE_NAME: `@object-ui/${fullPackageName}`, diff --git a/scripts/__tests__/package-files-exist.test.ts b/scripts/__tests__/package-files-exist.test.ts index f4bf9e708e..e593bad681 100644 --- a/scripts/__tests__/package-files-exist.test.ts +++ b/scripts/__tests__/package-files-exist.test.ts @@ -67,22 +67,17 @@ const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../ * can only shrink. Fix one by deleting the stale `files` entry from the * package's `package.json` and deleting its line here. * - * Both current entries are vestigial declarations, measured on - * main@dae1ac41e: neither `templates` directory exists on disk, neither has - * EVER existed in this repo's git history (an all-branch `git log - * --diff-filter=A` over both paths returns nothing), and no build step or - * workflow creates one. Both packages inline their templates instead — - * `@object-ui/cli` as an - * object literal in `src/commands/init.ts`, and `@object-ui/create-plugin` by - * constructing the generated `package.json` in code, leaving - * `src/index.ts`'s `templateDir` assigned and never read. So nothing is broken - * for a user today; the manifests simply state something untrue, which is the - * defect objectui#3663 is about. + * Currently empty, which is the intended resting state — the ratchet still + * fails on any NEW violation. It landed carrying two entries measured on + * main@dae1ac41e, `packages/cli/templates` and + * `packages/create-plugin/templates`: vestigial declarations for directories + * that never existed on disk, never existed anywhere in this repo's git + * history, and that no build step or workflow creates. Both packages inline + * their templates instead. objectui#3665 banked both by deleting the two + * `files` entries, and deleting a declaration retires a baseline line exactly + * as creating the file would. */ -const KNOWN_MISSING: Record = { - 'packages/cli/templates': { issue: 'objectui#3665' }, - 'packages/create-plugin/templates': { issue: 'objectui#3665' }, -}; +const KNOWN_MISSING: Record = {}; interface WorkspacePackage { name: string;