Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to libzim7 #72

Merged
merged 48 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6486cfd
Move to libzim7
kelvinhammond Dec 22, 2021
2d4d475
Update libzim version
kelvinhammond Jan 30, 2022
ab50ec4
Convert Archive.getUuid to use static_cast<std::string>(archive_->get…
kelvinhammond Feb 6, 2022
f7a3eea
Allow custom content providers and multi-threading
kelvinhammond Feb 6, 2022
fa616a2
Removed unneeded files
kelvinhammond Mar 15, 2022
e7954d6
Updated editorconfig
kelvinhammond Mar 15, 2022
784e3f4
Added some tests
kelvinhammond Mar 15, 2022
6d0404a
Removed unused code
kelvinhammond Mar 15, 2022
55a987a
Removed writer and updated archive.getUuid()
kelvinhammond Mar 15, 2022
db4c85c
Added missing methods for creator
kelvinhammond Mar 23, 2022
6ffff91
Updated entry validation
kelvinhammond Mar 26, 2022
cad0449
Added more tests and typescript declarations
kelvinhammond Mar 26, 2022
6d412f2
Minor change to Item binding, remove redundant check for external
kelvinhammond Mar 26, 2022
7a79034
Removed unused zim.ts
kelvinhammond Mar 26, 2022
d6c64c5
Bump typescript target to es6
kelvinhammond Mar 26, 2022
77b64d5
Added tests for iterByPath and updated typescript definitions to be v…
kelvinhammond Mar 26, 2022
634babc
Finished tests for Archive
kelvinhammond Mar 26, 2022
b1b4442
Track which thread the contentProvider is called from and handle retu…
kelvinhammond Mar 31, 2022
0c86ea4
Added search and indexing
kelvinhammond Mar 31, 2022
1250d52
Rename mimetype field
kelvinhammond Apr 7, 2022
d518657
Search query to std::string
kelvinhammond Apr 13, 2022
73c3cdc
Added tests for search
kelvinhammond Apr 13, 2022
4ecdabb
Added tests for Suggestion Search
kelvinhammond Apr 13, 2022
cbfcbab
Removed testScript
kelvinhammond Apr 13, 2022
8aa09c1
Linted code
kelvinhammond Apr 13, 2022
d1194bd
Allow runtime references in CPP code
kelvinhammond Apr 13, 2022
6980c74
Updated package-lock.json
kelvinhammond Apr 13, 2022
0fcf919
Updated bindings for xcode / macosx
kelvinhammond Apr 13, 2022
7325adf
Updated prepare command to ensure dist directory
kelvinhammond Apr 13, 2022
86e337d
Remove shell expansion from package.json prepare
kelvinhammond Apr 13, 2022
827b5bb
Updated libzim version to 7.2.0
kelvinhammond Apr 16, 2022
765d65f
Use HTTPS in place of HTTP
kelson42 Apr 23, 2022
995476a
Use actions/setup-node@v3
kelson42 Apr 23, 2022
fb98dc7
Use pinned version of macOS in CI
kelson42 Apr 23, 2022
c1ce900
Update jest config and remove tsc (typescript) compilation of tests
kelvinhammond Apr 28, 2022
ed43830
Update makeLargeZim test
kelvinhammond Apr 28, 2022
1df7e24
Remove tsc command from workflow as its no longer required
kelvinhammond Apr 28, 2022
cdc665b
Use array of instead of forEach for tests
kelvinhammond Apr 28, 2022
bd91673
Move addItem to an AsyncWorker with a Promise
kelvinhammond May 7, 2022
ef75d47
Update libzim version to 7.2.1
kelvinhammond May 7, 2022
fadf822
Fixed large zim creation issues
kelvinhammond May 8, 2022
e41d69d
Bump node version to 7.2.2
kelvinhammond May 23, 2022
555bf3e
Updated dependencies
kelvinhammond Jun 30, 2022
b66d6cb
Fixes #79: Remove lzma compression option
kelvinhammond Jul 19, 2022
2d6cd8c
Fix tests for compression options count
kelvinhammond Jul 19, 2022
abbb0f3
Update dependencies
kelvinhammond Jul 19, 2022
36f7f63
Updated to libzim8 and change getContentProvider
kelvinhammond Aug 13, 2022
b4db7ca
Don't wrap FileItem and StringItem
kelvinhammond Aug 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ indent_style = tab
[*.{c,h,cpp,cpp,hpp}]
indent_size = 4

[*.{js,ts}]
kelson42 marked this conversation as resolved.
Show resolved Hide resolved
indent_size = 2

2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
LIBZIM_VERSION=6.3.2
LIBZIM_VERSION=8.0.0
17 changes: 4 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:

macOS:
runs-on: macos-latest
runs-on: macos-11

strategy:
matrix:
Expand All @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3

- name: Setup python 3.6
uses: actions/setup-python@v1
Expand All @@ -39,9 +39,6 @@ jobs:
- name: installing typescript
run: npm i -g typescript

- name: running tsc
run: tsc

- name: running test
run: npm run test

Expand All @@ -55,7 +52,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -71,9 +68,6 @@ jobs:
- name: installing typescript
run: npm i -g typescript

- name: running tsc
run: tsc

- name: running test
run: npm run test

Expand All @@ -87,7 +81,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -106,9 +100,6 @@ jobs:
- name: installing codecov
run: npm i codecov

- name: running tsc
run: tsc

- name: running test
run: npm run test

Expand Down
3 changes: 3 additions & 0 deletions CPPLINT.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ filter=-build/namespaces_literals
filter=-build/include_subdir
filter=-legal/copyright

# Allow runtime references
filter=-runtime/references
kelson42 marked this conversation as resolved.
Show resolved Hide resolved

# Ignore code that isn't ours.
exclude_files=third_party

Expand Down
8 changes: 3 additions & 5 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"libraries": [
"-Wl,-rpath,'$$ORIGIN'",
"-L<(libzim_dir)/lib/x86_64-linux-gnu",
"<(libzim_dir)/lib/x86_64-linux-gnu/libzim.so.6",
"<(libzim_dir)/lib/x86_64-linux-gnu/libzim.so.7",
],
}],
["libzim_local!='true' and OS=='mac'", {
Expand All @@ -33,7 +33,8 @@
"xcode_settings": {
"GCC_SYMBOLS_PRIVATE_EXTERN": "YES", # -fvisibility=hidden
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"LD_RUNPATH_SEARCH_PATHS": "@loader_path/"
"LD_RUNPATH_SEARCH_PATHS": "@loader_path/",
"OTHER_CFLAGS": [ "-std=c++17", "-fexceptions" ],
},
"libraries": ["-Wl,-rpath,@loader_path/", "-L<(libzim_dir)/lib", "-lzim"],
}],
Expand All @@ -45,9 +46,6 @@
"cflags_cc": [ "-std=c++17", "-fexceptions" ],
"sources": [
"src/module.cc",
"src/article.cc",
"src/reader.cc",
"src/writer.cc",
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")",
Expand Down
14 changes: 7 additions & 7 deletions bundle-libzim.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ if (!isMacOS && !isLinux) {
}

if (isLinux) {
console.info(`Copying libzim.so.6 to build folder`)
exec(`cp download/lib/x86_64-linux-gnu/libzim.so.6 build/Release/libzim.so.6`)
exec(`ln -sf build/Release/libzim.so.6 build/Release/libzim.so`) // convienience only, not required
console.info(`Copying libzim.so.7 to build folder`)
exec(`cp download/lib/x86_64-linux-gnu/libzim.so.7 build/Release/libzim.so.7`)
exec(`ln -sf build/Release/libzim.so.7 build/Release/libzim.so`) // convienience only, not required
}
if (isMacOS) {
console.info(`Copying libzim.6.dylib to build folder`);
exec(`cp download/lib/libzim.6.dylib build/Release/libzim.6.dylib`)
exec(`ln -sf build/Release/libzim.6.dylib build/Release/libzim.dylib`) // convienience only, not required
console.info(`Copying libzim.7.dylib to build folder`);
exec(`cp download/lib/libzim.7.dylib build/Release/libzim.7.dylib`)
exec(`ln -sf build/Release/libzim.7.dylib build/Release/libzim.dylib`) // convienience only, not required
console.info(`Fixing rpath`)
exec(`install_name_tool -change libzim.6.dylib @loader_path/libzim.6.dylib build/Release/zim_binding.node`)
exec(`install_name_tool -change libzim.7.dylib @loader_path/libzim.7.dylib build/Release/zim_binding.node`)
}
2 changes: 1 addition & 1 deletion download-libzim.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (!isMacOS && !isLinux) {

let osPrefix = (isMacOS) ? 'macos' : 'linux';
const urls = [
`http://download.openzim.org/release/libzim/libzim_${osPrefix}-x86_64-${process.env.LIBZIM_VERSION}.tar.gz`,
`https://download.openzim.org/release/libzim/libzim_${osPrefix}-x86_64-${process.env.LIBZIM_VERSION}.tar.gz`,
].filter(a => a);

for (let url of urls) {
Expand Down
18 changes: 0 additions & 18 deletions jest.config.js

This file was deleted.

Loading