Skip to content
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
1 change: 0 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
},
"files": [
"dist",
"templates",
"README.md",
"CHANGELOG.md",
"LICENSE"
Expand Down
1 change: 0 additions & 1 deletion packages/create-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
},
"files": [
"dist",
"templates",
"README.md",
"CHANGELOG.md",
"LICENSE"
Expand Down
7 changes: 0 additions & 7 deletions packages/create-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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}`,
Expand Down
25 changes: 10 additions & 15 deletions scripts/__tests__/package-files-exist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, { issue: string }> = {
'packages/cli/templates': { issue: 'objectui#3665' },
'packages/create-plugin/templates': { issue: 'objectui#3665' },
};
const KNOWN_MISSING: Record<string, { issue: string }> = {};

interface WorkspacePackage {
name: string;
Expand Down
Loading