Skip to content

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tsvetomir authored Jan 16, 2023
1 parent 4548b71 commit ea44512
Show file tree
Hide file tree
Showing 15 changed files with 12,163 additions and 14,424 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Check out branch
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all branches

Expand All @@ -26,8 +26,7 @@ jobs:
run: npm run lint

- name: Publish release
run: npx ci-semantic-release
run: npx semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}

16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
concurrency:
group: ${{ github.ref }}-ci
cancel-in-progress: true

steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install modules
run: npm ci --ignore-scripts

- name: Lint
run: npm run lint

- name: Test
run: npm run test
9 changes: 3 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,15 @@ on: workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Check out master
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: master
fetch-depth: 0 # Fetch all branches
token: ${{ secrets.GH_TOKEN }}

- name: Install modules
run: npm install @telerik/semantic-prerelease@1 --no-save

- name: Fast-forward master to develop
run: npx release-master
run: ./tools/release-master
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
npm run test
24 changes: 22 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can contribute by:

* Submitting bug-fixes.
* Proposing changes in documentation or updates to existing code.
* Adding features or missing functionalities.
* Adding features or missing functionalities.

## Steps to Contribute

Expand All @@ -21,10 +21,30 @@ To submit your suggestions:
1. Add your contribution.
1. Submit a [Pull Request](https://help.github.com/articles/creating-a-pull-request/).

### Adding Messages for a New Component

To add messages for a new component:

1. Create a new messages file in 'messages/<component>/<component>.en-US.yml'
2. Run 'npm run seed-messages <component>'
3. Commit new files from 'messages/component'

### Adding Messages to All Locales

To appends the content of a new message file to all existing locale-specific files:

1. Create a file containing the new messages.

Start and end the file with an empty row, and provide the same indentation for the
new messages and their descriptions as in the existing files.
2. Run 'npm run append-message <component> <path-to-the-new-file>'
3. Commit the updated files from 'messages/component'
4. Remove the file created in step 1.

## Support-Related Issues

Refer to our [**Community & Support**](http://www.telerik.com/kendo-angular-ui/support/) page for more information on:

* How to report a bug
* New upcoming features
* New upcoming features
* Support-related questions
32 changes: 13 additions & 19 deletions bin/kendo-translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,38 @@ const R = require('ramda');
const args = (() => {
const argparse = require('argparse');
const parser = new argparse.ArgumentParser({
version: '0.1.0',
addHelp: true,
add_help: true,
description: 'Populates Kendo UI for Angular messages in i18n message files'
});

parser.addArgument('file', {
parser.add_argument('file', {
help: 'XLIFF file to process, e.g. "src/i18n/messages.en.xlf"',
});

parser.addArgument([ '-l', '--locale' ], {
parser.add_argument('-l', '--locale', {
help: 'the locale ID, for example "en-US"',
required: true
});

parser.addArgument([ '-f', '--force' ], {
parser.add_argument('-f', '--force', {
help: 'overwrites existing translations',
defaultValue: false,
action: 'storeTrue'
default: false,
action: 'store_true'
});

parser.addArgument([ '-e', '--encoding' ], {
parser.add_argument('-e', '--encoding', {
help: 'Specifies the message files encoding. Default is "utf-8".',
defaultValue: 'utf-8'
default: 'utf-8'
});

return parser.parseArgs();
return parser.parse_args();
})();

const msgRoot = path.resolve(__dirname, '../messages');

const langFiles = `/**/*.${args.locale}.yml`;

const extendAll = R.reduce(R.mergeWith(R.merge), {});
const extendAll = R.reduce(R.mergeWith(R.mergeRight), {});

const complete = (reject, resolve) => (error, result) => {
error ? reject(error) : resolve(result);
Expand All @@ -64,17 +63,12 @@ const readFile = filename => new Task((reject, resolve) => {
// parseYaml :: FileContent -> Task YML
const parseYaml = data => new Task((reject, resolve) => {
try {
resolve(yaml.safeLoad(data));
resolve(yaml.load(data));
} catch (e) {
reject(e);
}
});

// verifyFile :: [FilePath] -> Task Error [FilePath]
const verifyFile = files => new Task((reject, resolve) => {
files.length ? resolve(files) : reject(new Error(`Unable to locate '${args.file}' file`));
});

// parseXml :: FileContent -> Task XML
const parseXml = data => new Task((reject, resolve) => {
const doc = cheerio.load(data, { xmlMode: true, decodeEntities: false })
Expand Down Expand Up @@ -125,8 +119,8 @@ const translations = R.pipe(

// mergeTranslations :: FilePath -> YML -> XML
const mergeTranslations = path => translations => R.pipe(
processFiles(parseXmlFile, verifyFile),
R.chain(xmlFiles => safeTranslate(R.head(xmlFiles), translations))
parseXmlFile,
R.chain(xmlFile => safeTranslate(xmlFile, translations))
)(path);

const main = () => {
Expand Down
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
12 changes: 0 additions & 12 deletions gulpfile.js

This file was deleted.

Loading

0 comments on commit ea44512

Please sign in to comment.