Skip to content

Commit

Permalink
Merge pull request #168 from pavankjadda/13.x.x
Browse files Browse the repository at this point in the history
backport 12.x.x changes to 13.x.x
  • Loading branch information
pavankjadda authored Oct 16, 2021
2 parents acf9ef0 + b841447 commit bd5e01c
Show file tree
Hide file tree
Showing 20 changed files with 2,946 additions and 2,874 deletions.
39 changes: 39 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"root": true,
"ignorePatterns": ["projects/**/*", "*.spec.ts"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json", "e2e/tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"accessibility": "explicit"
}
],
"arrow-parens": ["off", "always"],
"import/order": "off",
"max-len": [
"error",
{
"code": 160
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}
91 changes: 91 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Bug Report
description: Report a bug in the ngx-cookie-service

body:
- type: textarea
id: description
attributes:
label: Describe the bug
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
validations:
required: true
placeholder: |
Steps to reproduce the behavior:
Go to '...'
Click on '....'
Scroll down to '....'
See error
- type: input
id: reproduction-link
attributes:
label: Please provide a link to a minimal reproduction of the bug. StackBlitz, CodePen or CodeSanBox
validations:
required: true
- type: textarea
id: expected-behaviour
attributes:
label: Expected behaviour
validations:
required: true

- type: input
id: library-version
attributes:
label: What version of the library you see this issue?
validations:
required: true

- type: dropdown
id: angular-version
attributes:
label: What version of Angular are you using?
options:
- Angular 13
- Angular 12
- Angular 11
- Angular 10
- Angular 9
- Angular 8
- Angular 7
- Angular 6
- Angular 4
- Angular 2
multiple: true
validations:
required: true

- type: textarea
id: screenshots
attributes:
label: Screenshots
placeholder: |
If applicable, add screenshots to help explain your problem.
- type: textarea
id: desktop
attributes:
label: Desktop? Please complete the following information
placeholder: |
OS: [e.g. macOS Big Sur, Windows 10]
Browser [e.g. Google Chrome, Mozilla Firefox, Micro Soft Edge, Safari]
Version [e.g. 92]
- type: textarea
id: mobile
attributes:
label: Mobile? Please complete the following information
placeholder: |
Device: [e.g. iPhone 12 Pro, Google Pixel 5]
OS: [e.g. iOS]
Browser [e.g. Google Chrome, Mozilla Firefox, Micro Soft Edge, Safari]
Version [e.g. 91]
- type: textarea
id: other
attributes:
label: Anything else?
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Feature Request'
description: Suggest a feature for Ngx Cookie Service library

body:
- type: textarea
id: description
attributes:
label: Is your feature request related to a problem? Please describe
placeholder: |
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true

- type: textarea
id: proposed-solution
attributes:
label: Describe the solution you'd like
placeholder: |
A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives-considered
attributes:
label: Describe alternatives you've considered
placeholder: |
A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true

- type: textarea
id: other
attributes:
label: Additional context
39 changes: 0 additions & 39 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '0 0 * * *'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
node-version: 14
- name: Install Angular CLI
run: npm install -g @angular/cli @angular/core
run: npm install -g @angular/cli @angular/core
- name: Install NPM Dependencies
run: npm ci
- name: Build project
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<img src="https://badges.gitter.im/ngx-cookie-service/community.svg" alt="Chat in Gitter" />
</a>
[![ngx-cookie-service channel on discord](https://img.shields.io/discord/873021904708059177.svg?style=flat-square)](https://discord.gg/N3xc4Jfb)

</p>

Angular service to read, set and delete browser cookies. Originally based on the [ng2-cookies](https://www.npmjs.com/package/ng2-cookies) library. The experienced team behind [Studytube](https://www.studytube.nl/) will take care of our cookie service from now on.
Expand Down Expand Up @@ -55,13 +55,17 @@ cookieService: CookieService

That's it!

## Demo
https://stackblitz.com/edit/angular-ivy-1lrgdt?file=src%2Fapp%2Fapp.component.ts

## Supported Versions

For Angular 9.0.0+ use latest version of the library. For versions < 9.x.x, use 2.3.0 version

| Angular Version | Supported Version |
| ------- | ------------------ |
| 9.0.0+ | latest |
| < 9.0.0 | 2.3.0 |
| Angular Version | Supported Version |
| --------------- | ----------------- |
| 9.0.0+ | latest |
| < 9.0.0 | 2.3.0 |

# API

Expand Down
10 changes: 6 additions & 4 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Security Policy

## Supported Versions

For Angular 9.0.0+ use latest version of the library. For versions < 9.x.x, use 2.3.0 version

| Angular Version | Supported Version |
| ------- | ------------------ |
| 9.0.0+ | latest |
| < 9.0.0 | 2.3.0 |
| Angular Version | Supported Version |
| --------------- | ----------------- |
| 9.0.0+ | latest |
| < 9.0.0 | 2.3.0 |

## Reporting a Vulnerability

Report an issue https://github.com/stevermeister/ngx-cookie-service/issues if you want to report vulneraability.
5 changes: 2 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": ["projects/ngx-cookie-service/tsconfig.lib.json", "projects/ngx-cookie-service/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": ["projects/ngx-cookie-service/**/*.ts", "projects/ngx-cookie-service/**/*.html"]
}
}
}
Expand Down
Loading

0 comments on commit bd5e01c

Please sign in to comment.