Code Monkey home page Code Monkey logo

Comments (6)

bartlomieju avatar bartlomieju commented on June 6, 2024 1

It looks so, here's the problematic bit:

"scripts": {
    "test": "make test && make test-cov",
    "blanket": {
        "pattern": "//^((?!/node_modules/)(?!/test/).)*$/ig",
        "onlyCwd": true,
        "data-cover-flags": {
            "branchTracking": true
        }
    },
    "travis-cov": {
        "threshold": 100
    }
},

I'll open a PR to deno_npm later today.

from deno.

hugojosefson avatar hugojosefson commented on June 6, 2024

🙋 The same with npm:joi:

import joi from "npm:[email protected]";

console.log(joi);

Works with Deno version 1.43.3.

Fails with Deno version 1.43.4:

error: Error getting response at https://registry.npmjs.org/joi for package "joi": invalid type: map, expected a string at line 1 column 18384
    at file:///test.ts:1:17

The url https://registry.npmjs.org/joi, does indeed return json that, at the position given in the error message, contains a run-script value that isn't a string, but a json object. It was present in the ancient [email protected], removed in the almost as ancient [email protected].

🫚 Root cause?

I suspect this newly found insensitivity to incorrect package.json run-scripts, was brought in by this entry in the deno 1.43.4 changelog:

fix(npm): handle null fields in npm registry JSON (#23785)

Following that update, leads to this commit in deno_npm:

denoland/deno_npm@0.20.0...0.20.1#diff-d5b93d4a7caa06c359c97e5e8528a0b6c636621edba60a960f3f5afeed0c97a8R171

That's how far my understanding goes! I'm not familiar enough with serde in rust to know what the previous default behaviour was, that was apparently overridden here. In general though, for npm compatibility, we might want to be more lenient to parts of json from older versions of modules that we don't even need to use?

from deno.

bartlomieju avatar bartlomieju commented on June 6, 2024

CC @dsherret can you take a look? Seems like a regression.

from deno.

dsherret avatar dsherret commented on June 6, 2024

I think this was caused by denoland/deno_npm#47

from deno.

dsherret avatar dsherret commented on June 6, 2024

This is now fixed in Deno 1.43.5

from deno.

hugojosefson avatar hugojosefson commented on June 6, 2024

Thank you so much @dsherret and @bartlomieju!

from deno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.