Skip to content

Commit

Permalink
build: fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
Long Ho committed Jul 8, 2020
1 parent 251d55c commit a9fffbb
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ build --symlink_prefix=dist/
# 'all' to print logs for all tests
# 'streamed' to output logs for all tests in real time
# (this will force tests to be executed locally one at a time regardless of --test_strategy value).
test --test_output=errors --test_output=streamed
test --test_output=errors

# Support for debugging NodeJS tests
# Add the Bazel option `--config=debug` to enable this
Expand Down
23 changes: 11 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'

# Maintain dependencies for npm
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'

# Maintain dependencies for npm
- package-ecosystem: "gitsubmodule"
directory: "/"
- package-ecosystem: 'gitsubmodule'
directory: '/'
schedule:
interval: "daily"

interval: 'daily'
47 changes: 23 additions & 24 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,33 @@ on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2.3.1
with:
submodules: true
fetch-depth: 110
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.0
with:
node-version: ${{ matrix.node-version }}
- name: yarn install
run: |
yarn install --frozen-lockfile
env:
CI: true
- name: yarn build
run: |
yarn build
env:
CI: true
- name: yarn test
run: |
yarn test
env:
CI: true
- uses: actions/checkout@v2.3.1
with:
submodules: true
fetch-depth: 110
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.0
with:
node-version: ${{ matrix.node-version }}
- name: yarn install
run: |
yarn install --frozen-lockfile
env:
CI: true
- name: yarn build
run: |
yarn build
env:
CI: true
- name: yarn test
run: |
yarn test
env:
CI: true
24 changes: 6 additions & 18 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
bazel-out
dist
packages/*/CHANGELOG.md
packages/formatjs-extract-cldr-data/src/dateFields.ts
packages/intl-messageformat-parser/src/parser.ts
packages/intl-relativetimeformat/src/en.ts
packages/intl-relativetimeformat/src/locales.ts
packages/intl-utils/src/aliases.ts
packages/intl-utils/src/parentLocales.ts
packages/intl-listformat/src/locales.ts
packages/intl-locale/src/unicode-locale-id.ts
packages/intl-numberformat/src/data/*
packages/babel-plugin-react-intl/src/options.ts
packages/intl-getcanonicallocales/src/aliases.ts
packages/intl-numberformat/src/data/
test262*
test262/
website/.docusaurus
website/build
website/.now
packages/react-intl/temp
dist
dist-es6
lib
polyfill-locales.js
website/CHANGELOG.md
bazel-out
test262*
website/build
website/CHANGELOG.md
28 changes: 14 additions & 14 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev:cjs",
"problemMatcher": ["$tsc-watch"],
"label": "yarn: dev:cjs",
"detail": "tsc -b packages/* --watch",
"group": {
"kind": "build",
"isDefault": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev:cjs",
"problemMatcher": ["$tsc-watch"],
"label": "yarn: dev:cjs",
"detail": "tsc -b packages/* --watch",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"prettier:check": "prettier --check '**/*.{md,ts,tsx}'",
"prettier": "prettier --write '**/*.{md,ts,tsx}'",
"test": "yarn run format:check && bazel test $(bazel query 'filter(\"^((?!karma).)*$\", kind(\".*_test rule\", //...))')",
"bazel:lint-only": "buildifier --lint=warn -v --warnings=attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-actions,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,out-of-order-load,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unsorted-dict-items,unused-variable",
"bazel:lint": "buildifier --lint=warn --mode=fix -v --warnings=attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-actions,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,out-of-order-load,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unsorted-dict-items,unused-variable",
"bazel:lint-only": "yarn bazel:lint --lint=warn",
"bazel:lint": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-actions,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,out-of-order-load,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unsorted-dict-items,unused-variable",
"format": "yarn bazel:lint && yarn prettier",
"format:check": "yarn bazel:lint-only && yarn prettier:check"
},
Expand Down
7 changes: 6 additions & 1 deletion packages/babel-plugin-react-intl/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ export interface OptionsSchema {
moduleSourceName?: string;
extractSourceLocation?: boolean;
messagesDir?: string;
overrideIdFn?: (id: string, defaultMessage: string, description: string, filePath: string) => string;
overrideIdFn?: (
id: string,
defaultMessage: string,
description: string,
filePath: string
) => string;
removeDefaultMessage?: boolean;
extractFromFormatMessageCall?: boolean;
additionalComponentNames?: string[];
Expand Down
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
'react-intl/api',
'react-intl/testing',
'react-intl/advanced-usage',
'react-intl/upgrade-guide-5x',
'react-intl/upgrade-guide-4x',
'react-intl/upgrade-guide-3x',
'react-intl/upgrade-guide-2x',
Expand Down

0 comments on commit a9fffbb

Please sign in to comment.