duckdb 1.0.0 → 1.0.1-dev19.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,292 @@
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, set-up-electron-versions]
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, set-up-electron-versions]
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: Electron Windows
209
+ runs-on: windows-latest
210
+ needs: [set-up-npm, set-up-electron-versions]
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
+ version: ${{ fromJSON(needs.set-up-electron-versions.outputs.matrix) }}
218
+
219
+ steps:
220
+ # Default Python (3.12) doesn't have support for distutils
221
+ - uses: actions/setup-python@v4
222
+ with:
223
+ python-version: '3.11'
224
+
225
+ - uses: actions/checkout@v3
226
+ with:
227
+ fetch-depth: 0
228
+
229
+ - name: Setup Node
230
+ uses: actions/setup-node@v3
231
+ with:
232
+ node-version: 18
233
+
234
+ - name: Versions
235
+ shell: bash
236
+ run: |
237
+ systeminfo
238
+ node -v
239
+ npm -v
240
+
241
+ - name: Windows Build Tools
242
+ shell: bash
243
+ run: |
244
+ choco install visualstudio2019-workload-vctools -y
245
+
246
+ - name: Node Version
247
+ shell: bash
248
+ run: ./scripts/node_version.sh
249
+ env:
250
+ NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
251
+
252
+ - name: Setup Ccache
253
+ uses: hendrikmuhs/ccache-action@main
254
+ with:
255
+ key: ${{ github.job }}-${{ matrix.version.node }}
256
+ save: ${{ github.ref == 'refs/heads/main' || github.repository != 'duckdb/duckdb-node' }}
257
+ variant: sccache
258
+
259
+ - name: Electron
260
+ shell: bash
261
+ run: ./scripts/node_build_win.sh
262
+ env:
263
+ ELECTRON_VERSION: ${{ matrix.version.electron }}
264
+
265
+ test_matrix:
266
+ needs:
267
+ - linux-electron
268
+ - osx-electron-arm64
269
+ - osx-electron-x64
270
+ - win-electron
271
+ strategy:
272
+ matrix:
273
+ os: [windows-latest, ubuntu-latest, ubuntu-22.04, ubuntu-20.04, windows-2019, macos-12, macos-13, macos-14]
274
+ version: [20]
275
+ runs-on: ${{ matrix.os }}
276
+ steps:
277
+ - uses: actions/setup-node@v4
278
+ with:
279
+ node-version: ${{ matrix.version }}
280
+
281
+ - uses: actions/checkout@v3
282
+ with:
283
+ sparse-checkout: examples
284
+
285
+ - name: Install duckdb
286
+ run: |
287
+ npm install duckdb@next
288
+
289
+ - name: Run minor test
290
+ shell: bash
291
+ run: |
292
+ 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-dev19.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,20 @@ 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
+ if [ -n "$TARGET_ARCH" ] ; then
15
+ # The architecture of your machine
16
+ export npm_config_arch="$TARGET_ARCH"
17
+ export npm_config_target_arch="$TARGET_ARCH"
18
+ fi
19
+ # Download headers for Electron.
20
+ export npm_config_disturl=https://electronjs.org/headers
21
+ # Tell node-pre-gyp that we are building for Electron.
22
+ export npm_config_runtime=electron
23
+ fi
24
+
11
25
  npm install --build-from-source
12
26
  # no tests on releases
13
27
  if [[ ! "$GITHUB_REF" =~ ^(refs/tags/v.+)$ ]] ; then