Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 18, 2026

Adds MIT license headers to all 275 TypeScript, JavaScript, and Vue source files across the monorepo.

Changes

  • Script: Created scripts/add-license-headers.mjs to automate header insertion

    • Recursively processes .ts, .tsx, .js, .jsx, .vue files
    • Excludes node_modules, dist, build, .git, coverage
    • Detects existing headers in first 10 lines to prevent duplicates
    • Idempotent: safe to re-run on any codebase state
  • Headers: Applied to all source files across packages, examples, and tooling

    • Positioned before all imports and code
    • Format: 8-line JSDoc-style comment with copyright notice and MIT license reference

Header Format

/**
 * ObjectUI
 * Copyright (c) 2024-present ObjectStack Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

Usage

Run node scripts/add-license-headers.mjs to add headers to new files.

Original prompt

我需要给我的开源项目 ObjectUI 的所有源代码文件添加 MIT 许可协议的头部注释。

请编写一个 Node.js 脚本(或者直接修改文件,如果你有权限)来完成以下任务:

  1. 目标文件:递归遍历项目中所有的 .ts, .js, .tsx, .jsx, .vue 文件。
  2. 排除目录:严格排除 node_modules, dist, build, .git, coverage 目录。
  3. 防止重复:读取每个文件,如果文件顶部前 10 行内已经包含 "Copyright" 或 "License" 关键词,则跳过该文件,不要重复添加。
  4. 插入位置:注释必须插在文件的最顶端(在所有的 import 语句之前)。
  5. 注释内容模板
    /**
     * ObjectUI
     * Copyright (c) 2024-present ObjectStack Inc.
     *
     * This source code is licensed under the MIT license found in the
     * LICENSE file in the root directory of this source tree.
     */

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Jan 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
objectui-docs Error Error Jan 18, 2026 5:25am

@github-actions
Copy link

📦 Bundle Size Report

Package Size Gzipped
components (index.js) 1478.63KB 344.66KB
core (index.js) 0.46KB 0.26KB
data-objectql (ObjectQLDataSource.js) 12.09KB 2.84KB
data-objectql (hooks.js) 5.62KB 1.43KB
data-objectql (index.js) 0.62KB 0.36KB
designer (index.js) 1.46KB 0.51KB
plugin-charts (AdvancedChartImpl-C8-XIe1b.js) 74.89KB 15.82KB
plugin-charts (BarChart-CRc8MAtI.js) 551.60KB 127.51KB
plugin-charts (ChartImpl-CRaHSWhr.js) 3.17KB 1.10KB
plugin-charts (index-ClQPzSfD.js) 24.05KB 7.05KB
plugin-charts (index.js) 0.21KB 0.16KB
plugin-editor (MonacoImpl-BSiaJCGx.js) 18.15KB 5.59KB
plugin-editor (index-Bx39x2XN.js) 21.72KB 6.53KB
plugin-editor (index.js) 0.19KB 0.15KB
plugin-kanban (KanbanImpl-mGLdSHcd.js) 76.50KB 20.46KB
plugin-kanban (index-i_5clVsp.js) 23.51KB 6.90KB
plugin-kanban (index.js) 0.18KB 0.15KB
plugin-markdown (MarkdownImpl-Dp8rFxgw.js) 256.79KB 64.50KB
plugin-markdown (index-DDihmVdn.js) 21.25KB 6.37KB
plugin-markdown (index.js) 0.19KB 0.15KB
react (SchemaRenderer.js) 1.44KB 0.73KB
react (index.js) 0.32KB 0.23KB
react (index.test.js) 0.34KB 0.26KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 0.20KB 0.18KB
types (base.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data.js) 0.20KB 0.18KB
types (disclosure.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (index.js) 0.34KB 0.25KB
types (layout.js) 0.20KB 0.18KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (registry.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@github-actions
Copy link

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

@huangyiirene huangyiirene marked this pull request as ready for review January 18, 2026 05:28
@huangyiirene huangyiirene merged commit 43cdc3d into main Jan 18, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants