Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(ns-openapi-3-1): use nodenext for TypeScript modules #4450

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions packages/apidom-ns-openapi-3-1/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"settings": {
"import/resolver": {
"typescript": {
"project": ["./tsconfig.json"]
}
}
},
"rules": {
"import/extensions": [
"error",
"always",
{
"ts": "always",
"tsx": "always",
"js": "always",
"jsx": "never",
"ignorePackages": true
}
]
}
}
4 changes: 2 additions & 2 deletions packages/apidom-ns-openapi-3-1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"perf": "cross-env BABEL_ENV=es babel ./test/perf/index.ts --out-file ./test/perf/index.mjs --root-mode 'upward' && cross-env NODE_ENV=test node ./test/perf/index.mjs",
"perf:visitor-shortcut": "cross-env BABEL_ENV=es babel ./test/perf/visitor-shortcut.ts --out-file ./test/perf/visitor-shortcut.mjs --root-mode 'upward' && cross-env NODE_ENV=test node ./test/perf/visitor-shortcut.mjs",
"perf:refract": "cross-env BABEL_ENV=es babel ./test/perf/refract.ts --out-file ./test/perf/refract.mjs --root-mode 'upward' && cross-env NODE_ENV=test node ./test/perf/refract.mjs",
"typescript:check-types": "tsc --noEmit",
"typescript:declaration": "tsc -p declaration.tsconfig.json && rollup -c config/rollup/types.dist.js",
"typescript:check-types": "tsc --noEmit && tsc -p ./test/tsconfig.json --noEmit",
"typescript:declaration": "tsc -p tsconfig.declaration.json && rollup -c config/rollup/types.dist.js",
"prepack": "copyfiles -u 3 ../../LICENSES/* LICENSES && copyfiles -u 2 ../../NOTICE .",
"postpack": "rimraf NOTICE LICENSES"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/apidom-ns-openapi-3-1/src/elements/Header.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HeaderElement } from '@swagger-api/apidom-ns-openapi-3-0';

import SchemaElement from './Schema';
import SchemaElement from './Schema.ts';

class Header extends HeaderElement {
get schema(): SchemaElement | undefined {
Expand Down
2 changes: 1 addition & 1 deletion packages/apidom-ns-openapi-3-1/src/elements/Info.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StringElement } from '@swagger-api/apidom-core';
import { InfoElement } from '@swagger-api/apidom-ns-openapi-3-0';

import LicenseElement from './License';
import LicenseElement from './License.ts';

class Info extends InfoElement {
get license(): LicenseElement | undefined {
Expand Down
2 changes: 1 addition & 1 deletion packages/apidom-ns-openapi-3-1/src/elements/MediaType.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MediaTypeElement } from '@swagger-api/apidom-ns-openapi-3-0';

import SchemaElement from './Schema';
import SchemaElement from './Schema.ts';

class MediaType extends MediaTypeElement {
get schema(): SchemaElement | undefined {
Expand Down
10 changes: 5 additions & 5 deletions packages/apidom-ns-openapi-3-1/src/elements/OpenApi3-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
Meta,
} from '@swagger-api/apidom-core';

import OpenapiElement from './Openapi';
import InfoElement from './Info';
import ComponentsElement from './Components';
import PathsElement from './Paths';
import ExternalDocumentationElement from './ExternalDocumentation';
import OpenapiElement from './Openapi.ts';
import InfoElement from './Info.ts';
import ComponentsElement from './Components.ts';
import PathsElement from './Paths.ts';
import ExternalDocumentationElement from './ExternalDocumentation.ts';

// eslint-disable-next-line @typescript-eslint/naming-convention
class OpenApi3_1 extends ObjectElement {
Expand Down
4 changes: 2 additions & 2 deletions packages/apidom-ns-openapi-3-1/src/elements/Operation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OperationElement } from '@swagger-api/apidom-ns-openapi-3-0';

import RequestBodyElement from './RequestBody';
import ReferenceElement from './Reference';
import RequestBodyElement from './RequestBody.ts';
import ReferenceElement from './Reference.ts';

class Operation extends OperationElement {
get requestBody(): RequestBodyElement | ReferenceElement | undefined {
Expand Down
2 changes: 1 addition & 1 deletion packages/apidom-ns-openapi-3-1/src/elements/Parameter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ParameterElement } from '@swagger-api/apidom-ns-openapi-3-0';

import SchemaElement from './Schema';
import SchemaElement from './Schema.ts';

class Parameter extends ParameterElement {
get schema(): SchemaElement | undefined {
Expand Down
2 changes: 1 addition & 1 deletion packages/apidom-ns-openapi-3-1/src/elements/PathItem.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PathItemElement } from '@swagger-api/apidom-ns-openapi-3-0';

import OperationElement from './Operation';
import OperationElement from './Operation.ts';

class PathItem extends PathItemElement {
get GET(): OperationElement {
Expand Down
6 changes: 3 additions & 3 deletions packages/apidom-ns-openapi-3-1/src/elements/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {
Meta,
} from '@swagger-api/apidom-core';

import XmlElement from './Xml';
import DiscriminatorElement from './Discriminator';
import ExternalDocumentationElement from './ExternalDocumentation';
import XmlElement from './Xml.ts';
import DiscriminatorElement from './Discriminator.ts';
import ExternalDocumentationElement from './ExternalDocumentation.ts';

class Schema extends ObjectElement {
constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes) {
Expand Down
Loading