Preceptor-Core is a foundational JavaScript library designed to provide shared components for the Preceptor test runner and aggregator ecosystem. It exposes a `Base` object intended for inheritance, featuring an `extend` method that supports a `__super` call mechanism for methods, mimicking classical inheritance patterns. Additionally, it offers a `utils` module with common utility functions like `deepExtend` and `combine`, and a centralized `log` management system. Currently at version 0.10.1, the package appears to be unmaintained, with its last update several years ago. Its primary use case was as an internal dependency for the Preceptor project. As such, it does not have an active release cadence and is likely incompatible with modern Node.js versions or ES module environments.
npm install preceptor-coreVerified import paths — ran on the pinned version, not inferred.
Demonstrates installing, requiring, and using `preceptor-core`'s `Base` object for inheritance with its `extend` method, including `__super` calls, and an example of `deepExtend` from the `utils` module.
Avoid using this package in new projects. For existing projects, consider migrating to a modern, actively maintained testing framework or utility library. If migration is not an option, you may be restricted to older Node.js runtime versions where the package remains compatible.
Ensure your project is configured for CommonJS or use a CommonJS `require()` call within an ESM context (if supported by your bundler/runtime) to consume this package. E.g., `const core = require('preceptor-core');`Create a `preceptor-core.d.ts` file in your project or install community types if available (unlikely for an abandoned package). Example minimal declaration: `declare module 'preceptor-core' { export const Base: any; export const utils: any; export const log: any; }`For new code, adopt standard ES6+ class syntax. If maintaining existing code that uses this, understand its limitations and potential for confusion compared to modern patterns.
Modify your code to use the CommonJS `require()` syntax: `const core = require('preceptor-core');`. If your project is primarily ESM, you might need to use dynamic `import()` or configure your build system to handle CJS dependencies.Access `Base` and `utils` as properties of the main CommonJS module object: `const core = require('preceptor-core'); const Base = core.Base; const utils = core.utils;`Ensure the package is correctly installed by running `npm install preceptor-core`. Verify that `node_modules` is in your project root or correctly configured in your module resolution paths.
No dependency data recorded yet.