Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b389e8a
refactor: split into multiple packages + TS rewrite
B4nan May 4, 2021
e3e8787
chore: try to link the dependencies via lerna after install
B4nan May 5, 2021
04ecc98
chore: try to use lerna bootstrap with lock file
B4nan May 5, 2021
f276a0e
chore: add eslint support
B4nan May 5, 2021
2830c78
chore: add node_modules caching to CI
B4nan May 5, 2021
2995818
chore: fix ESM support
B4nan May 5, 2021
1f3db99
chore: consider lock files as binary when diffing
B4nan May 5, 2021
0a501c0
chore: fix build
B4nan May 5, 2021
4e29841
chore: remove axios from hubspot client deps
B4nan May 5, 2021
46aff11
chore: implement publishing via lerna + add contributing guide
B4nan May 11, 2021
da9e5bb
chore: update readme and adjust the CI a bit
B4nan May 11, 2021
8eb8421
chore: add commitlint hook
B4nan May 11, 2021
52f7890
chore: add PR title lint action + use `npm ci`
B4nan May 13, 2021
ac4f8f7
chore: revert usage of personal access token
B4nan May 13, 2021
d048d7b
chore: move jest config to separate file
B4nan May 13, 2021
2f58f47
docs: fix typos in CONTRIBUTING.md
B4nan May 13, 2021
c32c1fd
test: fix jest config
B4nan May 13, 2021
a31ab1c
chore: lint only source files
B4nan May 14, 2021
54df962
chore: reduce number of dependencies of `utilities` package
B4nan May 14, 2021
7d7b76e
chore: remove `ENV_VARS.INTERNAL_PORT`
B4nan May 14, 2021
1a4dd36
chore: move `validateInputUsingValidator` to `input_schema` package
B4nan May 14, 2021
8961823
chore: replace `cherow` with `escaya`
B4nan May 14, 2021
244b16f
chore: move `makeInputJsFieldsReadable` to `input_schema` package
B4nan May 17, 2021
f62bc6a
chore: move `ImageProxyClient` to separate package
B4nan May 17, 2021
b3aab5d
chore: remove useless constructor
B4nan May 17, 2021
f0ab031
chore: update eslint config
B4nan May 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@apify"
"extends": ["@apify/ts"]
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package-lock.json -diff -merge
package-lock.json linguist-generated=true
32 changes: 0 additions & 32 deletions .github/scripts/before-beta-release.js

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/check.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/check_pr_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Check PR title

on:
pull_request_target:
types: [ opened, edited, synchronize ]

jobs:
check_pr_title:
name: 'Check PR title'
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v1.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114 changes: 0 additions & 114 deletions .github/workflows/release.yml

This file was deleted.

120 changes: 120 additions & 0 deletions .github/workflows/test_and_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Check & Release

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
name: Test
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [ 12, 14, 15, 16 ]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Update NPM
run: npm install --no-audit -g npm@latest
- name: Install Dependencies
run: npm ci --no-audit
- name: Run Tests
run: npm test

build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16
- name: Cache node_modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Update NPM
run: npm install --no-audit -g npm@latest
- name: Install Dependencies
run: npm ci --no-audit
- run: npm run build

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16
- name: Cache node_modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
run: npm ci --no-audit
- run: npm run lint

publish:
name: Publish to NPM
if: github.ref == 'refs/heads/master'
needs: [ test, build, lint ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 0 # we need to pull everything to allow lerna to detect what packages changed
ref: master
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Cache node_modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }}
- name: Check for changes
id: changed_packages
run: |
echo "::set-output name=changed_packages::$(npx lerna changed -p | wc -l | xargs)"
- name: Release
if: steps.changed_packages.outputs.changed_packages != '0'
run: |
git config --global user.name 'Apify Release Bot'
git config --global user.email 'noreply@apify.com'
echo "access=public" >> .npmrc
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
npm ci --no-audit
npm run build
git checkout -- .
npx lerna publish --contents dist --yes --no-verify-access
npm ci --no-audit # reinstall to have updated lock file
npx lerna ls --json | npx ts-node -T scripts/sync-root-changelog.ts
git commit -am 'chore: update root lock file and changelog [skip ci]'
git push
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_USER: "noreply@apify.com:${{ secrets.GH_TOKEN }}"
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build
dist
docs
node_modules
*.log
Expand All @@ -11,5 +11,4 @@ logs
pids
.idea
yarn.lock
package-lock.json
types/
.npmrc
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
Loading