Skip to content

yarn.lock file #15

Open
Open
@jonaskello

Description

@jonaskello

Just wanted to let you know I'm doing some experimenting over here with using the yarn.lock file as we originally discussed. Not sure if it will be useful but at least I am learning a lot :-). I would really like to make the system config a pure function of the lockfile. But I discovered that is not possible as we need to add package config from from the jspm-node conversion stuff. This part is also quite slow, would be nice to find a way to make it faster. Anyway, the system config is now a pure function of the lockfile and the extra jspm-config.

I'm basically doing the same thing as in this repo, just divided the steps a little different to get info from the lockfile rather than the node_modules folder. I was thinking we could add some code that looks for a yarn.lock file and uses it if present, otherwise falls back to scanning through node_modules. Maybe I could contribute something like this but we would have to re-arrange a bit to make that work. And as I said, not sure if it will be useful as the slow part is probably not scanning node_modules.

One thing I noticed is that I did not have to hard-code the node-libs packages using the short name in the map. It worked with the long names. What I mean is that this worked:

SystemJS.config({
  "paths": {
    "nm:": "node_modules/"
  },
  "map": {
    "jspm-nodelibs-assert": "nm:jspm-nodelibs-assert",
    "jspm-nodelibs-buffer": "nm:jspm-nodelibs-buffer",
    "jspm-nodelibs-child_process": "nm:jspm-nodelibs-child_process",
    "jspm-nodelibs-cluster": "nm:jspm-nodelibs-cluster",
 ...

If I understood correctly the code in this repo will map with the short names like "assert", "buffer" and so on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions