Skip to content
Draft
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
19 changes: 19 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": "node 12.0"
}
]
],
"plugins": [
"@babel/plugin-transform-flow-strip-types",
[
"@babel/plugin-transform-block-scoping",
{
"throwIfClosureRequired": true
}
]
]
}
13 changes: 13 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[ignore]
.*/node_modules/.*

[include]

[libs]
./decls

[options]
suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore
munge_underscores=true
module.ignore_non_literal_requires=true
esproposal.decorators=ignore
43 changes: 13 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,23 @@
name: CI
on: [push, pull_request]
permissions:
contents: read

jobs:
# Wasm pipeline (the only pipeline now that the legacy JS impl is gone):
# uses the committed js/reg.wasm so we don't pay the wasi-sdk toolchain
# cost on every PR. Rust unit tests (`cargo test`) and the JS CLI/library
# integration tests (`node:test` via `pnpm test` in `js/`) both run here
# and cover junit/reg.json schema compat, -F/-X/-E, and the `compare()`
# EventEmitter surface (reg-suit drop-in).
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
- uses: actions/setup-node@dda4788290998366da86b6a4f497909644397bb2
with:
node-version: 20
# `reg_core` embeds `report/ui/dist/{report.js,style.css}` via
# `include_str!`, so `cargo test` fails before we even compile unless
# we materialise them first. The `build-ui.sh` script clones
# `reg-viz/reg-cli-report-ui` at a pinned tag and builds it with
# yarn (enabled via corepack in setup-node).
- name: enable corepack (yarn for report-ui build)
node-version: 22
- name: corepack enable
run: corepack enable
- name: build report-ui (report.js + style.css)
run: sh ./scripts/build-ui.sh v0.3.0
- uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
with:
toolchain: stable
- name: cargo test (reg_core)
run: cargo test -p reg_core --lib
- name: install
- name: corepack prepare pnpm
run: corepack prepare pnpm@10.14.0 --activate
- name: pnpm install
run: pnpm install --frozen-lockfile
- name: build (dist + bundle reg.wasm)
run: pnpm build
- name: test (CLI + library)
run: pnpm test
- name: install chrome for puppeteer
run: pnpm exec puppeteer browsers install chrome
- name: flow
run: pnpm run flow
- name: test
run: pnpm run test
161 changes: 1 addition & 160 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/node_modules/*
report/assets/cv-wasm_browser.*
report/ui
/test/__workspace__/
/.libtest-*
/.phase-h-*
/.phase-h-subdir/
/test/__workspace__/*
.DS_Store
report.html
/diff/*
Expand All @@ -13,159 +10,3 @@ report.html
/screenshot/*
sample/index.html
from-json.html
### Generated by gibo (https://github.com/simonwhitaker/gibo)
### https://raw.github.com/github/gitignore/e5323759e387ba347a9d50f8b0ddd16502eb71d4/Node.gitignore

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*


### https://raw.github.com/github/gitignore/e5323759e387ba347a9d50f8b0ddd16502eb71d4/Rust.gitignore

# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

wasi-sdk-21.0
wasi-sdk-*
m.md

Empty file added .npmignore
Empty file.
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ printWidth: 120
tabWidth: 2
singleQuote: true
trailingComma: "all"
semi: true
jsxBracketSameLine: false
parser: "flow"
semi: true
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
os:
- linux

language: node_js
node_js:
- '12'
- '10'
addons:
apt:
packages:
- xvfb
before_install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
13 changes: 0 additions & 13 deletions Cargo.toml

This file was deleted.

6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,3 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

![reg-viz](https://raw.githubusercontent.com/reg-viz/artwork/master/repository/footer.png)

```
export WASI_VERSION_FULL=24.0
export WASI_SDK_PATH=`pwd`/wasi-sdk-${WASI_VERSION_FULL}
CFLAGS="--sysroot ${WASI_SDK_PATH}/share/wasi-sysroot" cargo build --release --target=wasm32-wasip1-threads
cp target/wasm32-wasip1-threads/release/reg_cli.wasm js/reg.wasm
```
20 changes: 20 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Test against the latest version of this Node.js version
environment:
nodejs_version: "12"

# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# install modules
- npm i -g yarn
- yarn install --frozen-lockfile

# Post-install test scripts.
test_script:
# run tests
- yarn build
- yarn run test

# Don't actually build.
build: off
38 changes: 0 additions & 38 deletions build.config.ts

This file was deleted.

14 changes: 0 additions & 14 deletions crates/reg_cli/Cargo.toml

This file was deleted.

Loading
Loading