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

Add support for time-traveling installs. #90

Merged
merged 1 commit into from
Feb 19, 2019
Merged

Conversation

zkat
Copy link
Contributor

@zkat zkat commented Oct 31, 2018

No description provided.

@zkat zkat requested a review from a team as a code owner October 31, 2018 03:14
@zkat zkat changed the base branch from latest to zkat/registry-fetch-replacement October 31, 2018 03:15
@zkat zkat changed the base branch from zkat/registry-fetch-replacement to latest October 31, 2018 03:15
@zkat zkat changed the base branch from latest to zkat/registry-fetch-replacement October 31, 2018 03:16
@@ -350,6 +350,21 @@ commands, eg `dist-tags`, `owner`, etc.

The command to run for `npm edit` or `npm config edit`.

### enjoy-by
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned on Twitter, this does also need a more straightforward name, especially for non-English speakers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I forgot to push the commit. I aliased it to --before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I almost did --published-by, but after seeing it, realized it looked like it wanted a maintainer name, not a timestamp.

lib/install.js Outdated
@@ -703,8 +703,25 @@ Installer.prototype.cloneCurrentTreeToIdealTree = function (cb) {
validate('F', arguments)
log.silly('install', 'cloneCurrentTreeToIdealTree')

this.idealTree = copyTree(this.currentTree)
this.idealTree.warnings = []
if (npm.config.get('enjoy-by')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does have potentially interesting interactions with lock files, which is to say, I'm not sure it does anything in the presence of a valid lock file. We should probably warn in that scenario, as otherwise we're setting up a foot gun.

@Grawl
Copy link

Grawl commented Nov 8, 2018

just like npm-time-machine, awesome!

just tried ntm on youknowriad/standalone-gutenberg. Wordpress/gutenberg was no version, and ntm return null for it :\ I expected 9ebb918176c1efd0c41561d67ea3273bae5d3d6a instead, the last master commit on 2018-03-19 in repo.

@zkat zkat force-pushed the zkat/registry-fetch-replacement branch 4 times, most recently from faa224c to fcdbeae Compare November 27, 2018 19:54
@zkat zkat force-pushed the zkat/registry-fetch-replacement branch 6 times, most recently from 6e607fe to 813905c Compare December 5, 2018 21:23
@zkat zkat changed the base branch from zkat/registry-fetch-replacement to release-next January 28, 2019 22:50
@zkat zkat force-pushed the zkat/enjoy-by branch 3 times, most recently from 27bcbe4 to 749dd8d Compare February 13, 2019 22:14
@zkat zkat added semver:minor new backwards-compatible feature and removed in-progress labels Feb 13, 2019
@zkat zkat force-pushed the zkat/enjoy-by branch 2 times, most recently from 50b63fc to 49eb8e1 Compare February 14, 2019 19:23
Copy link
Contributor

@aeschright aeschright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 ⭐️ 🍏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor new backwards-compatible feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants