Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: Stop inspecting UNDERTAKER_TIME_RESOLUTION environment variable #98

Merged
merged 1 commit into from
Sep 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,12 @@ should probably be re-run from scratch to get into a good state again.

The timestamp is always given in millisecond but the time resolution can be
rounded using the `precision` parameter. The use case is to be able to compare a build time
to a file time attribute. On node v0.10 or with file system like HFS or FAT,
`fs.stat` time attributes like `mtime` precision is one second.
to a file time attribute.

Assuming `undertakerInst.lastRun('someTask')` returns `1426000001111`,
`undertakerInst.lastRun('someTask', 1000)` returns `1426000001000`.

The default time resolution is `1000` on node v0.10, `0` on node 0.11+ but
it can be overwritten using `UNDERTAKER_TIME_RESOLUTION` environment variable.
The default time resolution is `1`.

## Custom Registries

Expand Down
4 changes: 0 additions & 4 deletions lib/last-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ var retrieveLastRun = require('last-run');
var metadata = require('./helpers/metadata');

function lastRun(task, timeResolution) {
if (timeResolution == null) {
timeResolution = process.env.UNDERTAKER_TIME_RESOLUTION;
}

var fn = task;
if (typeof task === 'string') {
fn = this._getTask(task);
Expand Down