unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Naming of node packages with @ and /
@ 2018-11-27 21:02 swedebugia
  2018-11-27 23:10 ` Catonano
  0 siblings, 1 reply; 5+ messages in thread
From: swedebugia @ 2018-11-27 21:02 UTC (permalink / raw)
  To: guix-devel

Hi

There are some crazy naming going on in the node-community. How do we 
deal with this?

Note: there is another package called "babel-core" so just 
stripping/replacing the weird characters won't work well.

Any ideas?

Look this example: 
https://github.com/babel/babel/blob/master/packages/babel-core/package.json

Extract:
{
   "name": "@babel/core",
   "version": "7.1.6",
   "description": "Babel compiler core.",
   "main": "lib/index.js",
   "author": "Sebastian McKenzie <sebmck@gmail.com>",
   "homepage": "https://babeljs.io/",
   "license": "MIT",

snip

   "dependencies": {
     "@babel/code-frame": "^7.0.0",
     "@babel/generator": "^7.1.6",
     "@babel/helpers": "^7.1.5",
     "@babel/parser": "^7.1.6",
     "@babel/template": "^7.1.2",
     "@babel/traverse": "^7.1.6",
     "@babel/types": "^7.1.6",
     "convert-source-map": "^1.1.0",
     "debug": "^4.1.0",
     "json5": "^2.1.0",
     "lodash": "^4.17.10",
     "resolve": "^1.3.2",
     "semver": "^5.4.1",
     "source-map": "^0.5.0"
   },
   "devDependencies": {
     "@babel/helper-transform-fixture-test-runner": "^7.0.0",
     "@babel/register": "^7.0.0"
   }
}

-- 
Cheers Swedebugia

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Naming of node packages with @ and /
  2018-11-27 21:02 Naming of node packages with @ and / swedebugia
@ 2018-11-27 23:10 ` Catonano
  2018-11-28 11:21   ` swedebugia
  0 siblings, 1 reply; 5+ messages in thread
From: Catonano @ 2018-11-27 23:10 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]

Il giorno mar 27 nov 2018 alle ore 21:58 swedebugia <swedebugia@riseup.net>
ha scritto:

> Hi
>
> There are some crazy naming going on in the node-community. How do we
> deal with this?
>
> Note: there is another package called "babel-core" so just
> stripping/replacing the weird characters won't work well.
>
> Any ideas?
>
> Look this example:
> https://github.com/babel/babel/blob/master/packages/babel-core/package.json
>
> Extract:
> {
>    "name": "@babel/core",
>    "version": "7.1.6",
>    "description": "Babel compiler core.",
>    "main": "lib/index.js",
>    "author": "Sebastian McKenzie <sebmck@gmail.com>",
>    "homepage": "https://babeljs.io/",
>    "license": "MIT",
>
> snip
>
>    "dependencies": {
>      "@babel/code-frame": "^7.0.0",
>      "@babel/generator": "^7.1.6",
>      "@babel/helpers": "^7.1.5",
>      "@babel/parser": "^7.1.6",
>      "@babel/template": "^7.1.2",
>      "@babel/traverse": "^7.1.6",
>      "@babel/types": "^7.1.6",
>      "convert-source-map": "^1.1.0",
>      "debug": "^4.1.0",
>      "json5": "^2.1.0",
>      "lodash": "^4.17.10",
>      "resolve": "^1.3.2",
>      "semver": "^5.4.1",
>      "source-map": "^0.5.0"
>    },
>    "devDependencies": {
>      "@babel/helper-transform-fixture-test-runner": "^7.0.0",
>      "@babel/register": "^7.0.0"
>    }
> }
>
> --
> Cheers Swedebugia
>
>
I think those are the so called "scoped packages"

https://docs.npmjs.com/misc/scope

https://nitayneeman.com/posts/understanding-scoped-packages-in-npm/

[-- Attachment #2: Type: text/html, Size: 3004 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Naming of node packages with @ and /
  2018-11-27 23:10 ` Catonano
@ 2018-11-28 11:21   ` swedebugia
  2018-11-28 12:46     ` Julien Lepiller
  0 siblings, 1 reply; 5+ messages in thread
From: swedebugia @ 2018-11-28 11:21 UTC (permalink / raw)
  To: Catonano; +Cc: guix-devel

On 2018-11-28 00:10, Catonano wrote:
> 
> 
> Il giorno mar 27 nov 2018 alle ore 21:58 swedebugia 
> <swedebugia@riseup.net <mailto:swedebugia@riseup.net>> ha scritto:
> 
>     Hi
> 
>     There are some crazy naming going on in the node-community. How do we
>     deal with this?
> 
>     Note: there is another package called "babel-core" so just
>     stripping/replacing the weird characters won't work well.
> 
>     Any ideas?
snip

> I think those are the so called "scoped packages"
> 
> https://docs.npmjs.com/misc/scope
> 
> https://nitayneeman.com/posts/understanding-scoped-packages-in-npm/

