Skip to content

Commit

Permalink
Release 3.0.0 (#57)
Browse files Browse the repository at this point in the history
* rewrite project with typescript

* remove coverage folder

* remove stringifyVtt and add vtt support to stringify

* add formatTimestamp function and remove old formatting functions

* add test:coverage script

* update badges

* add tests for correclty parsing empty first lines

* rename toMS to parseTimestamp

* update readme

* update readme

* update readme

* update readme

* update readme

* update readme and changelog

* add throwError functino

* add support for optional indexes

* update changelog

* use snapshot for testing

* add test for invalid timestamps

* update package.json description

* add tests for invalid timestamp

* update changelog
  • Loading branch information
gsantiago authored Aug 31, 2020
1 parent 3ae2b92 commit b55c0aa
Show file tree
Hide file tree
Showing 42 changed files with 7,672 additions and 8,281 deletions.
7 changes: 0 additions & 7 deletions .babelrc

This file was deleted.

1 change: 0 additions & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
exclude_paths:
- "dist/*.js"
- "examples/**/*"
- "test/**/*"
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Begin CI...
uses: actions/checkout@v2

- name: Use Node 12
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Use cached node_modules
uses: actions/cache@v2
with:
path: node_modules
key: nodeModules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
nodeModules-
- name: Install dependencies
run: yarn install --frozen-lockfile
env:
CI: true

- name: Lint
run: yarn lint
env:
CI: true

- name: Test
run: yarn test --ci --coverage --maxWorkers=2
env:
CI: true

- name: Build
run: yarn build
env:
CI: true
35 changes: 3 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,5 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

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

# Coverage directory used by tools like istanbul
coverage
.nyc_output

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

# node-waf configuration
.lock-wscript

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

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
.DS_Store
node_modules

# Demo tests
demo.js

# IDE
.idea
dist
coverage
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
examples
.codeclimate.yml
.editorconfig
.travis.yml
coverage
.github
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [3.0.0] - 2020-08-31
- Rewrite the project with TypeScript
- Fixes #43 and #39
- Update the API to export only these functions:
- `parse(input: string): Caption[]`
- `stringify(captions: Caption[], options?: { format: 'srt' | 'vtt }): string`
- `resync(captions: Caption[], time: number): Caption[]`
- `parseTimestamp(timestamp: string): number`
- `parseTimestamps(timestamps: string): Timestamp`
- `formatTimestamp(timestamp: number, options?: { format: 'srt' | 'vtt' }): string`
- `parse` supports optional indexes

## [2.0.5] - 2020-08-28
- Remove zero-fill dependency
- Rewrite and refactor tests with Jest
Expand Down
Loading

0 comments on commit b55c0aa

Please sign in to comment.