Skip to content

Commit 9fb9f97

Browse files
committed
chore: transfer wip state to sap-samples
1 parent 4f29011 commit 9fb9f97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+13939
-3
lines changed

.circleci/config.yml

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
version: 2.1
2+
jobs:
3+
build-node14:
4+
docker:
5+
- image: circleci/node:14-browsers
6+
working_directory: ~/repo
7+
steps:
8+
- run: sudo apt-get install libxss1
9+
- checkout
10+
- run: yarn
11+
- run: yarn run ci
12+
- run:
13+
name: Define environment variable with lastest commit's message
14+
command: |
15+
echo 'export COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s")' >> $BASH_ENV
16+
source $BASH_ENV
17+
- run:
18+
name: Lint commit message
19+
command: echo "$COMMIT_MESSAGE" | npx commitlint
20+
# - run:
21+
# command: cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
22+
# environment:
23+
# COVERALLS_SERVICE_NAME: circle-ci
24+
# COVERALLS_GIT_BRANCH: ${CIRCLE_BRANCH}
25+
26+
build-node12:
27+
docker:
28+
- image: circleci/node:12-browsers
29+
working_directory: ~/repo
30+
steps:
31+
- run: sudo apt-get install libxss1
32+
- checkout
33+
- run: yarn
34+
- run: yarn run ci
35+
36+
build-node10:
37+
docker:
38+
- image: circleci/node:10-browsers
39+
working_directory: ~/repo
40+
steps:
41+
- run: sudo apt-get install libxss1
42+
- checkout
43+
- run: yarn
44+
- run: yarn run ci
45+
46+
compliance:
47+
docker:
48+
- image: circleci/python:3.6.4
49+
working_directory: ~/workdir
50+
steps:
51+
- checkout
52+
- run:
53+
name: compliance check
54+
command: |
55+
pip3 install --user reuse
56+
~/.local/bin/reuse lint
57+
58+
deploy-npm:
59+
docker:
60+
- image: circleci/node:12-browsers
61+
working_directory: ~/repo
62+
steps:
63+
- run: sudo apt-get install libxss1
64+
- checkout
65+
- run: yarn --pure-lockfile
66+
- run: yarn run ci
67+
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
68+
# To help debug when lerna detects changes to the working tree and fails the publish
69+
- run: git status
70+
- run: yarn run lerna:publish
71+
72+
prepare-vsix:
73+
docker:
74+
- image: circleci/node:12-browsers
75+
working_directory: ~/repo
76+
steps:
77+
- run: sudo apt-get install libxss1
78+
- checkout
79+
- run: yarn
80+
- run: yarn run ci
81+
- persist_to_workspace:
82+
root: "./packages"
83+
# TODO: may need to copy the VSIX files to a single folder first
84+
paths:
85+
# https://golang.org/pkg/path/filepath/#Match
86+
- vscode_custom_editor_ext/vscode_custom_editor_ext-*
87+
- vscode_simple_ext/vscode_simple_ext-*
88+
89+
deploy-gh-releases:
90+
docker:
91+
- image: circleci/golang:1.13
92+
steps:
93+
- attach_workspace:
94+
at: ./dist
95+
# TODO: may need to copy the VSIX files to a single folder first
96+
- run:
97+
name: "Publish Release on GitHub"
98+
command: |
99+
go get github.com/tcnksm/ghr
100+
VERSION=${CIRCLE_TAG}
101+
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./dist/
102+
103+
workflows:
104+
version: 2
105+
voter:
106+
jobs:
107+
- build-node10
108+
- build-node12
109+
- build-node14
110+
- compliance
111+
release:
112+
jobs:
113+
- deploy-npm:
114+
filters:
115+
tags:
116+
only: /^v[0-9]+(\.[0-9]+)*/
117+
branches:
118+
ignore: /.*/
119+
- prepare-vsix:
120+
filters:
121+
tags:
122+
only: /^v[0-9]+(\.[0-9]+)*/
123+
branches:
124+
ignore: /.*/
125+
- deploy-gh-releases:
126+
requires:
127+
- prepare-vsix
128+
filters:
129+
tags:
130+
only: /^v[0-9]+(\.[0-9]+)*/
131+
branches:
132+
ignore: /.*/

