Skip to content

Commit 130c576

Browse files
authored
Merge pull request #232 from vinta/fix/too-many-tsconfig
Refactor TypeScript build configuration
2 parents 6af4fe2 + 18cfd2f commit 130c576

32 files changed

+544
-273
lines changed

.claude/commands/auto-commit.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

.claude/instructions.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

.claude/settings.local.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

TODO.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# pangu.js TODO List
22

3+
**Last Updated:** June 21, 2025, 7:13 PM
4+
35
> Note: When completing a task, move it from "To Do" to "Completed" section to maintain history.
46
57
## Completed
@@ -8,47 +10,38 @@
810
- [x] Migrate all source code to TypeScript
911
- [x] Replace Webpack/Babel with Vite
1012
- [x] Replace Mocha/Chai/Karma with Vitest/Playwright
11-
- [x] Fix all failing tests (106/106 passing)
1213
- [x] Add UMD build format support
13-
- [x] Update dependencies to latest versions
14-
- [x] Pin devDependencies to exact versions
15-
- [x] Remove old test dependencies from package.json
16-
- [x] Create PRIVACY.md for Chrome extension
17-
- [x] Update CLAUDE.md with TypeScript commands
18-
- [x] Add source maps for debugging (enabled in vite.config.ts)
19-
- [x] Enable full TypeScript strict mode (noImplicitAny: true)
20-
- [x] Set up ESLint for linting
21-
- [x] Set up Prettier for formatting
22-
- [x] Add eslint-plugin-unicorn with node: prefix rule
14+
- [x] Enable full TypeScript strict mode
15+
- [x] Set up ESLint and Prettier
2316
- [x] Create `publish-package` script for version management
2417
- [x] Set up GitHub Actions CI/CD workflow
25-
- [x] Add npm publish workflow with security best practices
26-
- [x] Run ESLint and fix all node: prefix violations
18+
- [x] Refactor TypeScript configuration with separate tsconfig files for node/browser
19+
- [x] Add ES2020+ features with proper transpilation (target: ES2022)
2720

2821
## To Do
2922

3023
### High Priority
3124

3225
- [ ] Update Chrome Extension to use new TypeScript builds
26+
- Currently using old pangu.min.js v4.0.7 instead of new dist/ builds
3327
- [ ] Remove Angular.js from Chrome Extension (200KB+ savings)
28+
- Still using Angular.js 1.2.9 with jQuery 2.1.0
3429
- [ ] Rewrite popup.js and options.js in TypeScript
30+
- Both files are still plain JavaScript in browser_extensions/chrome/js/
3531

3632
### Chrome Extension Enhancement
3733

3834
- [ ] Use Vite to build Chrome Extension
35+
- No Vite config exists for extension build
3936
- [ ] Modernize UI (remove jQuery/Angular dependencies)
37+
- jQuery 2.1.0 and Angular.js 1.2.9 still in use
4038
- [ ] Add TypeScript types for Chrome Extension API
39+
- No @types/chrome package installed
4140
- [ ] Update extension icons for high DPI displays
4241

43-
### Code Quality
44-
45-
- [ ] Add pre-commit hooks for linting and testing
46-
- [ ] Add test coverage reporting
47-
4842
### Future Enhancements
4943

5044
- [ ] Implement tree-shaking optimizations
51-
- [ ] Add ES2020+ features with proper transpilation
5245
- [ ] Consider monorepo structure for better organization
5346
- [ ] Add changelog generation with standard-version
5447
- [ ] Publish to JSR (JavaScript Registry) in addition to npm

dist/browser/pangu.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/browser/pangu.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/browser/pangu.umd.d.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
import { default as pangu } from './pangu';
1+
import { default as pangu, BrowserPangu } from './pangu';
2+
declare global {
3+
interface Window {
4+
pangu: typeof pangu & {
5+
BrowserPangu: typeof BrowserPangu;
6+
};
7+
}
8+
}
29
export default pangu;

dist/browser/pangu.umd.js

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/browser/pangu.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)