ffflorian / schemastore-updater Goto Github PK
View Code? Open in Web Editor NEWPublish schema files as TypeScript definitions on npm
Home Page: https://www.npmjs.com/org/schemastore
License: GNU General Public License v3.0
Publish schema files as TypeScript definitions on npm
Home Page: https://www.npmjs.com/org/schemastore
License: GNU General Public License v3.0
Hello!
I know this project has been on ice for a while, but would it be possible to get an up-to-date set of schemas published to NPM please?
Thank you very much,
James.
Hello!
Thank you for this great library!
However, the Person
type is pretty abstract:
type Person =
| {
[k: string]: any;
}
| string;
It would be nice, to specify the fields, like name
, email
, website
etc.
Here's my implementation from our private project:
type Person = (string | {
name: string;
email?: string;
url?: string;
})
Thanks!
v0.0.7 has now this:
/**
* Used to specify conditional exports, note that Conditional exports are unsupported in older environments, so it's recommended to use the fallback array option if support for those environments is a concern.
*/
export interface PackageExportsEntryObject {
/**
* The module path that is resolved when this specifier is imported as a CommonJS module using the `require(...)` function.
*/
require?: PackageExportsEntry | PackageExportsFallback;
/**
* The module path that is resolved when this specifier is imported as an ECMAScript module using an `import` declaration or the dynamic `import(...)` function.
*/
import?: PackageExportsEntry | PackageExportsFallback;
/**
* The module path that is resolved when this environment is Node.js.
*/
node?: PackageExportsEntry | PackageExportsFallback;
/**
* The module path that is resolved when no other export type matches.
*/
default?: PackageExportsEntry | PackageExportsFallback;
/**
* The module path that is resolved when this environment matches the property name.
*
* This interface was referenced by `PackageExportsEntryObject`'s JSON-Schema definition
* via the `patternProperty` "^(?![\.0-9]).".
*
* This interface was referenced by `PackageExportsEntryObject1`'s JSON-Schema definition
* via the `patternProperty` "^(?![\.0-9]).".
*/
[k: string]: PackageExportsEntry | PackageExportsFallback;
}
/**
* Used to specify conditional exports, note that Conditional exports are unsupported in older environments, so it's recommended to use the fallback array option if support for those environments is a concern.
*/
export interface PackageExportsEntryObject1 {
/**
* The module path that is resolved when this specifier is imported as a CommonJS module using the `require(...)` function.
*/
require?: PackageExportsEntry | PackageExportsFallback;
/**
* The module path that is resolved when this specifier is imported as an ECMAScript module using an `import` declaration or the dynamic `import(...)` function.
*/
import?: PackageExportsEntry | PackageExportsFallback;
/**
* The module path that is resolved when this environment is Node.js.
*/
node?: PackageExportsEntry | PackageExportsFallback;
/**
* The module path that is resolved when no other export type matches.
*/
default?: PackageExportsEntry | PackageExportsFallback;
/**
* The module path that is resolved when this environment matches the property name.
*
* This interface was referenced by `PackageExportsEntryObject`'s JSON-Schema definition
* via the `patternProperty` "^(?![\.0-9]).".
*
* This interface was referenced by `PackageExportsEntryObject1`'s JSON-Schema definition
* via the `patternProperty` "^(?![\.0-9]).".
*/
[k: string]: PackageExportsEntry | PackageExportsFallback;
}
Which is not valid because the index type does not allow undefined
- the easiest and most accurate fix would be to drop the properties.
Hi,
the team maintaining the manifest structure now officially generates type definitions.
They can be found at https://github.com/SAP/ui5-manifest/blob/master/types/manifest.d.ts
And in the npm package (https://www.npmjs.com/package/@ui5/manifest) starting from version 1.51.0.
Maybe you want to mention this in the README.
Regards
Andreas
Hi @ffflorian,
First of all, thank you so much for what you've put together here. I'm glad to see someone else that values and utilizes JSON Schema as much as I do.
I am going to be implementing some automation using GitHub actions for the SchemaStore repo: SchemaStore/schemastore#1274
I would like to build off the work you have here with a tighter integration with SchemaStore. One of the thoughts I have is to use GitHub actions to automatically publish the schemas to npm, with TypeScript types included by utilizing https://github.com/bcherny/json-schema-to-typescript.
Once this is all setup and ready to go, would you consider transferring the schemastore
npm scope to @madskristensen (the founder of SchemaStore)?
I don't know the proper place to make this issue, as I don't know where the actual fault lies.
The typings for package
are not compilable, due to this block at the end of the main interface:
schemastore-updater/schemas/package/index.d.ts
Lines 291 to 293 in 3e07403
It should have | any
at the end, to support top level properties that are primitive types (such as module
, esnext
, etc).
This is also the same for this line:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.