Skip to content

Commit

Permalink
build(migration): of build scripts and workflows from python to javas…
Browse files Browse the repository at this point in the history
…cript

BREAKING CHANGE: Use `idnaUts46` as replacement for `ispapiIdnconverter`
in browser or switch to the ESM variant.
  • Loading branch information
KaiSchwarz-cnic committed Mar 9, 2023
1 parent 1c9c9ea commit 205f1f2
Show file tree
Hide file tree
Showing 36 changed files with 7,083 additions and 23,273 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
19 changes: 19 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
},
env: {
es6: true,
node: true,
},
extends: 'eslint:recommended',
overrides: [
{
files: 'test/*.js',
env: {
mocha: true,
},
},
],
};
22 changes: 11 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
name: Test

on:
push:
branches:
- master
# dependabot/** branches are generated by https://github.com/dependabot
- dependabot/**
- dependabot/** #branches are generated by https://github.com/dependabot

pull_request:
types:
- opened
- synchronize

workflow_dispatch:

jobs:
test:
name: 'Linting'
name: 🧪 Linting
runs-on: ubuntu-latest

steps:
Expand All @@ -31,16 +30,16 @@ jobs:
cache: 'npm'
- name: Install node dependencies
run: npm ci
- name: Run test/validation
run: gulp prettierCheck
# - name: Run test/validation
# run: gulp prettierCheck
- name: Super Linter Code Base
uses: github/super-linter/slim@v4
env:
FILTER_REGEX_INCLUDE: '.*.js|/test/*|/scripts/*|build-unicode-tables.py'
FILTER_REGEX_INCLUDE: '.*.js|*.js|/scripts/*|/src/*|/test/*'
DEFAULT_BRANCH: master
VALIDATE_JAVASCRIPT_ES: true
VALIDATE_TYPESCRIPT_ES: true
VALIDATE_BASH: true
VALIDATE_PYTHON_BLACK: true
VALIDATE_ALL_CODEBASE: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -49,10 +48,10 @@ jobs:
matrix:
node-version:
- 16
- 17
- 18
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

name: Test Matrix @ NodeJS @ ${{ matrix.node-version }}
name: 🧪 npm test @ ${{ matrix.node-version }}
runs-on: ubuntu-latest
needs: test

Expand All @@ -67,6 +66,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
check-latest: true
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run test
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/unicode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
check-latest: true
- name: Install dependencies
run: npm ci
- run: gulp checkUnicodeVersion
- run: npm run build:unicode-checkversion
upgrade:
name: Upgrade Version
runs-on: ubuntu-latest
Expand All @@ -32,17 +32,14 @@ jobs:
with:
node-version: 18
check-latest: true
- uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install --upgrade pip
pip -V
pip install -r requirements.txt
npm ci
run: npm ci
- name: Upgrade Unicode Version
run: npm run build:unicode-upgrade
- name: Generate IDNA Mapping File
run: ./build-unicode-tables.py $(gulp checkUnicodeVersion --silent | grep Latest | sed 's/^.*version //g' | sed 's/ detected\.$//g')
run: npm run build
- name: Auto-Lint Code
run: npx lint-staged
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
Expand All @@ -51,5 +48,5 @@ jobs:
branch: upgradeUnicode
base: master
title: 'Upgrade Unicode to latest Version'
assignees: papakai
reviewers: papakai
assignees: KaiSchwarz-cnic
reviewers: KaiSchwarz-cnic
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
dist/*
# Web bundle should always be available on github raw
!dist/index.bundle.js

coverage
node_modules
test/IdnaTest.txt
npm-debug.log*
.nyc_output
.vscode
.vscode
24 changes: 3 additions & 21 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
# Composer
composer.phar
composer.lock
vendor

# npm
node_modules
package-lock.json

# Coverage Reporting
report

# Generated Archives
pkg
build

# JS Build and Bundles
**/*.all.css
**/*.all.js
**/*.min.css
**/*.min.js
coverage
.nyc_output
dist
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('prettier-config-xo');
module.exports = module.exports = require('prettier-config-xo');
34 changes: 0 additions & 34 deletions .releaserc.json

This file was deleted.

4 changes: 0 additions & 4 deletions AUTHORS.md

This file was deleted.

3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Original work Copyright (c) 2015 Joshua Cranmer <[email protected]> as part of jcranmer/idna-uts46.
Modified work Copyright (c) 2017 Kai Schwarz <[email protected]> as part of this fork hexonet/idna-uts46.
Copyright (c) 2022 Dawson Botsford as part of the fork dawsbot/idna-uts46 (Port to JS).
Copyright (c) 2017-2023 Kai Schwarz as part of the fork hexonet/idna-uts46.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
[![npm version](https://img.shields.io/npm/v/idna-uts46-hx.svg?style=flat)](https://www.npmjs.com/package/idna-uts46-hx)
[![node](https://img.shields.io/node/v/idna-uts46-hx.svg)](https://www.npmjs.com/package/idna-uts46-hx)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![build](https://travis-ci.com/hexonet/idna-uts46.svg?branch=master)](https://travis-ci.com/hexonet/idna-uts46)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hexonet/idna-uts46/blob/master/CONTRIBUTING.md)

This module is a IDNA UTS46 connector library for javascript.
This is a maintained fork of the idna-uts46 library originally written by jcranmer.
This is a maintained fork of the idna-uts46 library originally written by jcranmer. Continously maintained by KaiSchwarz-cnic and fully ported to JS by dawsbot.

The [JS Punycode converter library](https://github.com/bestiejs/punycode.js/) is
a great tool for handling Unicode domain names, but it only implements the
Expand All @@ -20,14 +19,15 @@ the full mapping for these strings, as defined by

## Resources

* [Documentation](https://centralnic-reseller.github.io/centralnic-reseller/docs/hexonet/idna-uts46/)
* [Release Notes](https://github.com/hexonet/idna-uts46/releases)
- [Documentation](https://centralnicgroup-public.github.io/rtldev-middleware-documentation/docs/hexonet/idna-uts46/)
- [Release Notes](https://github.com/hexonet/idna-uts46/releases)

## Authors

NOTE: As mentioned, initial work done by jcranmer.
NOTE: As mentioned, initial work done by [jcranmer](https://github.com/jcranmer).

* **Kai Schwarz** - *lead development* - [PapaKai](https://github.com/papakai)
- [KaiSchwarz-cnic](https://github.com/kaischwarz-cnic)
- [dawsbot](https://github.com/dawsbot)

See also the list of [contributors](https://github.com/hexonet/idna-uts46/graphs/contributors) who participated in this project.

Expand Down
Loading

0 comments on commit 205f1f2

Please sign in to comment.