Skip to content

Commit

Permalink
chore: Update library to support ng13
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Earlier versions of Angular no longer supported
  • Loading branch information
Alorel committed Jan 24, 2022
1 parent 17fcdb7 commit 4506e19
Show file tree
Hide file tree
Showing 62 changed files with 31,168 additions and 12,856 deletions.
14 changes: 0 additions & 14 deletions .alobuild.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/actions/init-npm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
inputs:
node-version:
description: Node version
required: true
gh-token:
description: GH token
required: true
name: Set up npm
description: Set up npm and install dependencies
runs:
using: composite
steps:
- uses: actions/setup-node@v2
name: Set up node
with:
node-version: ${{ inputs.node-version }}
registry-url: https://npm.pkg.github.com
- name: Get NPM cache dir
id: npm-cache-dir
shell: bash
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache NPM
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-npm-${{ inputs.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ inputs.node-version }}-
- name: Install deps
run: npm ci --no-fund
shell: bash
env:
NODE_AUTH_TOKEN: ${{ inputs.gh-token }}
20 changes: 20 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
inputs:
node-version:
description: Node version
required: true
gh-token:
description: GH token
required: true
name: Test
description: Run tests
runs:
using: composite
steps:
- name: NPM Init
uses: ./.github/actions/init-npm
with:
node-version: ${{ inputs.node-version }}
gh-token: ${{ inputs.gh-token }}
- name: Test
run: npm run test
shell: bash
52 changes: 52 additions & 0 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Core
on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest
name: Test ubuntu-latest/Node 16
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test
uses: ./.github/actions/test
with:
node-version: 16
gh-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload coverage
if: ${{ runner.os != 'windows-latest' }}
continue-on-error: true
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: node-${{ inputs.node-version }}-on-${{ runner.os }}-${{ github.event_name }}
path-to-lcov: ./coverage/ngx-sails/lcov.info
release:
name: Release
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1000
- name: Init NPM
uses: ./.github/actions/init-npm
with:
node-version: 16
gh-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v2
name: Reconfig Node
with:
node-version: 16
registry-url: https://registry.npmjs.org
- name: Release
run: npm run release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
.idea/
/.angular/
node_modules/
/dist/
/coverage/
/.nyc_output/
/yarn-error.log
/*.tgz
/.alobuild-tsconfig-*.json
/package-lock.json
.npmrc
15 changes: 3 additions & 12 deletions .releaserc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,23 @@ verifyConditions:

prepare:
- '@semantic-release/changelog'
- '@alorel-personal/semantic-release'
- *npm
- path: &exec '@semantic-release/exec'
cmd: node sync-version.js
- path: *exec
cmd: alo copy-files
- path: *exec
cmd: alo clean-dist
- path: *exec
cmd: alo clean-pkg-json
- path: *exec
cmd: node sync-version.js
cmd: 'npm run build'
- path: '@semantic-release/git'
message: 'chore(release): ${nextRelease.version}'
assets:
- CHANGELOG.md
- README.md
- package.json
- projects/ngx-sails/package.json
- yarn.lock
- path: *exec
cmd: ./mkrelease.sh
- package-lock.json

publish:
- path: *exec
cmd: npm publish ./dist.tgz
cmd: bash -c "cd dist/ngx-sails && npm publish"
- *gh

generateNotes:
Expand Down
48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Arturas Molcanovas <a.molcanovas@gmail.com> (https://github.com/Alorel)
Copyright (c) 2022 Arturas Molcanovas <a.molcanovas@gmail.com> (https://github.com/Alorel)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@

[![Greenkeeper badge](https://badges.greenkeeper.io/Alorel/ngx-sails.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.com/Alorel/ngx-sails.svg?branch=1.1.2)](https://travis-ci.com/Alorel/ngx-sails)
[![Coverage Status](https://coveralls.io/repos/github/Alorel/ngx-sails/badge.svg?branch=1.1.2)](https://coveralls.io/github/Alorel/ngx-sails?branch=1.1.2)

# Angular bindings for the sails socket client

Used the abandoned [ngx-sails](https://github.com/brandom/ngx-sails) as a base.

## Installation

Angular 8:
Angular 13:

```
npm install @aloreljs/ngx-sails@^1.0.0 socket.io-client@^2.0.0
npm install @aloreljs/ngx-sails@^2.0.0 socket.io-client@^2.0.0
```

## Configuration
Expand Down
113 changes: 16 additions & 97 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,121 +3,40 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ngx-sails-demo": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/ngx-sails-demo",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ngx-sails-demo:build"
},
"configurations": {
"production": {
"browserTarget": "ngx-sails-demo:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ngx-sails-demo:build"
}
}
}
},
"ngx-sails": {
"projectType": "library",
"root": "projects/ngx-sails",
"sourceRoot": "projects/ngx-sails/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/ngx-sails/tsconfig.lib.json",
"project": "projects/ngx-sails/ng-package.json"
}
},
"configurations": {
"production": {
"tsConfig": "projects/ngx-sails/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/ngx-sails/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@angular-builders/custom-webpack:karma",
"options": {
"customWebpackConfig": {
"path": "webpack.config.js"
},
"main": "projects/ngx-sails/src/test.ts",
"tsConfig": "projects/ngx-sails/tsconfig.spec.json",
"karmaConfig": "projects/ngx-sails/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ngx-sails/tsconfig.lib.json",
"projects/ngx-sails/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "ngx-sails-demo"
"defaultProject": "ngx-sails"
}

0 comments on commit 4506e19

Please sign in to comment.