Skip to content

Commit

Permalink
Merge pull request #3 from Beace/chore-build
Browse files Browse the repository at this point in the history
chore: change ts build
  • Loading branch information
Beace authored Jun 17, 2023
2 parents e2e8dc7 + d7f0044 commit 5771fa9
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/npm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18
# Specifies the registry, this field is required!
registry-url: https://registry.npmjs.org/
# clean install of your projects' deps. We use "npm ci" to avoid package lock changes
Expand All @@ -45,12 +45,12 @@ jobs:
# run tests just in case
- run: npm test
# publish to NPM -> there is one caveat, continue reading for the fix
- run: npm publish --provenance --access public
- run: cd lib && npm publish --provenance --access public
if: "!github.event.release.prerelease"
env:
# Use a token to publish to NPM. See below for how to set it up
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public --tag beta
- run: cd lib && npm publish --provenance --access public --tag beta
if: "github.event.release.prerelease"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion agent.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Application } from 'egg';
import elasticsearch from './src/impl/elasticsearch';
import elasticsearch from './impl/elasticsearch';

export default (app: Application) => {
if (app.config.elasticsearch.app) elasticsearch(app);
Expand Down
2 changes: 1 addition & 1 deletion app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Application } from 'egg';
import elasticsearch from './src/impl/elasticsearch';
import elasticsearch from './impl/elasticsearch';

export default (app: Application) => {
if (app.config.elasticsearch.app) elasticsearch(app);
Expand Down
File renamed without changes.
14 changes: 3 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "eggjs-elasticsearch",
"version": "0.0.1",
"description": "eggjs elasticsearch plugin",
"types": "./lib/type.d.ts",
"types": "./type.d.ts",
"eggPlugin": {
"name": "elasticsearch"
},
Expand All @@ -11,17 +11,10 @@
"test-local": "egg-bin test",
"cov": "egg-bin cov",
"ci": "npm run lint && npm run cov",
"build": "tsc -p ./tsconfig.build.json",
"build": "tsc -p ./tsconfig.build.json && cp ./package.json lib/",
"lint:fix": "eslint . --ext .ts --fix",
"lint": "eslint . --ext .ts"
},
"files": [
"lib",
"app.js",
"app.d.js",
"agent.js",
"app.d.js"
],
"repository": {
"type": "git",
"url": "git+https://github.com/Beace/eggjs-elasticsearch.git"
Expand Down Expand Up @@ -54,7 +47,6 @@
"version": "16, 18"
},
"dependencies": {
"@elastic/elasticsearch": "^8.8.1",
"ioredis": "^5.3.2"
"@elastic/elasticsearch": "^8.8.1"
}
}
3 changes: 3 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./",
},
"exclude": ["lib", "test", "**/*.test.ts"]
}
File renamed without changes.

0 comments on commit 5771fa9

Please sign in to comment.