Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 38418eb

Browse files
committed
refactor: migrate to esm (#2021)
1 parent 0cbd551 commit 38418eb

499 files changed

Lines changed: 2631 additions & 1980 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ output/
1313
redoc-static.html
1414
packages/cli/README.md
1515
.env
16-
packages/respect-core/src/modules/runtime-expressions/abnf-parser.js
16+
packages/respect-core/src/modules/runtime-expressions/abnf-parser.cjs

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ coverage/
22
lib/
33
output/
44
packages/core/src/rules/__tests__/fixtures/invalid-yaml.yaml
5-
packages/respect-core/src/modules/runtime-expressions/abnf-parser.js
5+
packages/respect-core/src/modules/runtime-expressions/abnf-parser.cjs
66
benchmark/api-definitions/
77
LICENSE.md
88
snapshot*.txt

__tests__/bundle/resolve-refs-from-x-attributes/plugin.js renamed to __tests__/bundle/resolve-refs-from-x-attributes/plugin.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const ResolveX = require('./resolve-x.decorator');
1+
const ResolveX = require('./resolve-x.decorator.cjs');
22
const id = 'plugin';
33

44
const decorators = {

__tests__/bundle/resolve-refs-from-x-attributes/redocly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ apis:
55
decorators:
66
plugin/resolve-x: on
77
plugins:
8-
- './plugin.js'
8+
- './plugin.cjs'

__tests__/bundle/resolve-refs-from-x-attributes/resolve-x.decorator.js renamed to __tests__/bundle/resolve-refs-from-x-attributes/resolve-x.decorator.cjs

File renamed without changes.

__tests__/check-config/config-type-extensions-in-assertions/plugins/type-extention.js renamed to __tests__/check-config/config-type-extensions-in-assertions/plugins/type-extention.cjs

File renamed without changes.

__tests__/check-config/config-type-extensions-in-assertions/redocly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
extends: []
22

33
plugins:
4-
- plugins/type-extention.js
4+
- plugins/type-extention.cjs
55

66
rules:
77
spec: warn

__tests__/check-config/wrong-config-type-extensions-in-assertions/plugins/type-extention.js renamed to __tests__/check-config/wrong-config-type-extensions-in-assertions/plugins/type-extention.cjs

File renamed without changes.

__tests__/check-config/wrong-config-type-extensions-in-assertions/redocly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
extends: []
22

33
plugins:
4-
- plugins/type-extention.js
4+
- plugins/type-extention.cjs
55

66
rules:
77
struct: warn

__tests__/commands.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { readdirSync, statSync, existsSync } from 'node:fs';
2-
import { join, relative } from 'node:path';
2+
import { join, relative, dirname } from 'node:path';
33
import { spawnSync } from 'node:child_process';
4-
import { getCommandOutput, getEntrypoints, getParams, cleanupOutput } from './helpers';
4+
import { getCommandOutput, getEntrypoints, getParams, cleanupOutput } from './helpers.js';
5+
import { fileURLToPath } from 'node:url';
56

7+
const __dirname = dirname(fileURLToPath(import.meta.url));
68
const indexEntryPoint = join(process.cwd(), 'packages/cli/lib/index.js');
79

810
describe('E2E', () => {

0 commit comments

Comments
 (0)