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

rename package file to nupm.nuon #51

Merged
merged 4 commits into from
Dec 15, 2023
Merged

Conversation

amtoine
Copy link
Member

@amtoine amtoine commented Dec 11, 2023

part of

inspired by

  • Cargo.toml for Rust

Description

this PR renames package.nuon into nupm.nuon making it hopefully clearer what the purpose of this file will be in any Nupm package.

@amtoine amtoine mentioned this pull request Dec 11, 2023
4 tasks
@amtoine amtoine changed the title Rename package file rename package file to nupm.nuon Dec 11, 2023
@kubouch
Copy link
Contributor

kubouch commented Dec 13, 2023

There are conflicts now

this should solve the merge conflict from nushell#51.
@amtoine amtoine requested a review from kubouch December 14, 2023 18:06
@kubouch kubouch merged commit 81b27e3 into nushell:main Dec 15, 2023
3 checks passed
@amtoine amtoine deleted the rename-package-file branch December 15, 2023 14:42
@amtoine
Copy link
Member Author

amtoine commented Dec 15, 2023

well, basically all the packages in the Nupm index need to be fixed now (we won't be doing that for quite some time 😆)

the script to see the repos missing the new package file
const PACKAGE_FILE = "nupm.nuon"

let index = open index.nuon | each {|it|
    let pkg = $it.package | parse "{host}:{name}" | into record

    let host = match $pkg.host {
        "github.com" => "raw.githubusercontent.com",
        _ => { error make --unspanned { msg: $"invalid host '($pkg.host)'" } },
    }

    let url = {
        scheme: "https",
        host: $host,
        path: ($pkg.name | append ["main", $it.dir?, $PACKAGE_FILE] | compact | str join '/'),
    }

    let pkg = if $it.dir? == null {
        $pkg.name
    } else {
        $"($pkg.name)@($it.dir)"
    }

    print $"fetching '($pkg)'"
    let res = http get ($url | url join) --raw --allow-errors --full
    if $res.status == 200 {
        $res.body | from nuon | select name? version? type? | insert repo $pkg
    } else {
        { repo: $pkg }
    }
}

$index | where $it.name? == null

amtoine added a commit to amtoine/nu-git-manager that referenced this pull request Dec 15, 2023
related to
- nushell/nupm#51

## description
this PR renames the `package.nuon` files to `nupm.nuon` as per
nushell/nupm#51.
amtoine added a commit to amtoine/nu-pomodoro that referenced this pull request Dec 16, 2023
amtoine added a commit to amtoine/nu-right-prompt that referenced this pull request Dec 16, 2023
amtoine added a commit to amtoine/nu_plugin_explore that referenced this pull request Dec 16, 2023
amtoine added a commit to amtoine/zellij-layouts that referenced this pull request Dec 16, 2023
amtoine added a commit to amtoine/scripts that referenced this pull request Dec 16, 2023
@amtoine
Copy link
Member Author

amtoine commented Dec 16, 2023

all the packages have been fixed or have a PR in the queue that will fix them 👍

(except for https://github.com/FMotalleb/nu_plugin_desktop_notifications but i'm sure the author will be able to fix it soon 😉)

amtoine added a commit to amtoine/nu-git-manager that referenced this pull request Jan 21, 2024
related to
- nushell/nupm#51

## description
this PR renames the `package.nuon` files to `nupm.nuon` as per
nushell/nupm#51.
amtoine added a commit to nushell/nu_scripts that referenced this pull request Feb 18, 2024
related to
- nushell/nupm#51

depends on
- #700

> **Important**
> this PR will be rebased once #700 lands and only
a5a6b6f
is relevant here

## description
this is a simple rename of `package.nuon` files to `nupm.nuon` as per
nushell/nupm#51.
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.

None yet

2 participants