Skip to content
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
4 changes: 2 additions & 2 deletions napi/oxlint/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const oxlintDirPath = join(import.meta.dirname, '..'),
console.log('Building with tsdown...');
execSync('pnpm tsdown', { stdio: 'inherit', cwd: oxlintDirPath });

// Copy files from `napi/parser` to `napi/oxlint/dist/parser`
// Copy files from `napi/parser` to `napi/oxlint/dist`
console.log('Copying files from parser...');

const parserFilePaths = [
Expand All @@ -22,7 +22,7 @@ const parserFilePaths = [
];

for (const parserFilePath of parserFilePaths) {
copyFile(join(parserDirPath, parserFilePath), join(distDirPath, 'parser', parserFilePath));
copyFile(join(parserDirPath, parserFilePath), join(distDirPath, parserFilePath));
}

// Copy native `.node` files from `src-js`
Expand Down
4 changes: 2 additions & 2 deletions napi/oxlint/src-js/plugins/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { assertIs } from './utils.js';
import { addVisitorToCompiled, compiledVisitor, finalizeCompiledVisitor, initCompiledVisitor } from './visitor.js';

// @ts-expect-error we need to generate `.d.ts` file for this module.
import { TOKEN } from '../../dist/parser/raw-transfer/lazy-common.mjs';
import { TOKEN } from '../../dist/raw-transfer/lazy-common.mjs';
// @ts-expect-error we need to generate `.d.ts` file for this module.
import { walkProgram } from '../../dist/parser/generated/lazy/walk.mjs';
import { walkProgram } from '../../dist/generated/lazy/walk.mjs';

// Buffer with typed array views of itself stored as properties
interface BufferWithArrays extends Uint8Array {
Expand Down
2 changes: 1 addition & 1 deletion napi/oxlint/src-js/plugins/visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

// TODO(camc314): we need to generate `.d.ts` file for this module.
// @ts-expect-error
import { LEAF_NODE_TYPES_COUNT, NODE_TYPE_IDS_MAP, NODE_TYPES_COUNT } from '../../dist/parser/generated/lazy/types.mjs';
import { LEAF_NODE_TYPES_COUNT, NODE_TYPE_IDS_MAP, NODE_TYPES_COUNT } from '../../dist/generated/lazy/types.mjs';
import { assertIs } from './utils.js';

import type { CompiledVisitorEntry, EnterExit, Node, VisitFn, Visitor } from './types.ts';
Expand Down
2 changes: 1 addition & 1 deletion napi/oxlint/test/compile-visitor.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
// TODO(camc314): we need to generate `.d.ts` file for this module.
// @ts-expect-error
import { NODE_TYPE_IDS_MAP } from '../../parser/generated/lazy/types.mjs';
import { NODE_TYPE_IDS_MAP } from '../dist/generated/lazy/types.mjs';
import {
addVisitorToCompiled,
compiledVisitor,
Expand Down
5 changes: 3 additions & 2 deletions napi/oxlint/tsdown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ export default defineConfig({
// External native bindings
'./oxlint.*.node',
'oxlint-*',
// These are generated (also used by oxc-parser, so we'll copy them separately)
/..\/parser\/.*/,
// Files copied from `oxc-parser`.
// Not bundled, to avoid needing sourcemaps when debugging.
/\/dist\//,
],
// At present only compress syntax.
// Don't mangle identifiers or remove whitespace, so `dist` code remains somewhat readable.
Expand Down
Loading