Skip to content

Commit

Permalink
fix(core): support of a16 help-me-mom#5031
Browse files Browse the repository at this point in the history
  • Loading branch information
satanTime committed Mar 11, 2023
1 parent 94f62eb commit 98bbc44
Show file tree
Hide file tree
Showing 26 changed files with 16,465 additions and 12 deletions.
7 changes: 7 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ executors:
docker:
- image: satantime/puppeteer-node:16.19.1
resource_class: medium
a16:
docker:
- image: satantime/puppeteer-node:18.15.0
resource_class: medium

commands:
install:
Expand Down Expand Up @@ -593,6 +597,7 @@ workflows:
- a13
- a14
- a15
- a16

# testing a5 (exceptional)
- E2E Test:
Expand Down Expand Up @@ -665,6 +670,7 @@ workflows:
parameters:
dir:
- a15
- a16

# testing lib build
- Lib Build:
Expand All @@ -687,6 +693,7 @@ workflows:
- a13
- a14
- a15
- a16

# testing lib build
- Lib Build:
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/e2e/a13/node_modules
/e2e/a14/node_modules
/e2e/a15/node_modules
/e2e/a16/node_modules
/e2e/jasmine/node_modules
/e2e/jest/node_modules
/e2e/min/node_modules
Expand Down
2 changes: 2 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ settings:
- ./e2e/a13/tsconfig.json
- ./e2e/a14/tsconfig.json
- ./e2e/a15/tsconfig.json
- ./e2e/a16/tsconfig.json
- ./e2e/jasmine/tsconfig.json
- ./e2e/jest/tsconfig.json
- ./e2e/min/tsconfig.json
Expand Down Expand Up @@ -55,6 +56,7 @@ overrides:
- ./e2e/a13/tsconfig.json
- ./e2e/a14/tsconfig.json
- ./e2e/a15/tsconfig.json
- ./e2e/a16/tsconfig.json
- ./e2e/jasmine/tsconfig.json
- ./e2e/jest/tsconfig.json
- ./e2e/min/tsconfig.json
Expand Down
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ updates:
commit-message:
prefix: 'chore(deps)'

- package-ecosystem: 'npm'
directory: /e2e/a16/
open-pull-requests-limit: 0
schedule:
interval: 'daily'
commit-message:
prefix: 'chore(deps)'

- package-ecosystem: 'npm'
directory: /e2e/jasmine/
open-pull-requests-limit: 0
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The current version of the library **has been tested** and **can be used** with:

| Angular | ng-mocks | Jasmine | Jest | Ivy |
| ------: | :------: | :-----: | :--: | :-: |
| 16 | latest | yes | yes | yes |
| 15 | latest | yes | yes | yes |
| 14 | latest | yes | yes | yes |
| 13 | latest | yes | yes | yes |
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ if [ "$1" = "" ] || [ "$1" = "a15" ]; then
cd ../..
fi

if [ "$1" = "" ] || [ "$1" = "a16" ]; then
docker-compose up -- a16 && \
cd ./e2e/a16 && \
nvm install && \
nvm use && \
node ./node_modules/puppeteer/install.js && \
cd ../..
fi

if [ "$1" = "" ] || [ "$1" = "jasmine" ]; then
docker-compose up -- jasmine && \
cd ./e2e/jasmine && \
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,18 @@ services:
- install
- --no-audit

a16:
image: satantime/puppeteer-node:18.15.0
working_dir: /app
volumes:
- ./e2e/a16:/app
- gyp:/root/.node-gyp
- npm:/root/.npm
command:
- npm
- install
- --no-audit

jasmine:
image: satantime/puppeteer-node:18.14.2
working_dir: /app
Expand Down
1 change: 1 addition & 0 deletions docs/articles/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The current version of `ng-mocks` has been tested and **can be used** with:

| Angular | ng-mocks | Jasmine | Jest | Ivy |
| -------: | :-----------------------------------------------------------: | :-----: | :--: | :-: |
| 16 | latest | yes | yes | yes |
| 15 | latest | yes | yes | yes |
| 14 | latest | yes | yes | yes |
| 13 | latest | yes | yes | yes |
Expand Down
5 changes: 5 additions & 0 deletions docs/articles/migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Below you can find critical changes. They happen on major releases.

If you are facing an issue, despite the instructions, please, feel free to [contact us](need-help.md).

## From 15 to 16

There are no special cases.
The update should be straight forward.

## From 14 to 15

### `test.ts`
Expand Down
16 changes: 16 additions & 0 deletions e2e/a16/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
4 changes: 4 additions & 0 deletions e2e/a16/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/dist
/node_modules
/src/app
/src/test
1 change: 1 addition & 0 deletions e2e/a16/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.15.0
76 changes: 76 additions & 0 deletions e2e/a16/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"a16": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/a16",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.json"
},
"configurations": {
"production": {
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "a16:build:production"
},
"development": {
"browserTarget": "a16:build:development"
}
},
"defaultConfiguration": "development"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.json",
"karmaConfig": "karma.conf.js"
}
}
}
},
"lib": {
"projectType": "library",
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "ng-package.json",
"tsConfig": "tsconfig.json"
}
}
}
}
}
}
11 changes: 11 additions & 0 deletions e2e/a16/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/src/setup-jest.ts'],
testEnvironmentOptions: {
url: 'http://localhost',
},
testPathIgnorePatterns: ['<rootDir>/src/test.ts'],
transform: {
'^.+\\.(ts|mjs|js|html)$': ['jest-preset-angular', { tsconfig: './tsconfig.json' }],
},
};
36 changes: 36 additions & 0 deletions e2e/a16/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
jasmine: {
random: false,
},
},
customLaunchers: {
ChromeCi: {
base: 'ChromeHeadless',
flags: ['--headless', '--disable-gpu', '--no-sandbox', '--disable-dev-shm-usage'],
},
},
reporters: ['kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['ChromeCi'],
singleRun: true,
});
};
8 changes: 8 additions & 0 deletions e2e/a16/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"dest": "./dist/lib",
"lib": {
"entryFile": "src/app/app.module.ts"
},
"allowedNonPeerDependencies": ["@angular/", "rxjs", "zone.js"]
}
Loading

0 comments on commit 98bbc44

Please sign in to comment.