@hyperfrontend/project-scope/tech/legacylegacy
Legacy-framework detectors for projects still on pre-modern stacks.
Covers AngularJS (1.x), Backbone, Ember, and jQuery. Each <framework>Detector follows the shared LegacyFrameworkDetector contract; detectLegacyFrameworks runs them all and returns the aggregate LegacyFrameworkDetection[]. Useful for migration-planning tools that need to flag projects still depending on these frameworks before recommending modernization paths.
API Reference
ƒ Functions
§function
angularJSDetector(projectPath: string, packageJson?: PackageJson): LegacyFrameworkDetection
Detect AngularJS (1.x) in project. AngularJS is the original Angular framework, distinct from Angular 2+.
Parameters
Returns
LegacyFrameworkDetectionDetection result or null if not detected
Example
Detecting AngularJS framework
const result = angularJSDetector('/path/to/project', {
dependencies: { angular: '^1.8.0', 'angular-route': '^1.8.0' },
})
// => { id: 'angularjs', name: 'AngularJS', confidence: 85, version: '1.8.0', ... }Detect Backbone.js in project.
Parameters
Returns
LegacyFrameworkDetectionDetection result or null if not detected
Example
Detecting Backbone.js framework
const result = backboneDetector('/path/to/project', {
dependencies: { backbone: '^1.4.0', underscore: '^1.13.0' },
})
// => { id: 'backbone', name: 'Backbone.js', confidence: 85, version: '1.4.0', ... }§function
detectLegacyFrameworks(projectPath: string, packageJson?: PackageJson): LegacyFrameworkDetection[]
Detect all legacy frameworks in project.
Parameters
Returns
LegacyFrameworkDetection[]Array of detected legacy frameworks, sorted by confidence
Example
Detecting legacy frameworks
const results = detectLegacyFrameworks('/path/to/project', {
dependencies: { jquery: '^3.6.0', backbone: '^1.4.0' },
})
// => [{ id: 'jquery', confidence: 80 }, { id: 'backbone', confidence: 70 }]Detect Ember.js in project.
Parameters
Returns
LegacyFrameworkDetectionDetection result or null if not detected
Example
Detecting Ember.js framework
const result = emberDetector('/path/to/project', {
dependencies: { 'ember-source': '^4.0.0' },
devDependencies: { 'ember-cli': '^4.0.0' },
})
// => { id: 'ember', name: 'Ember.js', confidence: 90, version: '4.0.0', ... }Detect jQuery in project.
Parameters
Returns
LegacyFrameworkDetectionDetection result or null if not detected
Example
Detecting jQuery library
const result = jqueryDetector('/path/to/project', {
dependencies: { jquery: '^3.6.0', 'jquery-ui': '^1.13.0' },
})
// => { id: 'jquery', name: 'jQuery', confidence: 90, version: '3.6.0', ... }◈ Interfaces
Legacy framework detection result.
● Variables
All legacy framework detectors