.eslintrc.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser",
3+
plugins: ["@typescript-eslint"],
4+
extends: [
5+
"eslint:recommended",
6+
"plugin:@typescript-eslint/eslint-recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
"plugin:eslint-comments/recommended",
9+
"prettier",
10+
],
11+
rules: {
12+
"@typescript-eslint/no-use-before-define": [
13+
"error",
14+
// These can be safely used before they are defined due to function hoisting in EcmaScript
15+
{ functions: false, classes: false },
16+
],
17+
"@typescript-eslint/ban-ts-comment": [
18+
"error",
19+
{
20+
// We only allow ts-expect-error comments to enforce removal
21+
// of outdated suppression comments when the underlying issue has been resolved.
22+
// https://devblogs.microsoft.com/typescript/announcing-typescript-3-9/#what-about-ts-ignore
23+
"ts-expect-error": "allow-with-description",
24+
"ts-ignore": true,
25+
"ts-nocheck": true,
26+
"ts-check": true,
27+
},
28+
],
29+
},
30+
};

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf abs

.gitignore

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# sub-packages files for https://reuse.software (avoid duplication)
2+
.reuse
3+
LICENSES
4+
LICENSE
5+
6+
# root files for https://reuse.software
7+
!/.reuse
8+
!/LICENSES
9+
!LICENSE
10+
11+
# Logs
12+
logs
13+
*.log
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
18+
# Runtime data
19+
pids
20+
*.pid
21+
*.seed
22+
*.pid.lock
23+
24+
# Directory for instrumented libs generated by jscoverage/JSCover
25+
lib-cov
26+
27+
# Coverage directory used by tools like istanbul
28+
coverage
29+
30+
# nyc test coverage
31+
.nyc_output
32+
33+
# Dependency directories
34+
node_modules/
35+
36+
# Optional npm cache directory
37+
.npm
38+
package-lock.json
39+
40+
# Optional eslint cache
41+
.eslintcache
42+
43+
# Optional REPL history
44+
.node_repl_history
45+
46+
# Output of 'npm pack'
47+
*.tgz
48+
49+
# Yarn Integrity file
50+
.yarn-integrity
51+
52+
# dotenv environment variables file
53+
.env
54+
55+
# Jetbrains IDE configuration
56+
.idea
57+
58+
# Not ignoring .vscode folder because .vscode/launch.json contains launch configurations for vscode extensions
59+
# and it's useful to share it
60+
61+
# vscode-test
62+
.vscode-test
63+
64+
# npm registry configuraiton
65+
.npmrc
66+
67+
# Compiled source code
68+
lib
69+
70+
# tsc incremental build artifacts
71+
tsconfig.tsbuildinfo
72+
73+
# Built VSCode exts
74+
*.vsix
75+
76+
# avoid prettier trying to format bundled artifacts
77+
dist

.mocharc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
require: ["source-map-support/register"],
3+
4+
spec: "./lib/test/**/*spec.js",
5+
};

.reuse/dep5

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2-
Upstream-Name: [YOUR REPO NAME]
3-
Upstream-Contact: [YOUR EMAIL ADDRESS]
4-
Source: https://github.com/sap-samples/[YOUR REPO NAME]
2+
Upstream-Name: ecmascript_monorepo_template
3+
Upstream-Contact: Shachar Soel <[email protected]>
4+
Source: https://github.com/sap-samples/ecmascript_monorepo_template
55
Disclaimer: The code in this project may include calls to APIs (“API Calls”) of
66
SAP or third-party products or services developed outside of this project
77
(“External Products”).

0 commit comments

Comments
 (0)