Skip to content

feat: Modernize from CoffeeScript/Gulp to ES6/Rollup/Jest#24

Merged
nmccready merged 2 commits intomasterfrom
modernize/es6-migration
Feb 15, 2026
Merged

feat: Modernize from CoffeeScript/Gulp to ES6/Rollup/Jest#24
nmccready merged 2 commits intomasterfrom
modernize/es6-migration

Conversation

@nmccready
Copy link
Collaborator

Summary

Complete modernization of angular-simple-logger while preserving backward compatibility.

Changes

Source Code

  • CoffeeScript → ES6 JavaScript — all source files converted
  • src/logger.js — Logger class with level filtering, spawn support
  • src/module.js — Angular module registration (nemLogging)
  • src/index.js — Full version with debug integration
  • src/index.light.js — Light version without debug dependency

Build System

  • Gulp → Rollup — modern bundler with tree-shaking
  • Output: UMD + ESM bundles for both full and light versions
  • Minified builds included
  • dist/ removed from git (built on publish)

Tests

  • Karma/Jasmine → Jest (62 tests passing)
  • Unit tests for Logger class (level filtering, doLog, spawn, validation)
  • Integration tests with angular-mocks (service, provider, decorator)
  • Debug namespace tests (spawn with namespace, enable/disable)
  • Array.prototype extension safety test

CI/CD

  • GitHub Actions replacing Travis CI
    • tests.yml — Node 18/20/22 matrix
    • publish.yml — npm publish with OIDC provenance on release
    • release.yml — manual workflow dispatch for version bumps

Package

  • debug upgraded to v4 (from v2)
  • angular moved to peerDependencies
  • Modern exports field with subpath for light version
  • module field for ESM bundlers

Removed

  • Travis CI, Bower, CoffeeScript tooling, Karma, PhantomJS
  • Gulp and all gulp tasks
  • Old dist files from git

What is NOT changed

  • Public API: nemLogging module name, nemSimpleLogger, nemDebug
  • AngularJS 1.x target (not upgrading to Angular 2+)
  • Log levels and filtering behavior
  • Spawn behavior (both object and namespace modes)
  • Decorator pattern

Migration

# Before (bower)
bower install angular-simple-logger

# After (npm)
npm install angular-simple-logger

Import paths:

// Full version (with debug)
import "angular-simple-logger";
// or
require("angular-simple-logger");

// Light version (no debug)
import "angular-simple-logger/light";

- Convert all CoffeeScript source to ES6 JavaScript
- Replace Gulp build system with Rollup (UMD + ESM bundles)
- Replace Karma/Jasmine tests with Jest (62 tests passing)
- Add GitHub Actions workflows (tests, publish with OIDC, release)
- Remove Travis CI, Bower, CoffeeScript tooling
- Upgrade debug dependency to v4
- Update package.json with modern fields (module, exports)
- Move angular to peerDependencies
- Update README with modern usage examples and badges
- Keep backward-compatible public API (nemLogging module, nemSimpleLogger, nemDebug)

BREAKING: Requires npm install (no more bower). Bundle output paths changed.
@nmccready nmccready merged commit 7f09540 into master Feb 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants