mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
chore: add sample on how to use esm on cjs
This commit is contained in:
75
sample/34-using-esm-packages/package.json
Normal file
75
sample/34-using-esm-packages/package.json
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"name": "34-using-esm-packages",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
"license": "UNLICENSED",
|
||||
"type": "commonjs",
|
||||
"engines": {
|
||||
"node": ">=18.8"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "nest build",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||
"start": "nest start",
|
||||
"start:dev": "nest start --watch",
|
||||
"start:debug": "nest start --debug --watch",
|
||||
"start:prod": "node dist/main",
|
||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest",
|
||||
"test:watch": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --watch",
|
||||
"test:cov": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --coverage",
|
||||
"test:debug": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
||||
"test:e2e": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --config ./test/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "10.x",
|
||||
"@nestjs/core": "10.x",
|
||||
"@nestjs/platform-express": "10.x",
|
||||
"delay": "6.x",
|
||||
"reflect-metadata": "0.2.0",
|
||||
"rxjs": "7.x",
|
||||
"superjson": "2.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "10.x",
|
||||
"@nestjs/schematics": "10.x",
|
||||
"@nestjs/testing": "10.x",
|
||||
"@types/express": "4.x",
|
||||
"@types/jest": "29.x",
|
||||
"@types/node": "20.x",
|
||||
"@types/supertest": "6.x",
|
||||
"@typescript-eslint/eslint-plugin": "8.x",
|
||||
"@typescript-eslint/parser": "8.x",
|
||||
"eslint": "8.x",
|
||||
"eslint-config-prettier": "9.x",
|
||||
"eslint-plugin-prettier": "5.x",
|
||||
"jest": "29.5.0",
|
||||
"prettier": "3.x",
|
||||
"source-map-support": "0.5.21",
|
||||
"supertest": "7.x",
|
||||
"ts-jest": "29.x",
|
||||
"ts-loader": "9.x",
|
||||
"ts-node": "10.x",
|
||||
"tsconfig-paths": "4.x",
|
||||
"typescript": "5.5.x"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"json",
|
||||
"ts"
|
||||
],
|
||||
"rootDir": "src",
|
||||
"testRegex": ".*\\.spec\\.ts$",
|
||||
"transform": {
|
||||
"^.+\\.(t|j)s$": "ts-jest"
|
||||
},
|
||||
"collectCoverageFrom": [
|
||||
"**/*.(t|j)s"
|
||||
],
|
||||
"coverageDirectory": "../coverage",
|
||||
"testEnvironment": "node"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user