Skip to content

Commit

Permalink
Merge branch 'main' into hybrid-clock
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerwins committed May 7, 2024
2 parents e23b28c + ba635e6 commit b729094
Show file tree
Hide file tree
Showing 118 changed files with 21,180 additions and 17,992 deletions.
46 changes: 18 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,24 @@ jobs:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Cache Node Moudles
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install

- run: npm install
- run: npm run lint
- run: npm run build
- run: npm run build:examples
Expand All @@ -34,31 +47,8 @@ jobs:
uses: codecov/codecov-action@v1
with:
file: ./coverage/lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Run benchmark
run: npm run benchmark | tee output.txt
# Download previous benchmark result from cache (if exists)
- name: Download previous benchmark data
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-benchmark
# Run `github-action-benchmark` action
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
with:
# What benchmark tool the output.txt came from
tool: 'benchmarkjs'
# Where the output from the benchmark tool is stored
output-file-path: output.txt
# Where the previous data file is stored
external-data-json-path: ./cache/benchmark-data.json
# Workflow will fail when an alert happens
fail-on-alert: false
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Enable comment always
comment-always: true
# Save only on the main to compare the benchmarks between PR and base branch
save-data-file: ${{ github.ref == 'refs/heads/main' }}
run: npm run test:bench
14 changes: 10 additions & 4 deletions .github/workflows/create-yorkie-app-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,22 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2

- name: Setup Node 🔧
uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: package-lock.json
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: cd tools/create-yorkie-app && npm run build
- run: cd tools/create-yorkie-app && npm publish --provenance

