Skip to content

Commit

Permalink
Merge pull request #7222 from google/rc/v10.0.0
Browse files Browse the repository at this point in the history
release: v10.0.0
  • Loading branch information
ericblackmonGoogle authored Jun 28, 2023
2 parents 399bd65 + 241c963 commit d832085
Show file tree
Hide file tree
Showing 562 changed files with 42,534 additions and 34,714 deletions.
3 changes: 0 additions & 3 deletions .clang-format

This file was deleted.

12 changes: 10 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
*_compressed*.js
# Build Artifacts
/msg/*
/build/*
/dist/*
/typings/*
/docs/*

# Tests other than mocha unit tests
/tests/blocks/*
/tests/themes/*
/tests/compile/*
Expand All @@ -11,10 +15,14 @@
/tests/screenshot/*
/tests/test_runner.js
/tests/workspace_svg/*

# Demos, scripts, misc
/node_modules/*
/generators/*
/demos/*
/appengine/*
/externs/*
/closure/*
/scripts/gulpfiles/*
/typings/*
CHANGELOG.md
PULL_REQUEST_TEMPLATE.md
81 changes: 23 additions & 58 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
const rules = {
'curly': ['error'],
'eol-last': ['error'],
'keyword-spacing': ['error'],
'linebreak-style': ['error', 'unix'],
'max-len': [
'error',
{
'code': 100,
'tabWidth': 4,
'ignoreStrings': true,
'ignoreRegExpLiterals': true,
'ignoreUrls': true,
},
],
'no-trailing-spaces': ['error', {'skipBlankLines': true}],
'no-unused-vars': [
'warn',
'error',
{
'args': 'after-used',
// Ignore vars starting with an underscore.
Expand All @@ -29,20 +14,12 @@ const rules = {
// Blockly uses single quotes except for JSON blobs, which must use double
// quotes.
'quotes': ['off'],
'semi': ['error', 'always'],
// Blockly doesn't have space before function paren when defining functions.
'space-before-function-paren': ['error', 'never'],
// Blockly doesn't have space before function paren when calling functions.
'func-call-spacing': ['error', 'never'],
'space-infix-ops': ['error'],
// Blockly uses 'use strict' in files.
'strict': ['off'],
// Closure style allows redeclarations.
'no-redeclare': ['off'],
'valid-jsdoc': ['error'],
'no-console': ['off'],
'no-multi-spaces': ['error', {'ignoreEOLComments': true}],
'operator-linebreak': ['error', 'after'],
'spaced-comment': [
'error',
'always',
Expand All @@ -61,27 +38,13 @@ const rules = {
'allow': ['^opt_', '^_opt_', '^testOnly_'],
},
],
// Use clang-format for indentation by running `npm run format`.
'indent': ['off'],
// Blockly uses capital letters for some non-constructor namespaces.
// Keep them for legacy reasons.
'new-cap': ['off'],
// Mostly use default rules for brace style, but allow single-line blocks.
'brace-style': ['error', '1tbs', {'allowSingleLine': true}],
// Blockly uses objects as maps, but uses Object.create(null) to
// instantiate them.
'guard-for-in': ['off'],
'prefer-spread': ['off'],
'comma-dangle': [
'error',
{
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'always-multiline',
'exports': 'always-multiline',
'functions': 'ignore',
},
],
};

/**
Expand All @@ -92,10 +55,7 @@ const rules = {
function buildTSOverride({files, tsconfig}) {
return {
'files': files,
'plugins': [
'@typescript-eslint/eslint-plugin',
'jsdoc',
],
'plugins': ['@typescript-eslint/eslint-plugin', 'jsdoc'],
'settings': {
'jsdoc': {
'mode': 'typescript',
Expand All @@ -111,6 +71,7 @@ function buildTSOverride({files, tsconfig}) {
'extends': [
'plugin:@typescript-eslint/recommended',
'plugin:jsdoc/recommended',
'prettier', // Extend again so that these rules are applied last
],
'rules': {
// TS rules
Expand All @@ -124,14 +85,12 @@ function buildTSOverride({files, tsconfig}) {
// Use TS-specific rule.
'no-unused-vars': ['off'],
'@typescript-eslint/no-unused-vars': [
'warn',
'error',
{
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
},
],
'func-call-spacing': ['off'],
'@typescript-eslint/func-call-spacing': ['warn'],
// Temporarily disable. 23 problems.
'@typescript-eslint/no-explicit-any': ['off'],
// Temporarily disable. 128 problems.
Expand Down Expand Up @@ -162,9 +121,19 @@ function buildTSOverride({files, tsconfig}) {
'publicOnly': true,
},
],
// Disable because of false alarms with Closure-supported tags.
// Re-enable after Closure is removed.
'jsdoc/check-tag-names': ['off'],
'jsdoc/check-tag-names': [
'error',
{
'definedTags': [
'sealed',
'typeParam',
'remarks',
'define',
'nocollapse',
'suppress',
],
},
],
// Re-enable after Closure is removed. There shouldn't even be
// types in the TsDoc.
// These are "types" because of Closure's @suppress {warningName}
Expand All @@ -176,7 +145,9 @@ function buildTSOverride({files, tsconfig}) {
'jsdoc/check-param-names': ['off', {'checkDestructured': false}],
// Allow any text in the license tag. Other checks are not relevant.
'jsdoc/check-values': ['off'],
'jsdoc/newline-after-description': ['error'],
// Ensure there is a blank line between the body and any @tags,
// as required by the tsdoc spec (see #6353).
'jsdoc/tag-lines': ['error', 'any', {'startLines': 1}],
},
};
}
Expand All @@ -193,21 +164,15 @@ const eslintJSON = {
'goog': true,
'exports': true,
},
'extends': [
'eslint:recommended',
'google',
],
'extends': ['eslint:recommended', 'google', 'prettier'],
// TypeScript-specific config. Uses above rules plus these.
'overrides': [
buildTSOverride({
files: ['./core/**/*.ts', './core/**/*.tsx'],
files: ['./**/*.ts', './**/*.tsx'],
tsconfig: './tsconfig.json',
}),
buildTSOverride({
files: [
'./tests/typescript/**/*.ts',
'./tests/typescript/**/*.tsx',
],
files: ['./tests/typescript/**/*.ts', './tests/typescript/**/*.tsx'],
tsconfig: './tests/typescript/tsconfig.json',
}),
{
Expand Down
12 changes: 9 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Contributing to Blockly

Want to contribute? Great!

- First, read this page (including the small print at the end).
- Second, please make pull requests against develop, not master. If your patch
needs to go into master immediately, include a note in your PR.

For more information on style guide and other details, head over to the [Blockly Developers site](https://developers.google.com/blockly/guides/modify/contributing).

### Before you contribute

Before we can use your code, you must sign the
[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual)
(CLA), which you can do online. The CLA is necessary mainly because you own the
Expand All @@ -19,22 +21,26 @@ the CLA until after you've submitted your code for review and a member has
approved it, but you must do it before we can put your code into our codebase.

### Larger changes

Before you start working on a larger contribution, you should get in touch with
us first through the issue tracker with your idea so that we can help out and
possibly guide you. Coordinating up front makes it much easier to avoid
frustration later on.

### Code reviews

All submissions, including submissions by project members, require review. We
use Github pull requests for this purpose.

### Browser compatibility
We care strongly about making Blockly work on all browsers. As of 2022 we
support Edge, Chrome, Safari, and Firefox. We will not accept changes that only
work on a subset of those browsers. You can check [caniuse.com](https://caniuse.com/)

We care strongly about making Blockly work on all browsers. As of 2022 we
support Edge, Chrome, Safari, and Firefox. We will not accept changes that only
work on a subset of those browsers. You can check [caniuse.com](https://caniuse.com/)
for compatibility information.

### The small print

Contributions made by corporations are covered by a different agreement than
the one above, the
[Software Grant and Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate).
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ body:
value: |
1.
2.
3.
3.
- type: textarea
id: stack-trace
attributes:
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/documentation.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Documentation
description: Report an issue with our documentation
labels: 'issue: docs, issue: triage'
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Feature request
description: Suggest an idea for this project
labels: 'issue: feature request, issue: triage'
Expand Down
28 changes: 14 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
target-branch: "develop"
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
target-branch: 'develop'
schedule:
interval: "weekly"
interval: 'weekly'
commit-message:
prefix: "chore(deps)"
prefix: 'chore(deps)'
labels:
- "PR: chore"
- "PR: dependencies"
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/"
target-branch: "develop"
- 'PR: chore'
- 'PR: dependencies'
- package-ecosystem: 'github-actions' # See documentation for possible values
directory: '/'
target-branch: 'develop'
schedule:
interval: "weekly"
interval: 'weekly'
commit-message:
prefix: "chore(deps)"
prefix: 'chore(deps)'
labels:
- "PR: chore"
- "PR: dependencies"
- 'PR: chore'
- 'PR: dependencies'
14 changes: 7 additions & 7 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ changelog:
exclude:
labels:
- ignore-for-release
- "PR: chore"
- 'PR: chore'
authors:
- dependabot
categories:
Expand All @@ -16,17 +16,17 @@ changelog:
- deprecation
- title: New features ✨
labels:
- "PR: feature"
- 'PR: feature'
- title: Bug fixes 🐛
labels:
- "PR: fix"
- 'PR: fix'
- title: Cleanup ♻️
labels:
- "PR: docs"
- "PR: refactor"
- 'PR: docs'
- 'PR: refactor'
- title: Reverted changes ⎌
labels:
- "PR: revert"
- 'PR: revert'
- title: Other changes
labels:
- "*"
- '*'
2 changes: 1 addition & 1 deletion .github/workflows/appengine_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
path: _deploy/

- name: Deploy to App Engine
uses: google-github-actions/[email protected].2
uses: google-github-actions/[email protected].7
# For parameters see:
# https://github.com/google-github-actions/deploy-appengine#inputs
with:
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/assign_reviewers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ jobs:
requested-reviewer:
runs-on: ubuntu-latest
steps:
- name: Assign requested reviewer
uses: actions/github-script@v6
with:
script: |
try {
if (context.payload.pull_request === undefined) {
throw new Error("Can't get pull_request payload. " +
'Check a request reviewer event was triggered.');
- name: Assign requested reviewer
uses: actions/github-script@v6
with:
script: |
try {
if (context.payload.pull_request === undefined) {
throw new Error("Can't get pull_request payload. " +
'Check a request reviewer event was triggered.');
}
const reviewers = context.payload.pull_request.requested_reviewers;
// Assignees takes in a list of logins rather than the
// reviewer object.
const reviewerNames = reviewers.map(reviewer => reviewer.login);
const {number:issue_number} = context.payload.pull_request;
github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
assignees: reviewerNames
});
} catch (error) {
core.setFailed(error.message);
}
const reviewers = context.payload.pull_request.requested_reviewers;
// Assignees takes in a list of logins rather than the
// reviewer object.
const reviewerNames = reviewers.map(reviewer => reviewer.login);
const {number:issue_number} = context.payload.pull_request;
github.rest.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
assignees: reviewerNames
});
} catch (error) {
core.setFailed(error.message);
}
Loading

0 comments on commit d832085

Please sign in to comment.