Aha! This makes sense. The importer and guix package will have to handle 
this.

E.g. this way:

guix import npm -S babel babe-core
where -S is "scope".

We will probably have to add a field or property to our (package) record 
stating that it is part of a scope:
(properties
`((scope . babel)))

guix package will have to support it too:
guix package -i -S babel babel-core

What do you think? Any better ways to handle this?

-- 
Cheers
Swedebugia

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Naming of node packages with @ and /
  2018-11-28 11:21   ` swedebugia
@ 2018-11-28 12:46     ` Julien Lepiller
  2018-11-28 20:34       ` swedebugia
  0 siblings, 1 reply; 5+ messages in thread
From: Julien Lepiller @ 2018-11-28 12:46 UTC (permalink / raw)
  To: guix-devel

Le 2018-11-28 12:21, swedebugia a écrit :
> On 2018-11-28 00:10, Catonano wrote:
>> 
>> 
>> Il giorno mar 27 nov 2018 alle ore 21:58 swedebugia 
>> <swedebugia@riseup.net <mailto:swedebugia@riseup.net>> ha scritto:
>> 
>>     Hi
>> 
>>     There are some crazy naming going on in the node-community. How do 
>> we
>>     deal with this?
>> 
>>     Note: there is another package called "babel-core" so just
>>     stripping/replacing the weird characters won't work well.
>> 
>>     Any ideas?
> snip
> 
>> I think those are the so called "scoped packages"
>> 
>> https://docs.npmjs.com/misc/scope
>> 
>> https://nitayneeman.com/posts/understanding-scoped-packages-in-npm/
> 
> Aha! This makes sense. The importer and guix package will have to 
> handle this.
> 
> E.g. this way:
> 
> guix import npm -S babel babe-core
> where -S is "scope".
> 
> We will probably have to add a field or property to our (package)
> record stating that it is part of a scope:
> (properties
> `((scope . babel)))
> 
> guix package will have to support it too:
> guix package -i -S babel babel-core
> 
> What do you think? Any better ways to handle this?

Do we have to bother with scope? Can't we simply import the package like 
so:

guix import npm @babel/babel-core

and install the corresponding package with

guix package -i bable/bable-core

I don't like the idea of adding this notion of scope to guix, unless we 
really need it for something?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Naming of node packages with @ and /
  2018-11-28 12:46     ` Julien Lepiller
@ 2018-11-28 20:34       ` swedebugia
  0 siblings, 0 replies; 5+ messages in thread
From: swedebugia @ 2018-11-28 20:34 UTC (permalink / raw)
  To: Julien Lepiller, guix-devel

On 2018-11-28 13:46, Julien Lepiller wrote:
> Le 2018-11-28 12:21, swedebugia a écrit :
>> On 2018-11-28 00:10, Catonano wrote:
>>>
>>>
>>> Il giorno mar 27 nov 2018 alle ore 21:58 swedebugia 
>>> <swedebugia@riseup.net <mailto:swedebugia@riseup.net>> ha scritto:
>>>
>>>     Hi
>>>
>>>     There are some crazy naming going on in the node-community. How 
>>> do we
>>>     deal with this?
>>>
>>>     Note: there is another package called "babel-core" so just
>>>     stripping/replacing the weird characters won't work well.
>>>
>>>     Any ideas?
>> snip
>>
>>> I think those are the so called "scoped packages"
>>>
>>> https://docs.npmjs.com/misc/scope
>>>
>>> https://nitayneeman.com/posts/understanding-scoped-packages-in-npm/
>>
>> Aha! This makes sense. The importer and guix package will have to 
>> handle this.
>>
>> E.g. this way:
>>
>> guix import npm -S babel babe-core
>> where -S is "scope".
>>
>> We will probably have to add a field or property to our (package)
>> record stating that it is part of a scope:
>> (properties
>> `((scope . babel)))
>>
>> guix package will have to support it too:
>> guix package -i -S babel babel-core
>>
>> What do you think? Any better ways to handle this?
> 
> Do we have to bother with scope? Can't we simply import the package like 
> so:
> 
> guix import npm @babel/babel-core
> 
> and install the corresponding package with
> 
> guix package -i bable/bable-core
> 
> I don't like the idea of adding this notion of scope to guix, unless we 
> really need it for something?

We can do that. It is simpler.

Won't the "/" interfere with something, e.g. the scripts for updating 
packages? We will have to adapt those perhaps but that is doable.

Effectively you suggest we strip the @ in the guix-name procedure in 
npm.scm and keep the rest intact.
-- 
Cheers
Swedebugia

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-28 20:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 21:02 Naming of node packages with @ and / swedebugia
2018-11-27 23:10 ` Catonano
2018-11-28 11:21   ` swedebugia
2018-11-28 12:46     ` Julien Lepiller
2018-11-28 20:34       ` swedebugia

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).