Skip to content

Update package format #6

Description

@pschmitt

There's a lot of legacy fields in the package.json files right now.
Most of the items in the root dir are ignored by zinit and are the result of an experiment that consisted in hosting zinit packages on npm.

Only ._resolved, .zsh-data.plugin-info[] and .zsh-data.zinit-ices[] are relevant.

Here's my first proposal draft:

{
    "author": "zdharma-continuum",
    "description": "Lorem ipsum bacon bacon",
    "name": "null",
    "message": "Thanks for trusting zdharma-continuum",
    "license": "MIT",
    "url": "https://github.com/zdharma-continuum/null",
    "version": "0.0.1",
    "requirements": [
        {
            "name": "Bin-Gem-Node",
            "type": "annex"
        },
        {
            "name": "cp",
            "type": "binary"
        }
    ],
    "profiles": {
        "default": {
            "message": "Installing default profile",
            "dl": "https://github.com/zdharma-continuum/null/null.tar.gz",
            "ices": {
                "null": true,
                "atclone": "echo 'installing'",
                "atpull": "echo 'updating'",
                "sbin": "null*",
                "make": "!",
                "run-atpull": true
            },
            "requirements": [
                {
                    "name": "test",
                    "type": "annex"
                }
            ]
        },
        "minimal": {
            "message": "Installing minimal profile",
            "plugin": "zdharma-continuum/null",
            "ices": {
                "atclone": "echo 'installing'",
                "atpull": "echo 'updating'",
                "run-atpull": "true"
            }
        }
    }
}

✨ Features:

  • Profile-specific plugin definition (zinit will fetch different repos depending of the selected profile)
  • Per-profile requirements
  • Per-profile messages
  • Clear distinction between regular and binary requirements (type prop)
  • _resolved get a more appropriate name download

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions