duckdb 1.0.0 → 1.0.1-dev15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,293 @@
1
+ name: Electron
2
+ on:
3
+ push:
4
+ pull_request:
5
+ workflow_dispatch:
6
+ repository_dispatch:
7
+
8
+ concurrency:
9
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
10
+ cancel-in-progress: false
11
+
12
+ env:
13
+ GH_TOKEN: ${{ secrets.GH_TOKEN }}
14
+ AWS_ACCESS_KEY_ID: ${{secrets.S3_DUCKDB_NODE_ID}}
15
+ AWS_SECRET_ACCESS_KEY: ${{secrets.S3_DUCKDB_NODE_KEY}}
16
+ AWS_DEFAULT_REGION: us-east-1
17
+
18
+ jobs:
19
+ set-up-npm:
20
+ name: Set up NPM
21
+ runs-on: ubuntu-20.04
22
+ env:
23
+ DUCKDB_NODE_BUILD_CACHE: 0
24
+ steps:
25
+ - uses: actions/checkout@v3
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - uses: actions/setup-python@v4
30
+ with:
31
+ python-version: '3.11'
32
+
33
+ - name: Setup NPM
34
+ shell: bash
35
+ run: ./scripts/node_version.sh upload
36
+ env:
37
+ DUCKDB_NODE_BUILD_CACHE: 0 # create a standalone package
38
+ NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
39
+
40
+ # From `npm show electron time --json` and https://www.electronjs.org/docs/latest/tutorial/electron-timelines
41
+ set-up-electron-versions:
42
+ name: Set up Electron version
43
+ runs-on: ubuntu-20.04
44
+ outputs:
45
+ matrix: ${{ steps.setup.outputs.matrix }}
46
+ steps:
47
+ - uses: actions/checkout@v3
48
+ with:
49
+ fetch-depth: 0
50
+
51
+ - id: setup
52
+ run: |
53
+ echo "matrix=$(jq -c '[.[] | select(.electron == ("18.3.15", "22.3.27"))]' < scripts/electron-versions.json)" >> $GITHUB_OUTPUT
54
+
55
+ - name: Check
56
+ run: |
57
+ jq . <<< '${{ steps.setup.outputs.matrix }}'
58
+
59
+ linux-electron:
60
+ name: Electron Linux
61
+ runs-on: ubuntu-20.04
62
+ needs: [set-up-npm, set-up-electron-versions]
63
+ env:
64
+ TARGET_ARCH: ${{ matrix.target_arch }}
65
+ DUCKDB_NODE_BUILD_CACHE: 0
66
+ strategy:
67
+ matrix:
68
+ version: ${{ fromJSON(needs.set-up-electron-versions.outputs.matrix) }}
69
+ target_arch: [ x64, arm64 ]
70
+
71
+ steps:
72
+ - uses: actions/checkout@v3
73
+ with:
74
+ fetch-depth: 0
75
+
76
+ # Default Python (3.12) doesn't have support for distutils
77
+ - uses: actions/setup-python@v4
78
+ with:
79
+ python-version: '3.10'
80
+
81
+ - name: Update apt
82
+ shell: bash
83
+ run: |
84
+ sudo apt-get update -y
85
+
86
+ - name: Install requirements
87
+ shell: bash
88
+ run: |
89
+ sudo apt-get install -y git ninja-build make gcc-multilib g++-multilib wget libssl-dev
90
+
91
+ - name: Setup Ccache
92
+ uses: hendrikmuhs/ccache-action@main
93
+ with:
94
+ key: ${{ github.job }}
95
+ save: ${{ ( github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-node' ) && startsWith(matrix.version.node, '19') }}
96
+
97
+ - name: Setup
98
+ shell: bash
99
+ run: ./scripts/node_version.sh
100
+ env:
101
+ DUCKDB_NODE_BUILD_CACHE: 0 # create a standalone package
102
+ NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
103
+
104
+ - name: Validate Docs
105
+ run: npx jsdoc-to-markdown --files lib/*.js >> $GITHUB_STEP_SUMMARY
106
+ env:
107
+ npm_config_yes: true
108
+
109
+ - name: Electron ${{ matrix.version.electron }}
110
+ shell: bash
111
+ run: ./scripts/node_build.sh ${{ matrix.version.node }}
112
+ env:
113
+ ELECTRON_VERSION: ${{ matrix.version.electron }}
114
+
115
+ osx-electron-arm64:
116
+ name: Electron OSX
117
+ runs-on: macos-14
118
+ needs: set-up-npm
119
+ strategy:
120
+ matrix:
121
+ version: ${{ fromJSON(needs.set-up-electron-versions.outputs.matrix) }}
122
+ target_arch: [ arm64 ]
123
+
124
+ env:
125
+ TARGET_ARCH: ${{ matrix.target_arch }}
126
+ DUCKDB_NODE_BUILD_CACHE: 0
127
+ steps:
128
+ - uses: actions/checkout@v3
129
+ with:
130
+ fetch-depth: 0
131
+
132
+ # Default Python (3.12) doesn't have support for distutils
133
+ - uses: actions/setup-python@v4
134
+ with:
135
+ python-version: '3.11'
136
+
137
+ - name: Setup Ccache
138
+ uses: hendrikmuhs/ccache-action@main
139
+ with:
140
+ key: ${{ github.job }}-${{ matrix.target_arch }}
141
+ save: ${{ ( github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-node' ) && startsWith(matrix.version.node, '19') }}
142
+
143
+ - name: Downgrade curl # fixes a bug with the brew curl that lead to failed downloads
144
+ shell: bash
145
+ run: |
146
+ brew uninstall --ignore-dependencies curl
147
+ which curl
148
+
149
+ - name: Setup
150
+ shell: bash
151
+ run: ./scripts/node_version.sh
152
+ env:
153
+ NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
154
+
155
+ - name: Electron ${{ matrix.version.electron }}
156
+ shell: bash
157
+ run: ./scripts/node_build.sh 18
158
+ env:
159
+ ELECTRON_VERSION: ${{ matrix.version.electron }}
160
+
161
+ osx-electron-x64:
162
+ name: Electron OSX
163
+ runs-on: macos-13
164
+ needs: set-up-npm
165
+ strategy:
166
+ matrix:
167
+ version: ${{ fromJSON(needs.set-up-electron-versions.outputs.matrix) }}
168
+ target_arch: [ x64 ]
169
+
170
+ env:
171
+ TARGET_ARCH: ${{ matrix.target_arch }}
172
+ DUCKDB_NODE_BUILD_CACHE: 0
173
+ steps:
174
+ - uses: actions/checkout@v3
175
+ with:
176
+ fetch-depth: 0
177
+
178
+ # Default Python (3.12) doesn't have support for distutils
179
+ - uses: actions/setup-python@v4
180
+ with:
181
+ python-version: '3.11'
182
+
183
+ - name: Setup Ccache
184
+ uses: hendrikmuhs/ccache-action@main
185
+ with:
186
+ key: ${{ github.job }}-${{ matrix.target_arch }}
187
+ save: ${{ ( github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-node' ) && startsWith(matrix.version.node, '19') }}
188
+
189
+ - name: Downgrade curl # fixes a bug with the brew curl that lead to failed downloads
190
+ shell: bash
191
+ run: |
192
+ brew uninstall --ignore-dependencies curl
193
+ which curl
194
+
195
+ - name: Setup
196
+ shell: bash
197
+ run: ./scripts/node_version.sh
198
+ env:
199
+ NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
200
+
201
+ - name: Electron ${{ matrix.version.electron }}
202
+ shell: bash
203
+ run: ./scripts/node_build.sh 18
204
+ env:
205
+ ELECTRON_VERSION: ${{ matrix.version.electron }}
206
+
207
+ win-electron:
208
+ name: node.js Windows
209
+ runs-on: windows-latest
210
+ needs: set-up-npm
211
+ continue-on-error: ${{ !startsWith(matrix.version.node, '18') && !startsWith(matrix.version.node, '20') && !startsWith(matrix.version.node, '21') }}
212
+ env:
213
+ npm_config_msvs_version: 2019
214
+
215
+ strategy:
216
+ matrix:
217
+ target_arch: [ arm64 ]
218
+ version: ${{ fromJSON(needs.set-up-electron-versions.outputs.matrix) }}
219
+
220
+ steps:
221
+ # Default Python (3.12) doesn't have support for distutils
222
+ - uses: actions/setup-python@v4
223
+ with:
224
+ python-version: '3.11'
225
+
226
+ - uses: actions/checkout@v3
227
+ with:
228
+ fetch-depth: 0
229
+
230
+ - name: Setup Node
231
+ uses: actions/setup-node@v3
232
+ with:
233
+ node-version: 18
234
+
235
+ - name: Versions
236
+ shell: bash
237
+ run: |
238
+ systeminfo
239
+ node -v
240
+ npm -v
241
+
242
+ - name: Windows Build Tools
243
+ shell: bash
244
+ run: |
245
+ choco install visualstudio2019-workload-vctools -y
246
+
247
+ - name: Node Version
248
+ shell: bash
249
+ run: ./scripts/node_version.sh
250
+ env:
251
+ NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
252
+
253
+ - name: Setup Ccache
254
+ uses: hendrikmuhs/ccache-action@main
255
+ with:
256
+ key: ${{ github.job }}-${{ matrix.version.node }}
257
+ save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-node' }}
258
+ variant: sccache
259
+
260
+ - name: Electron
261
+ shell: bash
262
+ run: ./scripts/node_build_win.sh
263
+ env:
264
+ ELECTRON_VERSION: ${{ matrix.version.electron }}
265
+
266
+ test_matrix:
267
+ needs:
268
+ - linux-electron
269
+ - osx-electron-arm64
270
+ - osx-electron-x64
271
+ - win-electron
272
+ strategy:
273
+ matrix:
274
+ os: [windows-latest, ubuntu-latest, ubuntu-22.04, ubuntu-20.04, windows-2019, macos-12, macos-13, macos-14]
275
+ version: [20]
276
+ runs-on: ${{ matrix.os }}
277
+ steps:
278
+ - uses: actions/setup-node@v4
279
+ with:
280
+ node-version: ${{ matrix.version }}
281
+
282
+ - uses: actions/checkout@v3
283
+ with:
284
+ sparse-checkout: examples
285
+
286
+ - name: Install duckdb
287
+ run: |
288
+ npm install duckdb@next
289
+
290
+ - name: Run minor test
291
+ shell: bash
292
+ run: |
293
+ node examples/example.js
@@ -32,5 +32,5 @@ jobs:
32
32
  - name: Create or label issue
33
33
  run: |
34
34
  if [ "$MIRROR_ISSUE_NUMBER" == "" ]; then
35
- gh issue create --repo duckdblabs/duckdb-internal --label "Node.js" --label "High Priority" --title "$TITLE_PREFIX - $PUBLIC_ISSUE_TITLE" --body "See https://github.com/duckdb/duckdb-node/issues/${{ github.event.issue.number }}"
35
+ gh issue create --repo duckdblabs/duckdb-internal --label "Node.js" --title "$TITLE_PREFIX - $PUBLIC_ISSUE_TITLE" --body "See https://github.com/duckdb/duckdb-node/issues/${{ github.event.issue.number }}"
36
36
  fi
@@ -116,7 +116,7 @@ jobs:
116
116
  run: ./scripts/node_build.sh ${{ matrix.node }}
117
117
 
118
118
  osx-nodejs-arm64:
119
- name: node.js OSX
119
+ name: node.js OSX arm64
120
120
  runs-on: macos-14
121
121
  needs: set-up-npm
122
122
  continue-on-error: ${{ matrix.node != '18' && matrix.node != '20' && matrix.node != '21' }}
@@ -179,7 +179,7 @@ jobs:
179
179
  run: ./scripts/node_build.sh ${{ matrix.node }}
180
180
 
181
181
  osx-nodejs-x64:
182
- name: node.js OSX
182
+ name: node.js OSX x64
183
183
  runs-on: macos-13
184
184
  needs: set-up-npm
185
185
  continue-on-error: ${{ matrix.node != '18' && matrix.node != '20' && matrix.node != '21' }}
@@ -251,7 +251,7 @@ jobs:
251
251
 
252
252
  strategy:
253
253
  matrix:
254
- node: [ '16', '17', '18', '19', '20', '21']
254
+ node: [ '16', '17', '18', '19', '20', '21', '22' ]
255
255
  isRelease:
256
256
  - ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
257
257
  exclude:
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
4
  "types": "./lib/duckdb.d.ts",
5
- "version": "1.0.0",
5
+ "version": "1.0.1-dev15.0",
6
6
  "description": "DuckDB node.js API",
7
7
  "gypfile": true,
8
8
  "dependencies": {
@@ -0,0 +1,64 @@
1
+ [
2
+ { "electron": "18.3.15", "node": "16.13" },
3
+ { "electron": "19.0.17", "node": "16.14" },
4
+ { "electron": "19.1.9", "node": "16.14" },
5
+ { "electron": "20.0.3", "node": "16.15" },
6
+ { "electron": "20.1.4", "node": "16.15" },
7
+ { "electron": "20.2.0", "node": "16.15" },
8
+ { "electron": "20.3.12", "node": "16.15" },
9
+ { "electron": "21.0.1", "node": "16.16" },
10
+ { "electron": "21.1.1", "node": "16.16" },
11
+ { "electron": "21.2.3", "node": "16.16" },
12
+ { "electron": "21.3.5", "node": "16.16" },
13
+ { "electron": "21.4.4", "node": "16.16" },
14
+ { "electron": "22.0.3", "node": "16.17" },
15
+ { "electron": "22.1.0", "node": "16.17" },
16
+ { "electron": "22.2.1", "node": "16.17" },
17
+ { "electron": "22.3.27", "node": "16.17" },
18
+ { "electron": "23.0.0", "node": "18.12" },
19
+ { "electron": "23.1.4", "node": "18.12" },
20
+ { "electron": "23.2.4", "node": "18.12" },
21
+ { "electron": "23.3.13", "node": "18.12" },
22
+ { "electron": "24.0.0", "node": "18.14" },
23
+ { "electron": "24.1.3", "node": "18.14" },
24
+ { "electron": "24.2.0", "node": "18.14" },
25
+ { "electron": "24.3.1", "node": "18.14" },
26
+ { "electron": "24.4.1", "node": "18.14" },
27
+ { "electron": "24.5.1", "node": "18.14" },
28
+ { "electron": "24.6.5", "node": "18.14" },
29
+ { "electron": "24.7.1", "node": "18.14" },
30
+ { "electron": "24.8.8", "node": "18.14" },
31
+ { "electron": "25.0.1", "node": "18.15" },
32
+ { "electron": "25.1.1", "node": "18.15" },
33
+ { "electron": "25.2.0", "node": "18.15" },
34
+ { "electron": "25.3.2", "node": "18.15" },
35
+ { "electron": "25.4.0", "node": "18.15" },
36
+ { "electron": "25.5.0", "node": "18.15" },
37
+ { "electron": "25.6.0", "node": "18.15" },
38
+ { "electron": "25.7.0", "node": "18.15" },
39
+ { "electron": "25.8.4", "node": "18.15" },
40
+ { "electron": "25.9.8", "node": "18.15" },
41
+ { "electron": "26.0.0", "node": "18.16" },
42
+ { "electron": "26.1.0", "node": "18.16" },
43
+ { "electron": "26.2.4", "node": "18.16" },
44
+ { "electron": "26.3.0", "node": "18.16" },
45
+ { "electron": "26.4.3", "node": "18.16" },
46
+ { "electron": "26.5.0", "node": "18.16" },
47
+ { "electron": "26.6.10", "node": "18.16" },
48
+ { "electron": "27.0.4", "node": "18.17" },
49
+ { "electron": "27.1.3", "node": "18.17" },
50
+ { "electron": "27.2.4", "node": "18.17" },
51
+ { "electron": "27.3.11", "node": "18.17" },
52
+ { "electron": "28.0.0", "node": "18.18" },
53
+ { "electron": "28.1.4", "node": "18.18" },
54
+ { "electron": "28.2.10", "node": "18.18" },
55
+ { "electron": "28.3.3", "node": "18.18" },
56
+ { "electron": "29.0.1", "node": "20.9" },
57
+ { "electron": "29.1.6", "node": "20.9" },
58
+ { "electron": "29.2.0", "node": "20.9" },
59
+ { "electron": "29.3.3", "node": "20.9" },
60
+ { "electron": "29.4.3", "node": "20.9" },
61
+ { "electron": "30.0.9", "node": "20.11" },
62
+ { "electron": "30.1.2", "node": "20.11" },
63
+ { "electron": "31.0.2", "node": "20.14" }
64
+ ]
@@ -16,6 +16,18 @@ if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ] && [[ "$TARGET_ARCH" == "arm6
16
16
  export CXX=aarch64-linux-gnu-g++
17
17
  fi
18
18
 
19
+ if [ -n "$ELECTRON_VERSION" ] ; then
20
+ # Electron's version.
21
+ export npm_config_target="$ELECTRON_VERSION"
22
+ # The architecture of your machine
23
+ export npm_config_arch="$TARGET_ARCH"
24
+ export npm_config_target_arch="$TARGET_ARCH"
25
+ # Download headers for Electron.
26
+ export npm_config_disturl=https://electronjs.org/headers
27
+ # Tell node-pre-gyp that we are building for Electron.
28
+ export npm_config_runtime=electron
29
+ fi
30
+
19
31
  npm install --build-from-source --target_arch="$TARGET_ARCH"
20
32
 
21
33
  ./node_modules/.bin/node-pre-gyp reveal --target_arch="$TARGET_ARCH"
@@ -8,6 +8,18 @@ which node
8
8
 
9
9
  make clean
10
10
 
11
+ if [ -n "$ELECTRON_VERSION" ] ; then
12
+ # Electron's version.
13
+ export npm_config_target="$ELECTRON_VERSION"
14
+ # The architecture of your machine
15
+ export npm_config_arch="$TARGET_ARCH"
16
+ export npm_config_target_arch="$TARGET_ARCH"
17
+ # Download headers for Electron.
18
+ export npm_config_disturl=https://electronjs.org/headers
19
+ # Tell node-pre-gyp that we are building for Electron.
20
+ export npm_config_runtime=electron
21
+ fi
22
+
11
23
  npm install --build-from-source
12
24
  # no tests on releases
13
25
  if [[ ! "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then