feat: change to use commonjs output

This commit is contained in:
Lin, Hung-Shin authored and wancat committed 2024-01-29 12:42:50 +08:00
1 parent 2bdb804f24
commit 557af91d4b
24 files changed
+35 -18

No files matched your search

+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@linux-odyssey/file-graph",
"version": "1.0.0",
"type": "module",
"type": "commonjs",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",
"scripts": {
"build": "tsc && node post-build-script.js",
"build": "tsc",
"test": "yarn build && jest"
}
}
@@ -1,6 +1,4 @@
import { describe, expect, test } from '@jest/globals'
import File from './file'
import File from '../src/file'
describe('File', () => {
let file
@@ -1,5 +1,5 @@
import FileGraph from './fileGraph'
import FileNode from './fileNode'
import FileGraph from '../src/fileGraph'
import FileNode from '../src/fileNode'
describe('FileGraph', () => {
let root
@@ -1,5 +1,5 @@
import { DuplicateItemError, ParentNotExistsError } from './errors'
import FileNode from './fileNode'
import { DuplicateItemError, ParentNotExistsError } from '../src/errors'
import FileNode from '../src/fileNode'
function createNodeFromFiles(files) {
const node = new FileNode(files[0])
+2 -2
View File
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"target": "ES5",
"module": "CommonJS",
"moduleResolution": "node",
"strict": true,
"esModuleInterop": true,
+7 -3
View File
@@ -1,10 +1,14 @@
{
"name": "@linux-odyssey/models",
"type": "module",
"type": "commonjs",
"version": "1.0.0",
"main": "index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "GPL",
"exports": "./index.js",
"exports": "./dist/index.js",
"scripts": {
"build": "tsc"
},
"dependencies": {
"mongoose": "^8.0.3"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+15
View File
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"target": "ES5",
"module": "CommonJS",
"moduleResolution": "node",
"strict": true,
"esModuleInterop": true,
"outDir": "./dist",
"declaration": true,
"sourceMap": true,
"allowJs": true
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "server",
"version": "0.0.0",
"description": "Linux Odyssey Server",
"type": "module",
"type": "commonjs",
"scripts": {
"start": "node dist/index.js",
"dev": "nodemon",
+3 -3
View File
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "esnext",
"module": "NodeNext",
"moduleResolution": "nodenext",
"target": "ES5",
"module": "CommonJS",
"moduleResolution": "Node",
"strict": true,
"esModuleInterop": true,
"outDir": "./dist",