Skip to content

Commit

Permalink
Merge pull request #2 from iLib-js/setup
Browse files Browse the repository at this point in the history
Additional setup for the loctool-webos-javascript repo to work properly here
  • Loading branch information
gouniLee authored Feb 4, 2025
2 parents 208aa26 + 1e55f50 commit 5249bfc
Show file tree
Hide file tree
Showing 10 changed files with 381 additions and 132 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# based on https://github.com/changesets/action?tab=readme-ov-file#with-publishing
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup npm token
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/test-affected.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test Affected

on: pull_request

jobs:
test-affected:
name: Test Affected
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# workaround for `git error: fatal: bad object` when using `--affected`:
# ensure PR base commit is fetched
# per https://stackoverflow.com/a/78153130
fetch-depth: $(( ${{ github.event.pull_request.commits }} + 1 ))
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run affected tests
run: pnpm test:ci:affected
env:
# temporary workaround for `Failed to resolve base ref 'main' from GitHub Actions event`:
# manually set PR base commit ref
# per https://github.com/vercel/turborepo/issues/9320#issuecomment-2499219314
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }}
30 changes: 30 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test All

on:
push:
branches:
- main

jobs:
test-all:
name: Test All
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm test:ci
2 changes: 0 additions & 2 deletions packages/ilib-loctool-webos-javascript/.gitignore

This file was deleted.

156 changes: 156 additions & 0 deletions packages/ilib-loctool-webos-javascript/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# ilib-loctool-webos-javascript

## 1.10.6

- Updated dependencies. (loctool: 2.24.0)
- Converted all the unit tests from `nodeunit` to `jest`.
- Modified to use the same variable name as the `ilib-loctool-webos-json-resource` package name in code.

## 1.10.5

- Removed `npm-shrinkwrap.json`. It takes a bigger memory size than I expected on webOS. so I decided not to maintain the file here.

## 1.10.4

- Updated loctool dependency information to be written both `peerDependencies` and `devDependencies`.

## 1.10.3

- Moved `loctool` package to `peerDependencies` in `package.json`.

## 1.10.2

- Moved `loctool` package to `dependencies` in `package.json` because it is actually used in codes.

## 1.10.1

- Updated dependencies. (loctool: 2.23.1)
- Updated to be included `npm-shrinkwrap.json` in the published files.

## 1.10.0

- Updated dependencies. (loctool: 2.22.0)
- Added ability to disable pseudo-localization in plugin when a project's pseudo-localization is enabled.
~~~~
"settings": {
"javascript": {
"disablePseudo": true
}
}
~~~~
## 1.9.0
- Updated dependencies. (loctool: 2.21.0)
- Updated not to load common data repeatedly if it's loaded from another plugin in a project.
## 1.8.2
- Updated dependencies.
## 1.8.1
- Updated dependencies.
## 1.8.0
- Updated dependencies. (loctool: 2.20.2)
- Fixed an issue where common's locale inheritance data values were not checked.
- Updated to match translation's reskey and resource's reskey when they are different.
- Updated to check common data's as well when getting base translation.
## 1.7.0
- Updated to custom locale inheritance feature work properly in `generate` mode.
- Added guard code to prevent errors when the common data path is incorrect.
- Updated to generate resources by comparing base translation data even in `generate` mode.
- Fixed an issue where localeinherit related data was not created properly according to the order of locales.
- Fixed an issue where data is duplicated when it is the same as base translation in `generate` mode.
## 1.6.0
- Updated dependencies. (loctool: 2.20.0)
- Added ability to define custom locale inheritance.
~~~~
"settings": {
"localeInherit": {
"en-AU": "en-GB"
}
}
~~~~
- Added ability to use common locale data.
- App's xliff data has a higher priority, if there's no matched string there, then loctool checks data in the commonXliff directory.
~~~~
"settings": {
"webos": {
"commonXliff": "./common"
}
}
~~~~
- Fixed an issue where multi-space could not be properly parsed in key-value use cases.
## 1.5.0
- Updated dependencies. (loctool: 2.18.0)
- Added ability to override language default locale.
~~~~
"settings": {
"localeMap": {
"es-CO": "es"
}
}
~~~~
- Updated generate mode to use loctool's new public method.
## 1.4.7
- Updated to check language default locale translation not to generate duplicate resources.
- Updated to make source and key policy clear to avoid confusion.
## 1.4.6
- Updated dependencies. (loctool: 2.16.3)
- Used the logger provided by the loctool instead of using log4js directly.
- Added node 16 version testing for circleCI. (minimum version of node is v10.0.0)
- Fixed an issue where the $L(key,value) usage could not be parsed properly.
## 1.4.5
- Update dependent module version to have the latest one.(loctool: 2.16.2)
## 1.4.4
- Fixed pseudo localization to work properly
- Updated dependent module version to have the latest one.(loctool: 2.14.1)
## 1.4.3
- Updated dependent module version to have the latest one.(loctool: 2.13.0)
## 1.4.2
- Updated dependent module version to have the latest one.(loctool: 2.12.0)
## 1.4.1
- Updated dependent module version to have the latest one.(loctool: 2.10.3)
## 1.4.0
- Removed commented lines before parsing so that strings in the comments will not be extracted.
- Updated dependent module version to have the latest one.
## 1.3.0
- Updated regular Expression to extract case when resbundle object name is not `rb` or `RB`.
- Updated code to print log with log4js.
- Supported loctool's generate mode.
## 1.2.0
- Supported pseudo localization
## 1.1.0
- Supported xliff 2.0 style
- Update code to return translation data properly with xliff 2.0 format
Loading

0 comments on commit 5249bfc

Please sign in to comment.