File tree Expand file tree Collapse file tree 4 files changed +44
-0
lines changed
Expand file tree Collapse file tree 4 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 5757 run : |
5858 npm run test:unit
5959
60+ - name : ECMAScript module test
61+ run : |
62+ npm run test:esm
63+
6064 license :
6165 name : License check
6266 runs-on : ubuntu-latest
@@ -110,3 +114,7 @@ jobs:
110114 - name : Unit test
111115 run : |
112116 bun run test:unit-bun
117+
118+ - name : ECMAScript module test
119+ run : |
120+ bun run test:esm
Original file line number Diff line number Diff line change 1313 "test" : " npm run build && npm run lint && tap" ,
1414 "test:unit" : " npm run build && tap" ,
1515 "test:unit-bun" : " bun run build && bunx tap" ,
16+ "test:esm" : " npm run build && cd test/esm/ && npm install && node test-import.mjs" ,
1617 "test:coverage-100" : " npm run build && tap --coverage --100" ,
1718 "test:coverage-report" : " npm run build && tap --coverage && nyc report --reporter=text-lcov > coverage.lcov" ,
1819 "test:coverage-ui" : " npm run build && tap --coverage --coverage-report=html" ,
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " esm" ,
3+ "version" : " 1.0.0" ,
4+ "dependencies" : {
5+ "@elastic/elasticsearch" : " file:../.."
6+ }
7+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Licensed to Elasticsearch B.V. under one or more contributor
3+ * license agreements. See the NOTICE file distributed with
4+ * this work for additional information regarding copyright
5+ * ownership. Elasticsearch B.V. licenses this file to you under
6+ * the Apache License, Version 2.0 (the "License"); you may
7+ * not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing,
13+ * software distributed under the License is distributed on an
14+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+ * KIND, either express or implied. See the License for the
16+ * specific language governing permissions and limitations
17+ * under the License.
18+ */
19+
20+ import { Client } from '@elastic/elasticsearch'
21+
22+ new Client ( {
23+ node : 'http://localhost:9200' ,
24+ auth : {
25+ username : 'elastic' ,
26+ password : 'changeme' ,
27+ }
28+ } )
You can’t perform that action at this time.
0 commit comments