Skip to content

Commit

Permalink
fix(build): added missing semantic-release configuration file and typ…
Browse files Browse the repository at this point in the history
…ings file
  • Loading branch information
KaiSchwarz-cnic committed Mar 9, 2023
1 parent 3fdff33 commit bd3f43a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ jobs:
check-latest: true
- name: Install dependencies
run: npm ci
- name: Build files
run: |
npm run build
npx lint-staged
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
dist/*
# Web bundle should always be available on github raw
!dist/index.bundle.js
!dist/index.d.ts

coverage
node_modules
Expand Down
6 changes: 6 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function toUnicode(domain: string, options?: { useStd3ASCII: boolean }): string;
export function toAscii(domain: string, options?: { transitional: boolean, useStd3ASCII: boolean, verifyDnsLength: boolean }): string;

export function convert(domains: string): { IDN: string; PC: string; }
export function convert(domains: string[]): { IDN: string[]; PC: string[]; }
export function convert(domains: string | string[]): { IDN: string | string[]; PC: string | string[]; };
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": false,
"module": "dist/index.mjs",
"main": "dist/index.cjs",
"typings": "dist/index.d.ts",
"license": "MIT",
"sideEffects": false,
"engines": {
Expand Down
14 changes: 14 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const cfg = require('@hexonet/semantic-release-github-npm-config');
cfg.plugins.unshift([
'@semantic-release/exec',
{
prepareCmd: 'npm run build && npx lint-staged',
},
]);
cfg.plugins = cfg.plugins.map((plugin) => {
if (plugin[0] === '@semantic-release/git') {
plugin[1].assets.push('dist/index.d.ts', 'dist/index.bundle.js');
}
return plugin;
});
module.exports = cfg;

0 comments on commit bd3f43a

Please sign in to comment.