Skip to content

Commit

Permalink
Merge pull request #1 from therohk/v0.5-fix-export
Browse files Browse the repository at this point in the history
fix library import
  • Loading branch information
therohk authored Aug 29, 2024
2 parents d94a2f6 + 3e46269 commit f4a6e50
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ jobs:
run: npm install
- name: unit-test
run: npm run test
- name: cjs-build
run: npm run build:cjs
- name: esm-build
run: npm run build:esm
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: publish
on:
release:
types: [created]
Expand All @@ -17,8 +17,8 @@ jobs:
node-version: '20.x'
registry-url: https://registry.npmjs.org
- name: clean-build
run: npm ci && npm run build:esm
- name: publish
run: npm ci && npm run build
- name: npm-publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "datum-merge",
"version": "0.9.0",
"version": "0.5.4",
"author": "Rohit Kulkarni <[email protected]>",
"repository": {
"type": "git",
Expand All @@ -9,8 +9,12 @@
"license": "MIT",
"description": "Simplified diff and merging for deeply nested objects.",
"keywords": ["merge", "diff", "compare", "patch", "update"],
"main": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"main": "./dist/cjs/index.js",
"types": "./dist/cjs/index.d.ts",
"exports": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js"
},
"files": [
"dist",
"src"
Expand All @@ -21,11 +25,11 @@
},
"scripts": {
"lint": "npx eslint src",
"pretty": "prettier -c src",
"pretty": "prettier -c ./src",
"scantask": "findstr /s /i todo src\\*.*",
"test": "jest",
"build:esm": "tsc",
"build:cjs": "tsc --module CommonJS --outDir dist/cjs",
"build:cjs": "tsc --outDir dist/cjs",
"build:esm": "tsc --module ESNext --outDir dist/esm",
"build": "run-s test build:*",
"compile": "tsc -noEmit -skipLibCheck",
"cyccheck": "dpdm --exit-code circular:1 --no-tree ./src"
Expand Down
16 changes: 7 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist/esm",
"module": "ESNext",
"outDir": "./dist/cjs",
"module": "CommonJS",
"target": "ES6",
"moduleResolution": "node",
"sourceMap": true,
// "inlineSourceMap": true,
// "inlineSources": true,
"removeComments": true,
"declaration": true,
"declarationMap": true,
"allowJs": false,
// "checkJs": true,
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"importHelpers": true,
// "importHelpers": true,
// "downlevelIteration": true,
// "isolatedModules": true,
// "strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"lib": [
"ES5",
"ES6",
"ES7"
]
"lib": ["ES6"]
},
"include": [ "src/**/*.ts" ],
"exclude": [ "**/*.test.ts" ],
}
}

0 comments on commit f4a6e50

Please sign in to comment.