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

convert project to Deno + dnt #11

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 8 additions & 28 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,22 @@ name: build openCV on ubuntu

on:
push:
branches: [ "master", "piercus", "test" ]
paths: ['src/**', 'dist/**', 'package.json', 'pnpm-lock.yaml', 'pnpmfile.js', 'test/**', 'bin/**', 'scripts/**', '.github/workflows/linux-build.yml' ]
branches: [ "master", "piercus", "test", "deno" ]
paths: ['src/**', 'deno.json', '.github/workflows/linux-build.yml' ]
pull_request:
branches: [ "master", "piercus" ]
paths: ['src/**', 'dist/**', 'package.json', 'pnpm-lock.yaml', 'pnpmfile.js', 'test/**', 'bin/**', 'scripts/**', '.github/workflows/linux-build.yml' ]
paths: ['src/**', 'deno.json', '.github/workflows/linux-build.yml' ]

#env:
# OPENCV4NODEJS_AUTOBUILD_OPENCV_VERSION : 4.7.0

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
# node-version: [14.x, 16.x, 18.x]
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
#- name: Install cmake
# run: sudo apt-get install -y cmake
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.14.0
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: denoland/setup-deno@v1
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm run build
- name: node bin/main.js --version 4.9.0
run: node bin/main.js
- run: pnpm test
deno-version: v1.x
- name: deno run -A main.ts --version 4.10.0
run: deno run -A main.ts --version 4.10.0
- run: deno test -A
26 changes: 7 additions & 19 deletions .github/workflows/linux-detect.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Use OpenCV from Ubuntu apt
on:
push:
branches: [ "never", "master", "test" ]
paths: ['src/**', 'dist/**', 'package.json', 'pnpm-lock.yaml', 'pnpmfile.js', 'test/**', 'bin/**', 'scripts/**', '.github/workflows/linux-detect.yml' ]
branches: [ "never", "master", "deno" ]
paths: ['src/**', 'deno.json', 'src/*.ts', '.github/workflows/linux-detect.yml' ]
# pull_request:
# branches: [ "master" ]
jobs:
Expand All @@ -20,24 +20,12 @@ jobs:
OPENCV4NODEJS_DISABLE_AUTOBUILD: 1
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: denoland/setup-deno@v1
with:
version: 8.14.0
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]

deno-version: v1.x
- name: Install OpenCV ${{ matrix.opencv_version }}
run: |
sudo apt update
sudo apt install libopencv-dev
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- run: pnpm run build
# --prebuild=latestBuild
echo sudo apt update; sudo apt install libopencv-dev
- name: Detect OpenCV
run: node bin/main.js --verbose
- run: pnpm test
run: deno run -A main.ts --verbose
- run: deno test -A
23 changes: 6 additions & 17 deletions .github/workflows/mac-detect.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Use OpenCV from Brew
on:
push:
branches: [ "never", "master", "test" ]
paths: ['src/**', 'dist/**', 'package.json', 'pnpm-lock.yaml', 'pnpmfile.js', 'test/**', 'bin/**', 'scripts/**', '.github/workflows/mac-detect.yml' ]
branches: [ "never", "master", "deno" ]
paths: ['src/**', 'deno.json', '*.ts', '.github/workflows/mac-detect.yml' ]
# pull_request:
# branches: [ "master" ]
jobs:
Expand All @@ -20,23 +20,12 @@ jobs:
OPENCV4NODEJS_DISABLE_AUTOBUILD: 1
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: denoland/setup-deno@v1
with:
version: 8.14.0
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]

deno-version: v1.x
- name: Install OpenCV ${{ matrix.opencv_version }}
run: |
brew install opencv@${{ matrix.opencv_version }}
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- run: pnpm run build
# --prebuild=latestBuild
- name: Detect OpenCV
run: node bin/main.js --verbose
- run: pnpm test
run: deno run -A main.ts --verbose
- run: deno test -A
26 changes: 7 additions & 19 deletions .github/workflows/w64-detect.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Use openCV from Chocolatey
on:
push:
branches: [ "never", "test" ]
paths: ['src/**', 'dist/**', 'package.json', 'pnpm-lock.yaml', 'pnpmfile.js', 'test/**', 'bin/**', 'scripts/**', '.github/workflows/w64-detect.yml' ]
branches: [ "never", "test", "deno" ]
paths: ['src/**', 'deno.json', '*.ts', '.github/workflows/w64-detect.yml' ]
# pull_request:
# branches: [ "master" ]
jobs:
Expand All @@ -14,30 +14,18 @@ jobs:
matrix:
# node-version: [14.x, 16.x, 18.x]
opencv_version:
- 4.9.0
- 4.10.0
- 4.6.0
env:
OPENCV4NODEJS_DISABLE_AUTOBUILD: 1
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: denoland/setup-deno@v1
with:
version: 8.14.0
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]

deno-version: v1.x
- name: Install OpenCV ${{ matrix.opencv_version }}
run: |
choco install OpenCV -y --version ${{ matrix.opencv_version }}

- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- run: pnpm run build
# --prebuild=latestBuild
- name: Detect OpenCV
run: node bin/main.js --verbose
- run: pnpm test
run: deno run -A main.ts --verbose
- run: deno test -A
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ latest
dist/esm/helper
dist/cjs/helper
dist/types/
npm/
131 changes: 0 additions & 131 deletions .vscode/launch.json

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"deno.enable": true
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## V 1.1.1
- update deps versions

## V 1.1.0

## V 1.0.0

- project converted to deno
- the npmjs project is generated by deno dnt
- @arethetypeswrong/cli find no issue in CJS and ESM exports
- New Log export
- New pc export (like picocolors)

## V 0.9.3

- export .d.ts file twice, to avoid ESM / CJS warnings
Expand Down
Loading
Loading