Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next #1649

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Next #1649

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions .cz-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const packages = Object.entries(wp.projects)
// console.log(e)
}
})
.filter((e) => !!e)
.map((name) => ({ name }));
.filter(e => !!e)
.map(name => ({ name }));

module.exports = {
types: [
Expand All @@ -25,21 +25,21 @@ module.exports = {
{ value: 'docs', name: 'docs: Documentation only changes' },
{
value: 'style',
name: 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)',
name: 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)'
},
{ value: 'refactor', name: 'refactor: A code change that neither fixes a bug nor adds a feature' },
{ value: 'perf', name: 'perf: A code change that improves performance' },
{ value: 'test', name: 'test: Adding missing tests' },
{
value: 'chore',
name: 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation',
name: 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation'
},
{ value: 'revert', name: 'revert: Revert to a commit' },
{ value: 'ci', name: 'CI: Add or change CI functions' },
{ value: 'wip', name: 'WIP: Work in progress' },
{ value: 'wip', name: 'WIP: Work in progress' }
],

scopes: [{ name: 'Actions' }, { name: 'docsWeb' }, { name: 'monorepo' }].concat(packages),
scopes: [{ name: 'actions' }, { name: 'docsweb' }, { name: 'monorepo' }].concat(packages),

// it needs to match the value for field type. Eg.: 'fix'
/*
Expand All @@ -62,12 +62,12 @@ module.exports = {
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
breaking: 'List any BREAKING CHANGES (optional):\n',
footer: 'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n',
confirmCommit: 'Are you sure you want to proceed with the commit above?',
confirmCommit: 'Are you sure you want to proceed with the commit above?'
},

allowCustomScopes: true,
allowBreakingChanges: ['feat', 'fix', 'perf'],

// limit subject length
subjectLimit: 100,
subjectLimit: 100
};
2 changes: 1 addition & 1 deletion .firebase/hosting.ZGlzdFxzdGF0aWNcZG9jLXNpdGVz.cache
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ docs/learn/plugins/built-in-plugins/contentFolder/index.html,1596568073818,77c91
docs/learn/plugins/built-in-plugins/json/index.html,1596568073463,55489660f9b8004978948fc26db370c6355bce308f9c995a73decd4c9b6e580f
docs/learn/plugins/built-in-plugins/md/index.html,1596568073596,fa4befb3f162a18827a62a3acbd09df7858ba43bbde7502d549ceecbb3ec0628
docs/learn/plugins/built-in-plugins/router-/index.html,1596568073823,e938b38eebcca70115c859042157300ca2da167a4e1b39a2ec042c73152ee969
docs/learn/plugins/built-in-plugins/seoHrefOptimize/index.html,1596568073506,cdd031510ac8e5f37e2a4eaf72f7d29904688f70c8289aa0a38d4b9b7c33be39
docs/learn/plugins/built-in-plugins/seoHrefOptimise/index.html,1596568073506,cdd031510ac8e5f37e2a4eaf72f7d29904688f70c8289aa0a38d4b9b7c33be39
docs/learn/plugins/community-plugins/disableAngular/index.html,1596568073710,1f836ad6c20b429f511c263d0fa0f1634cf393fcbea4cf9b76be50c85d2acc64
docs/learn/plugins/community-plugins/lazyImages/index.html,1596568074358,b74028559821edadf01532e8fc429305889e701a9facf65770f0189f927a30ac
docs/learn/plugins/community-plugins/fouc/index.html,1596568073560,8a965028230d041542eab3f153944323ada7bebef9b64c7d3b404143998ec5bd
Expand Down
2 changes: 1 addition & 1 deletion .github/build-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ runs:
key: dist-${{ inputs.node-version }}-${{ github.run_id }}
- name: Build the dist artifacts, when not yet cached for this workflow
if: steps.cache-dist.outputs.cache-hit != 'true'
run: npm run build:code
run: npx nx run-many --target=build --all=true --parallel=true --max-parallel=8 --configuration production
shell: bash
- name: create symlinks as those are needed in all other workflows
run: npm run symlinks
Expand Down
2 changes: 1 addition & 1 deletion .github/test-build-verdaccio/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
uses: verdaccio/github-actions/[email protected]
with:
args: -d
- name : Test if angular builds using local register
- name: Test if angular builds using local register
env:
CI: true
NG_CLI_ANALYTICS: false false
Expand Down
4 changes: 2 additions & 2 deletions .github/test-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
npm i rxjs@7 --legacy-peer-deps --force --quiet --silent
echo "$scullyFolder"
cp ../scully/*.tgz .
for f in scullyio-scully-2*.tgz; do
for f in scullyio-scully-3*.tgz; do
echo "install package $f"
npm install $f --force --legacy-peer-deps --quiet --silent
done
Expand Down Expand Up @@ -78,4 +78,4 @@ runs:
npx browserslist "> 10%" > .browserslistrc
npx ng build
echo "run Scully"
npx scully --noPrompt
npx --node-options='--experimental-specifier-resolution=node' scully --noPrompt
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "CodeQL analysis"
name: 'CodeQL analysis'

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
schedule:
# every wednesday ay 2.29
# every wednesday ay 2.29
- cron: '29 2 * * 3'

jobs:
Expand All @@ -21,30 +21,30 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'typescript' ]
language: ['javascript', 'typescript']

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# 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
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# 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
30 changes: 14 additions & 16 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
name: Scully build, test, package, and deploy

on:
# Trigger the workflow on any updates of the PR, but not on push to main.
# as that would only result in testing code that has just finnished testing
# but only for the main branch
# Trigger the workflow on any updates of the PR, but not on push to main/next.
# as that would only result in testing code that has just finished testing
# but only for the main and next branch
pull_request:
types: [opened, synchronize, reopened, labeled]
branch: [main, next]

jobs:
prepare:
name: Setup Node, install dependencies, and cache node modules, build dist artifacts
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x, 14.x]
node: [16.13.2, 14.x]
steps:
- name: Checkout branch
uses: actions/checkout@v2
Expand All @@ -29,7 +30,7 @@ jobs:

strategy:
matrix:
node: [16.x]
node: [16.13.2]
renderer: [sps, ppt, pw]

steps:
Expand All @@ -41,7 +42,7 @@ jobs:
node-version: ${{ matrix.node }}
- name: build sample-blog
run: |
node ./dist/libs/scully/src/scully --tds --project=sample-blog --404=index --scan
node --experimental-specifier-resolution=node ./dist/libs/scully/src/scully --tds --project=sample-blog --404=index --scan
env:
SCULLY_VAULT_DEMO_KEY: ${{ secrets.SCULLY_VAULT_DEMO_KEY }}
SCULLY_rnd: ${{ matrix.renderer }}
Expand All @@ -58,7 +59,7 @@ jobs:

strategy:
matrix:
node: [16.x]
node: [16.13.2]
renderer: [sps, ppt, pw]

steps:
Expand All @@ -72,23 +73,21 @@ jobs:
env:
SCULLY_rnd: ${{ matrix.renderer }}
run: |
node ./dist/libs/scully/src/scully --tds --project=scully-docs --404=index
node --experimental-specifier-resolution=node ./dist/libs/scully/src/scully --tds --project=scully-docs --404=index
- name: Store docs-site
uses: actions/upload-artifact@v2
with:
name: static-sites-docs-${{ matrix.renderer }}
path: dist/static/doc-sites



jest-test:
name: Run Jest tests
needs: [buildDocs, buildSample]
runs-on: ubuntu-latest

strategy:
matrix:
node: [16.x]
node: [16.13.2]
renderer: [sps, ppt, pw]

steps:
Expand Down Expand Up @@ -120,7 +119,7 @@ jobs:

strategy:
matrix:
node: [16.x]
node: [16.13.2]
renderer: [sps, ppt, pw]

steps:
Expand All @@ -141,20 +140,19 @@ jobs:
path: dist/static/sample-blog
- name: Run the tests
run: |
node ./dist/libs/scully/src/scully prepServe --project=sample-blog
node --experimental-specifier-resolution=node ./dist/libs/scully/src/scully.mjs prepServe --project=sample-blog
npm run cypress:e2e:server
env:
CI: true


testnewApp:
name: Test if we can create a new app
needs: [prepare]
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x, 14.x]
angular: [12, 13]
node: [16.13.2, 14.x]
angular: [12, 13, next]
steps:
- name: Checkout branch
uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ apps/**/node_modules
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand All @@ -54,11 +55,12 @@ test_for_zoneJS.ts

