Skip to content

Commit

Permalink
abjad-convert version 0.3.1 (#17)
Browse files Browse the repository at this point in the history
## [0.3.1]  2024-01-18
### Fixed
- deprecate 0.3.0 for wrong publishing
- publish via GitHub actions
- fix mistake in TifinaghToArabic converter
  • Loading branch information
amerharb authored Jan 18, 2024
1 parent 60c4d9a commit 27a491f
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 28 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
- name: validate version in package.json
run: |
if [[ ! $PACKAGE_VERSION =~ ^([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)$ ]]; then
echo "❌ Invalid version name: $PACKAGE_VERSION not suitable for latest release"
echo "❌ Invalid version name: $PACKAGE_VERSION not suitable for @latest publish"
exit 1
else
echo "✅ Valid version: $PACKAGE_VERSION"
echo "✅ Valid @latest version: $PACKAGE_VERSION"
fi
- name: check if version in package.json is matching tag name
Expand All @@ -66,7 +66,10 @@ jobs:
always-auth: true
cache: yarn

- run: yarn workspace $PACKAGE_NAME install --immutable
- run: yarn workspaces foreach --all install --immutable
- run: yarn lint
- run: yarn build
- run: yarn test

- name: publish abjad-convert @latest to npm
if: ${{ env.PACKAGE_NAME == 'abjad-convert' }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: validate version in package.json
run: |
if [[ ! $PACKAGE_VERSION =~ ^([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)-next\.([0-9]|[1-9][0-9]*)$ ]]; then
echo "❌ Invalid version name: $PACKAGE_VERSION not suitable for next tag publish"
echo "❌ Invalid version name: $PACKAGE_VERSION not suitable for @next publish"
exit 1
else
echo "✅ Valid @next version: $PACKAGE_VERSION"
Expand All @@ -66,7 +66,10 @@ jobs:
always-auth: true
cache: yarn

- run: yarn workspace $PACKAGE_NAME install --immutable
- run: yarn workspaces foreach --all install --immutable
- run: yarn lint
- run: yarn build
- run: yarn test

- name: publish abjad-convert @next to npm
if: ${{ env.PACKAGE_NAME == 'abjad-convert' }}
Expand Down
6 changes: 6 additions & 0 deletions packages/abjad-convert/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog
<!-- https://keepachangelog.com/en/1.0.0/ -->

## [0.3.1] 2024-01-18
### Fixed
- deprecate 0.3.0 for wrong publishing
- publish via GitHub actions
- fix mistake in TifinaghToArabic converter

## [0.3.0] 2024-01-17
### Added
- return array of letters of a script
Expand Down
6 changes: 3 additions & 3 deletions packages/abjad-convert/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Abjad Convert
[![Version](https://img.shields.io/badge/version-0.3.0-blue.svg)](https://github.com/amerharb/abjad/tree/version/0.3.0)
[![Version](https://img.shields.io/badge/version-0.3.1-blue.svg)](https://github.com/amerharb/abjad/tree/version/0.3.1)
[![License: GPLv3](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
![Coverage](https://raw.githubusercontent.com/amerharb/abjad/abjad-convert/version/0.3.0/packages/abjad-convert/badges/coverage.svg)
![Github workflow](https://github.com/amerharb/abjad/actions/workflows/lint-test.yaml/badge.svg?branch=abjad-convert/version/0.3.0)
![Coverage](https://raw.githubusercontent.com/amerharb/abjad/abjad-convert/version/0.3.1/packages/abjad-convert/badges/coverage.svg)
![Github workflow](https://github.com/amerharb/abjad/actions/workflows/lint-test.yaml/badge.svg?branch=abjad-convert/version/0.3.1)

**abjad-convert** is a package for converting Abjad alphabets phonetically.

Expand Down
2 changes: 1 addition & 1 deletion packages/abjad-convert/badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions packages/abjad-convert/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "abjad-convert",
"version": "0.3.0",
"version": "0.3.1",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"files": [
Expand Down Expand Up @@ -35,7 +35,6 @@
"make-coverage-badge": "npx make-coverage-badge --report-path coverage/coverage-summary.json --output-path badges/coverage.svg",
"dev": "ts-node src/index.ts",
"lint": "npx eslint . --max-warnings 0",
"lint:fix": "npx eslint . --fix",
"prepublishOnly": "yarn lint && yarn build && yarn test"
"lint:fix": "npx eslint . --fix"
}
}
4 changes: 2 additions & 2 deletions packages/abjad-convert/src/scripts/tifinagh/letters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ const Ti = {
Ye: letters[54], // ⵦ
Yo: letters[55], // ⵧ
ModifierLetterLabializationMark: letters[56], // ⵯ
SeparatorMark: letters[57], //
ConsonantJoiner: letters[58], //
SeparatorMark: letters[57], //
ConsonantJoiner: letters[58], // ⵿
}

export const tifinagh = new Script(
Expand Down
8 changes: 5 additions & 3 deletions packages/abjad-convert/src/scripts/tifinagh/toArabic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export class TifinaghToArabicConverter implements IConverter {
[tifinagh.L.Yab, arabic.L.Ba], // ⴱ -> ب
[tifinagh.L.Yabh, arabic.L.Ba], // ⴲ -> ب P
[tifinagh.L.Yag, arabic.L.Jeem], // ⴳ -> ج G
[tifinagh.L.Yagh, arabic.L.Jeem], // ⴴ -> ج G
[tifinagh.L.Yaghh, arabic.L.Jeem], // ⴴ -> ج G
[tifinagh.L.BerberAcademyYaj, arabic.L.Jeem], // ⴵ -> ج
[tifinagh.L.Yaj, arabic.L.Jeem], // ⴶ -> ج
[tifinagh.L.Yad, arabic.L.Dal], // ⴷ -> د
[tifinagh.L.Yadh, arabic.L.Thal], // ⴸ -> ذ
[tifinagh.L.Yadd, arabic.L.Dad], // ⴹ -> ض
Expand Down Expand Up @@ -65,8 +67,8 @@ export class TifinaghToArabicConverter implements IConverter {
[tifinagh.L.Ye, arabic.L.Yaa], // ⵦ -> ي
[tifinagh.L.Yo, arabic.L.Waw], // ⵧ -> و
[tifinagh.L.ModifierLetterLabializationMark, ''], // ⵯ -> nothing
[tifinagh.L.SeparatorMark, ''], // -> nothing
[tifinagh.L.ConsonantJoiner, ''], // -> nothing
[tifinagh.L.SeparatorMark, ''], // -> nothing
[tifinagh.L.ConsonantJoiner, ''], // ⵿ -> nothing
]
)

Expand Down
12 changes: 12 additions & 0 deletions packages/abjad-convert/test/tifinagh/toArabic.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { describe, expect, it } from '@jest/globals'
import { TifinaghToArabicConverter } from '../../src/scripts/tifinagh/toArabic'

describe('TifinaghToArabicConverter', () => {
describe('convert()', () => {
it('convert ⴰⴱⴲⴳⴴⴵⴶⴷⴸⴹⴺⴻ to ', () => {
const converter = new TifinaghToArabicConverter()
const actual = converter.convert('ⴰⴱⴲⴳⴴⴵⴶⴷⴸⴹⴺⴻ')
expect(actual).toEqual('اببججججدذضظه')
})
})
})
2 changes: 1 addition & 1 deletion packages/abjad-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/joy": "^5.0.0-beta.11",
"abjad-convert": "0.3.0-next.6",
"abjad-convert": "0.3.1-next.2",
"next": "13.5.6",
"react": "^18",
"react-dom": "^18",
Expand Down
10 changes: 5 additions & 5 deletions packages/abjad-web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -545,10 +545,10 @@ __metadata:
languageName: node
linkType: hard

"abjad-convert@npm:0.3.0-next.6":
version: 0.3.0-next.6
resolution: "abjad-convert@npm:0.3.0-next.6"
checksum: a92a5f6a20ee2d228a0384e5d38f10b73dec593991f71c1d88127cab1952e694e3b7a39852ad012b67bde353abee2f8a98c601f6793900b10629a123e14ae5f6
"abjad-convert@npm:0.3.1-next.2":
version: 0.3.1-next.2
resolution: "abjad-convert@npm:0.3.1-next.2"
checksum: 228ac68d8dcf8034c2ca9654bf9791a5bba6bf4d1ae19c572a52515e7f5f13412cb39525b86e84632ded182a85d1de46169762a543c80a50a54b9b0e9eaa861e
languageName: node
linkType: hard

Expand All @@ -560,7 +560,7 @@ __metadata:
"@emotion/styled": "npm:^11.11.0"
"@mui/joy": "npm:^5.0.0-beta.11"
"@types/react": "npm:^18"
abjad-convert: "npm:0.3.0-next.6"
abjad-convert: "npm:0.3.1-next.2"
next: "npm:13.5.6"
react: "npm:^18"
react-dom: "npm:^18"
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1692,10 +1692,10 @@ __metadata:
languageName: node
linkType: hard

"abjad-convert@npm:0.3.0-next.6":
version: 0.3.0-next.6
resolution: "abjad-convert@npm:0.3.0-next.6"
checksum: a92a5f6a20ee2d228a0384e5d38f10b73dec593991f71c1d88127cab1952e694e3b7a39852ad012b67bde353abee2f8a98c601f6793900b10629a123e14ae5f6
"abjad-convert@npm:0.3.1-next.2":
version: 0.3.1-next.2
resolution: "abjad-convert@npm:0.3.1-next.2"
checksum: 228ac68d8dcf8034c2ca9654bf9791a5bba6bf4d1ae19c572a52515e7f5f13412cb39525b86e84632ded182a85d1de46169762a543c80a50a54b9b0e9eaa861e
languageName: node
linkType: hard

Expand Down Expand Up @@ -1730,7 +1730,7 @@ __metadata:
"@emotion/styled": "npm:^11.11.0"
"@mui/joy": "npm:^5.0.0-beta.11"
"@types/react": "npm:^18"
abjad-convert: "npm:0.3.0-next.6"
abjad-convert: "npm:0.3.1-next.2"
next: "npm:13.5.6"
react: "npm:^18"
react-dom: "npm:^18"
Expand Down

0 comments on commit 27a491f

Please sign in to comment.