- name: Install and Build 🔧
run: |
cd tools/create-yorkie-app
npm install
npm run build
- name: Publish 🚀
run: cd tools/create-yorkie-app && npm publish --provenance
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/devtools-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Yorkie Devtools Extension
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- tools/devtools/**
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/[email protected]

- name: Setup Node 🔧
uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'

- name: Install and Build 🔧
run: |
cd tools/devtools
npm install
npm run build
- name: Deploy 🚀
uses: PlasmoHQ/bpp@v3
with:
keys: ${{ secrets.BPP_KEYS }}
chrome-file: 'tools/devtools/dist/chrome-mv3-prod.zip'
17 changes: 14 additions & 3 deletions .github/workflows/github-page-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,22 @@ jobs:
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Install and Build 🔧
- name: Cache Node Moudles
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install

- name: Build 🔧
run: |
npm install
npm run build
npm run predoc
npm run build:docs
npm run build:examples
npm run build:ghpages
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: npm-publish
on:
release:
types: [ created ]
types: [created]
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,8 +18,21 @@ jobs:
cache: 'npm'
cache-dependency-path: package-lock.json
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build && npm run publish:prepare
- run: cd bundle && npm publish --provenance

- name: Cache Node Moudles
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm install

- run: npm run build
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,53 @@ and Yorkie JS SDK adheres to [Semantic Versioning](https://semver.org/spec/v2.0.

## [Unreleased]

### Added

- Add Tree concurrency tests by @justiceHui, @hackerwins in https://github.com/yorkie-team/yorkie-js-sdk/pull/792

### Changed

- Reset online clients when stream is disconnected by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/796
- Remove Client.subscribe by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/789
- Replace `benchmark.js` with `vitest bench` by @hackerwins in https://github.com/yorkie-team/yorkie-js-sdk/pull/793
- Replace webpack with vite by @hackerwins in https://github.com/yorkie-team/yorkie-js-sdk/pull/795
- Replace TSDoc with TypeDoc by @hackerwins in https://github.com/yorkie-team/yorkie-js-sdk/pull/800
- Add vite-plugin-dts to build yorkie-js-sdk.d.ts by @hackerwins in https://github.com/yorkie-team/yorkie-js-sdk/pull/801
- Update examples version to v0.4.18 by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/785

### Fixed

- Export OpSource by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/786
- Add window type condition for using devtools by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/787
- Handle exception for the client without proper presence value in example by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/798
- Update GitHub Action workflow for create-yorkie-app by @hackerwins in https://github.com/yorkie-team/yorkie-js-sdk/pull/790

## [0.4.18] - 2024-04-23

### Added

- Add history tab and enhance visualization features to devtools by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/760

## [0.4.17] - 2024-04-19

### Added

- Add RealtimeSyncOff and refactor interface of SyncMode by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/772

### Fixed

- Fix issue of incorrect display of remote selection in Quill example by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/769
- Reverse TreeChanges when Deleting in Tree by @raararaara in https://github.com/yorkie-team/yorkie-js-sdk/pull/774
- Remove unnecessary stubs from the test code by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/776
- Provide CODECOV_TOKEN to codecov-action by @hackerwins in https://github.com/yorkie-team/yorkie-js-sdk/pull/777
- Fix issue of referencing process object on browser by @blurfx in https://github.com/yorkie-team/yorkie-js-sdk/pull/778

## [0.4.16] - 2024-03-29

### Added

- Implement Protocol Changes for Tree.RemoveStyle by @raararaara in https://github.com/yorkie-team/yorkie-js-sdk/pull/755

## [0.4.15] - 2024-03-11

### Added
Expand Down
8 changes: 4 additions & 4 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### 1. Update the version number.

- Update `version` in [package.json](https://github.com/yorkie-team/yorkie-js-sdk/blob/main/package.json#L3) and [package.publish.json](https://github.com/yorkie-team/yorkie-js-sdk/blob/main/package.publish.json#L3).
- Update `version` in [package.json](https://github.com/yorkie-team/yorkie-js-sdk/blob/main/package.json#L3).

### 2. Write changelog of this version in [CHANGELOG.md](https://github.com/yorkie-team/yorkie-js-sdk/blob/main/CHANGELOG.md).

Expand All @@ -16,20 +16,20 @@ Copy the release notes automatically generated by GitHub and categorize them as
4. Click on the `Generate release notes` button.
5. Copy the content generated into the body and categorize each item.

<img width="600" alt="image" src="https://user-images.githubusercontent.com/81357083/233356577-acc1dd33-5ad5-4b51-9f2e-6c771a063ccd.png">
<img width="600" alt="image" src="https://user-images.githubusercontent.com/81357083/233356577-acc1dd33-5ad5-4b51-9f2e-6c771a063ccd.png">

### 3. Create [Pull Request](https://github.com/yorkie-team/yorkie-js-sdk/commits/main/CHANGELOG.md) for changelog and merge it into main.

### 4. Publish [a new release](https://github.com/yorkie-team/yorkie-js-sdk/releases/new).

After creating the release in step 2, click on the `Publish release` button.

### 5. Deploy
### 5. Deploy

When you publish the release in step 4, [GitHub action](https://github.com/yorkie-team/yorkie-js-sdk/blob/main/.github/workflows/npm-publish.yml) will deploy Yorkie JS SDK to [npm](https://www.npmjs.com/package/yorkie-js-sdk).
After that, it will be updated on the [cdn](https://cdnjs.com/libraries/yorkie-js-sdk) after some time.

### 6. Update examples
### 6. Update examples

1. Update the version of `yorkie-js-sdk` in the `package.json` of each project in the [examples](https://github.com/yorkie-team/yorkie-js-sdk/tree/main/examples) folder.
2. Run and build each project, and if an error occurs, fix it.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ Thanks goes to these incredible people:
<a href="https://github.com/yorkie-team/yorkie-js-sdk/graphs/contributors">
<img src="https://contrib.rocks/image?repo=yorkie-team/yorkie-js-sdk" />
</a>

40 changes: 0 additions & 40 deletions config/api-extractor.json

This file was deleted.

Loading

0 comments on commit b729094

Please sign in to comment.