migrations.*
testDocs
scully/tsconfig.sps-sample.json
adsample.js
bs.sh
consoleProxy.ts
.angular
scully.sample-blog.config.mjs
scully.scully-docs.config.mjs
*.tgz
testCreate.sh
scully/runtime
Empty file modified .husky/commit-msg
100644 → 100755
Empty file.
5 changes: 4 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"singleQuote": true
"singleQuote": true,
"trailingComma": "none",
"printWidth": 132,
"arrowParens": "avoid"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ wrote a [free book about the Jamstack](https://www.netlify.com/pdf/oreilly-moder
Check that out today.

> ### NOTE!
>
> Please notice that with the release of Scully version 2, support for Angular versions lower as 12 is deprecated.
> for older versions, you can keep on using the existing 1.1.1 version, which will only receive security updates from now on.

Expand Down
18 changes: 18 additions & 0 deletions apps/sample-blog/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#fcfaff",
"activityBar.activeBorder": "#ff8c40",
"activityBar.background": "#fcfaff",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#ff8c40",
"activityBarBadge.foreground": "#15202b",
"sash.hoverBorder": "#fcfaff",
"statusBar.background": "#ddccfa",
"statusBar.foreground": "#15202b",
"statusBarItem.hoverBackground": "#be9ef5",
"statusBarItem.remoteBackground": "#ddccfa",
"statusBarItem.remoteForeground": "#15202b"
},
"peacock.color": "#ddccfa"
}
2 changes: 1 addition & 1 deletion apps/sample-blog/src/app/about/about.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class AboutComponent implements OnInit {
constructor(private srs: ScullyRoutesService) {}

async ngOnInit() {
const cur = await firstValueFrom(this.srs.getCurrent())
const cur = await firstValueFrom(this.srs.getCurrent());
console.log(cur);
}
}
40 changes: 28 additions & 12 deletions apps/sample-blog/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
import { Component } from '@angular/core';
import {
IdleMonitorService,
isScullyGenerated,
isScullyRunning
} from '@scullyio/ng-lib';
import { ApplicationRef, Component } from '@angular/core';
import { Location, LocationStrategy } from '@angular/common';
import { ActivatedRoute, Router } from '@angular/router';
import { IdleMonitorService, isScullyGenerated, isScullyRunning } from '@scullyio/ng-lib';
import { tap } from 'rxjs';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
currentState = isScullyRunning()
? 'rendering inside scully'
: isScullyGenerated()
? 'Loaded from static HTML'
: 'SPA mode';
constructor() {}
currentState = isScullyRunning() ? 'rendering inside scully' : isScullyGenerated() ? 'Loaded from static HTML' : 'SPA mode';
constructor(
private im: IdleMonitorService,
private route: ActivatedRoute,
private loc: Location,
private router: Router,
platformStrategy: LocationStrategy,
private appRef: ApplicationRef
) {
im.init();
appRef.isStable.pipe(
tap(stable => {
console.log(`
stable: ${stable}
AppComponent: ${this.currentState}
loc: ${this.loc.path(true)}
url: ${this.route.snapshot.pathFromRoot.map(x => x.url).join('/')}
route: ${this.router.url},
ps: ${platformStrategy.constructor.name}
`);
})
); //.subscribe();
}
}
Loading