Giter VIP home page Giter VIP logo

Comments (6)

tm1000 avatar tm1000 commented on June 3, 2024 1

@here-nerd Yeah I saw the response... not what I was hoping for.

We should fix it here. There should probably be some way for us to be able to add more types into the schema that is generated.

If you have some ideas feel free to PR or I will do it when I get some time. For now we will leave this issue open

With regards to Mozilla you'd have to actually implement split mode. Here we can just say its valid. Like the Mozilla spec states.

from webpack-webextension-plugin.

tm1000 avatar tm1000 commented on June 3, 2024 1

@here-nerd Here's a PR that I think will solve all of this: #376

I also added tests

from webpack-webextension-plugin.

tm1000 avatar tm1000 commented on June 3, 2024

Hi there

The schema is generated from the types at definitely typed. This will need to be added there: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/firefox-webext-browser/index.d.ts#L378

PR: DefinitelyTyped/DefinitelyTyped#64355

from webpack-webextension-plugin.

here-nerd avatar here-nerd commented on June 3, 2024

Hi there

The schema is generated from the types at definitely typed. This will need to be added there: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/firefox-webext-browser/index.d.ts#L378

PR: DefinitelyTyped/DefinitelyTyped#64355

@tm1000 Super thanks for taking this up. However, according to DefinitelyTyped/DefinitelyTyped#64355, it does not seem to be a quick fix. I have looked into bugzilla and I have found the exact issue https://bugzilla.mozilla.org/show_bug.cgi?id=1380812. It's open for 6 years and no assignee. May I propose, for practicality, we fix the issue here in this repo? What do you think?
Note: of course, I'd love to help Mozilla to fix the issue and it would benefit everybody. But a 6-years-open bug does not convince me that Mozilla would be taking quick decision (in review/ merge etc.). And I think we can do better than just waiting.

from webpack-webextension-plugin.

here-nerd avatar here-nerd commented on June 3, 2024

You're totally right about the split mode on Mozilla. It's simply not supported on Mozilla. Anyway, I still think Mozilla should have exposed generic types rather than exposing only its supported keys.

I want to help. I need a hint from you @tm1000 how manifest.schema.json is currently created. E.g. why can't we just simply add 'split' in the schema?
Anyway, there is also https://json.schemastore.org/chrome-manifest, which has the correct incognito key definition. How can we use that instead of the mozilla one?

from webpack-webextension-plugin.

tm1000 avatar tm1000 commented on June 3, 2024

It's actually generated by this

"generate-manifest-schema": "typescript-json-schema ./src/plugin/tsconfig.json browser._manifest.WebExtensionManifest > ./src/plugin/manifest.schema.json"

Which turns the typescript into json. Then it uses avj to validate the schema against the manifest:

const validate = ajv.compile(manifestSchema);

I'm not opposed to using the chrome one. It should just be a simple file replace

Alternatively it could be generated from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/042141ce5f77f36df01c344ad09f32feda26c4fd/types/chrome/index.d.ts#L6908

Instead of the mozilla one

from webpack-webextension-plugin.

Related Issues (16)

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.