content_type stringclasses 8
values | main_lang stringclasses 7
values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Javascript | Javascript | remove unpurpose test | 6920c0201be8c7b42c82a32bd0622a77b7856660 | <ide><path>test/integration/repro-24783/next.config.js
<del>module.exports = {
<del> reactStrictMode: true,
<del>}
<ide><path>test/integration/repro-24783/pages/_app.js
<del>function MyApp({ Component, pageProps }) {
<del> return <Component {...pageProps} />
<del>}
<del>export default MyApp
<ide><path>test/integration/repro-24783/pages/_document.js
<del>import Document, { Head, Html, Main, NextScript } from 'next/document'
<del>
<del>export default class MyDocument extends Document {
<del> static async getInitialProps(ctx) {
<del> const initialProps = await Document.getInitialProps(ctx)
<del> return { ...initialProps }
<del> }
<del>
<del> render() {
<del> return (
<del> <Html lang="en">
<del> <Head>
<del> {process.env.NODE_ENV === 'production' ? (
<del> <>
<del> <script id="hello" />
<del> <script />
<del> </>
<del> ) : null}
<del> </Head>
<del> <body>
<del> <Main />
<del> <NextScript />
<del> </body>
<del> </Html>
<del> )
<del> }
<del>}
<ide><path>test/integration/repro-24783/pages/foo/[slug].js
<del>export const getStaticPaths = () => {
<del> return {
<del> // `true` also works, but `false` does not, since it causes a 404
<del> fallback: 'blocking',
<del> paths: [],
<del> }
<del>}
<del>
<del>export const getStaticProps = async () => {
<del> return {
<del> props: {},
<del> }
<del>}
<del>
<del>export default function Foo() {
<del> return <h1>hi</h1>
<del>}
<ide><path>test/integration/repro-24783/test/index.test.js
<del>/* eslint-env jest */
<del>
<del>import fs from 'fs-extra'
<del>import { join } from 'path'
<del>import {
<del> renderViaHTTP,
<del> nextBuild,
<del> startApp,
<del> stopApp,
<del> nextServer,
<del>} from 'next-test-utils'
<del>
<del>jest.setTimeout(1000 * 60 * 2)
<del>const appDir = join(__dirname, '..')
<del>
<del>let app
<del>let server
<del>
<del>describe('Cannot assign to read only property children', () => {
<del> beforeEach(() => fs.remove(join(appDir, '.next/')))
<del>
<del> it('Should serve the page', async () => {
<del> await nextBuild(appDir)
<del> app = nextServer({
<del> dir: join(__dirname, '../'),
<del> dev: false,
<del> quiet: true,
<del> })
<del>
<del> server = await startApp(app)
<del> console.log(server.address().port)
<del> const html = await renderViaHTTP(server.address().port, '/foo/123')
<del> expect(html).toContain('hi')
<del> })
<del>
<del> afterAll(async () => {
<del> if (server) stopApp(server)
<del> })
<del>}) | 5 |
Python | Python | optimize np.isin for boolean arrays | d2ea8190c769c1c546f6f3fed495772aeeb90f0b | <ide><path>numpy/lib/arraysetops.py
<ide> def in1d(ar1, ar2, assume_unique=False, invert=False):
<ide> # Ensure that iteration through object arrays yields size-1 arrays
<ide> if ar2.dtype == object:
<ide> ar2 = ar2.reshape(-1, 1)
<add> # Convert booleans to uint8 so we can use the fast integer algorithm
<add> if ar1.dtype == np.bool_:
<add> ar1 = ar1.view(np.uint8)
<add> if ar2.dtype == np.bool_:
<add> ar2 = ar2.view(np.uint8)
<add>
<ide> # Check if we can use a fast integer algorithm:
<ide> integer_arrays = (np.issubdtype(ar1.dtype, np.integer) and
<ide> np.issubdtype(ar2.dtype, np.integer)) | 1 |
Go | Go | restore thread netns | d1e3705c1aa55bb7539b2155c2c1f95f20fe7497 | <ide><path>libnetwork/drivers/overlay/ov_network.go
<ide> type network struct {
<ide>
<ide> func init() {
<ide> reexec.Register("set-default-vlan", setDefaultVlan)
<add>
<add> // Lock main() to the initial thread to exclude the goroutines executing
<add> // func (*network).watchMiss() from being scheduled onto that thread.
<add> // Changes to the network namespace of the initial thread alter
<add> // /proc/self/ns/net, which would break any code which (incorrectly)
<add> // assumes that that file is a handle to the network namespace for the
<add> // thread it is currently executing on.
<add> runtime.LockOSThread()
<ide> }
<ide>
<ide> func setDefaultVlan() {
<ide> func (n *network) initSandbox(restore bool) error {
<ide> func (n *network) watchMiss(nlSock *nl.NetlinkSocket, nsPath string) {
<ide> // With the new version of the netlink library the deserialize function makes
<ide> // requests about the interface of the netlink message. This can succeed only
<del> // if this go routine is in the target namespace. For this reason following we
<del> // lock the thread on that namespace
<del> runtime.LockOSThread()
<del> defer runtime.UnlockOSThread()
<add> // if this go routine is in the target namespace.
<add> origNs, err := netns.Get()
<add> if err != nil {
<add> logrus.WithError(err).Error("failed to get the initial network namespace")
<add> return
<add> }
<add> defer origNs.Close()
<ide> newNs, err := netns.GetFromPath(nsPath)
<ide> if err != nil {
<ide> logrus.WithError(err).Errorf("failed to get the namespace %s", nsPath)
<ide> return
<ide> }
<ide> defer newNs.Close()
<add>
<add> runtime.LockOSThread()
<ide> if err = netns.Set(newNs); err != nil {
<ide> logrus.WithError(err).Errorf("failed to enter the namespace %s", nsPath)
<add> runtime.UnlockOSThread()
<ide> return
<ide> }
<add> defer func() {
<add> if err := netns.Set(origNs); err != nil {
<add> logrus.WithError(err).Error("failed to restore the thread's initial network namespace")
<add> // The error is only fatal for the current thread. Keep this
<add> // goroutine locked to the thread to make the runtime replace it
<add> // with a clean thread once this goroutine terminates.
<add> } else {
<add> runtime.UnlockOSThread()
<add> }
<add> }()
<ide> for {
<ide> msgs, _, err := nlSock.Receive()
<ide> if err != nil { | 1 |
Text | Text | remove setuseoldbridge from the documentation | ae9cc004b9d24bfafa88f75557536f392f115084 | <ide><path>docs/IntegrationWithExistingApps.md
<ide> You need to add some native code in order to start the React Native runtime and
<ide>
<ide> > If you are targetting Android version <5, use the `AppCompatActivity` class from the `com.android.support:appcompat` package instead of `Activity`.
<ide>
<del>> If you find out later that your app crashes due to `Didn't find class "com.facebook.jni.IteratorHelper"` exception, uncomment the `setUseOldBridge` line. [See related issue on GitHub.](https://github.com/facebook/react-native/issues/8701)
<del>
<ide> ```java
<ide> public class MyReactActivity extends Activity implements DefaultHardwareBackBtnHandler {
<ide> private ReactRootView mReactRootView;
<ide> public class MyReactActivity extends Activity implements DefaultHardwareBackBtnH
<ide> .addPackage(new MainReactPackage())
<ide> .setUseDeveloperSupport(BuildConfig.DEBUG)
<ide> .setInitialLifecycleState(LifecycleState.RESUMED)
<del> //.setUseOldBridge(true) // uncomment this line if your app crashes
<ide> .build();
<ide> mReactRootView.startReactApplication(mReactInstanceManager, "HelloWorld", null);
<ide> | 1 |
PHP | PHP | replace a trigger_error with an exception | c2aa21ed87ad4fb5e84a89a6c102f45be837d3bd | <ide><path>lib/Cake/Controller/Component/CookieComponent.php
<ide> use Cake\Controller\ComponentRegistry;
<ide> use Cake\Controller\Controller;
<ide> use Cake\Core\Configure;
<add>use Cake\Error;
<ide> use Cake\Event\Event;
<ide> use Cake\Network\Request;
<ide> use Cake\Network\Response;
<ide> public function destroy() {
<ide> *
<ide> * @param string $type Encryption method
<ide> * @return void
<add> * @throws Cake\Error\Exception When an unknown type is used.
<ide> */
<ide> public function type($type = 'rijndael') {
<del> $availableTypes = array(
<add> $availableTypes = [
<ide> 'rijndael'
<del> );
<add> ];
<ide> if (!in_array($type, $availableTypes)) {
<del> trigger_error(__d('cake_dev', 'You must use rijndael for cookie encryption type'), E_USER_WARNING);
<add> throw new Error\Exception(__d('cake_dev', 'You must use rijndael for cookie encryption type'));
<ide> }
<ide> $this->_type = $type;
<ide> } | 1 |
Javascript | Javascript | guard navigator from dismatching gestures | 3812c74e7c7f1e847b118cfdc328fc36c31b5411 | <ide><path>Libraries/CustomComponents/Navigator/Navigator.js
<ide> var Navigator = React.createClass({
<ide> },
<ide>
<ide> _matchGestureAction: function(eligibleGestures, gestures, gestureState) {
<del> if (!gestures) {
<add> if (!gestures || !eligibleGestures || !eligibleGestures.some) {
<ide> return null;
<ide> }
<ide> var matchedGesture = null; | 1 |
Python | Python | add remotemonitor callback | 5a1a00e69e5df1661c7d8e5359b8eca7db7f7208 | <ide><path>keras/callbacks.py
<ide> import theano.tensor as T
<ide> import numpy as np
<ide> import warnings
<del>import time
<add>import time, json
<ide> from collections import deque
<ide>
<ide> from .utils.generic_utils import Progbar
<ide> def on_epoch_end(self, epoch, logs={}):
<ide>
<ide>
<ide> class EarlyStopping(Callback):
<del> def __init__(self, patience=1, verbose=0):
<add> def __init__(self, patience=0, verbose=0):
<ide> super(Callback, self).__init__()
<ide>
<ide> self.patience = patience
<ide> def on_epoch_end(self, epoch, logs={}):
<ide> print("Epoch %05d: early stopping" % (epoch))
<ide> self.model.stop_training = True
<ide> self.wait += 1
<add>
<add>
<add>class RemoteMonitor(Callback):
<add> def __init__(self, root='http://localhost:9000'):
<add> self.root = root
<add> self.seen = 0
<add> self.tot_loss = 0.
<add> self.tot_accuracy = 0.
<add>
<add> def on_epoch_begin(self, epoch, logs={}):
<add> self.seen = 0
<add> self.tot_loss = 0.
<add> self.tot_accuracy = 0.
<add>
<add> def on_batch_end(self, batch, logs={}):
<add> batch_size = logs.get('size', 0)
<add> self.seen += batch_size
<add> self.tot_loss += logs.get('loss', 0.) * batch_size
<add> if self.params['show_accuracy']:
<add> self.tot_accuracy += logs.get('accuracy', 0.) * batch_size
<add>
<add> def on_epoch_end(self, epoch, logs={}):
<add> import requests
<add> logs['epoch'] = epoch
<add> logs['loss'] = self.tot_loss / self.seen
<add> r = requests.post(self.root + '/publish/epoch/end/', {'data':json.dumps(logs)}) | 1 |
Ruby | Ruby | fix broken tests | 147c20b62919aaebda0cafc0419154042b7a0c64 | <ide><path>actionmailer/test/base_test.rb
<ide> # encoding: utf-8
<ide> require 'abstract_unit'
<add>require 'set'
<add>
<ide> require 'active_support/time'
<ide>
<ide> require 'mailers/base_mailer'
<ide><path>railties/test/application/initializers/frameworks_test.rb
<ide> require "isolation/abstract_unit"
<add>require 'set'
<ide>
<ide> module ApplicationTests
<ide> class FrameworksTest < ActiveSupport::TestCase
<ide> def notify
<ide> require "#{app_path}/config/environment"
<ide> assert Foo.method_defined?(:foo_path)
<ide> assert Foo.method_defined?(:main_app)
<del> assert_equal ["notify"], Foo.action_methods
<add> assert_equal Set.new(["notify"]), Foo.action_methods
<ide> end
<ide>
<ide> test "allows to not load all helpers for controllers" do | 2 |
Text | Text | update description of pig-latin algorithm | 7304bdc0af85e2e5b0f0261cb4257ff9f2f92059 | <ide><path>curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin.english.md
<ide> challengeType: 5
<ide> Translate the provided string to pig latin.
<ide> <a href="http://en.wikipedia.org/wiki/Pig_Latin" target="_blank">Pig Latin</a> takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an "ay".
<ide> If a word begins with a vowel you just add "way" to the end.
<add>If a word does not contain a vowel, just add "ay" to the end.
<ide> Input strings are guaranteed to be English words in all lowercase.
<ide> Remember to use <a href='http://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck/19514' target='_blank'>Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.
<ide> </section> | 1 |
Javascript | Javascript | give useful error in solutionform | ab83d698f94ffa644bcd97fcf7e12bda68bc8734 | <ide><path>client/src/components/formHelpers/Form.test.js
<ide> test('should submit', () => {
<ide>
<ide> fireEvent.click(button);
<ide> expect(submit).toHaveBeenCalledTimes(1);
<del> expect(submit.mock.calls[0][0]).toEqual({ website: websiteValue });
<add> expect(submit.mock.calls[0][0].values).toEqual({ website: websiteValue });
<ide>
<ide> fireEvent.change(websiteInput, { target: { value: `${websiteValue}///` } });
<ide> expect(websiteInput).toHaveValue(`${websiteValue}///`);
<ide>
<ide> fireEvent.click(button);
<ide> expect(submit).toHaveBeenCalledTimes(2);
<del> expect(submit.mock.calls[1][0]).toEqual({ website: websiteValue });
<add> expect(submit.mock.calls[1][0].values).toEqual({ website: websiteValue });
<ide> });
<ide><path>client/src/components/formHelpers/FormFields.js
<ide> import React from 'react';
<ide> import { kebabCase } from 'lodash';
<add>import normalizeUrl from 'normalize-url';
<ide> import PropTypes from 'prop-types';
<ide> import {
<ide> Alert,
<ide> import {
<ide> HelpBlock
<ide> } from '@freecodecamp/react-bootstrap';
<ide> import { Field } from 'react-final-form';
<add>import {
<add> editorValidator,
<add> localhostValidator,
<add> composeValidators
<add>} from './FormValidators';
<ide>
<ide> const propTypes = {
<ide> formFields: PropTypes.arrayOf(
<ide> function FormFields(props) {
<ide> types = {}
<ide> } = options;
<ide>
<add> const nullOrWarning = (value, error, isURL) => {
<add> let validationError;
<add> if (value && isURL) {
<add> try {
<add> normalizeUrl(value, { stripWWW: false });
<add> } catch (err) {
<add> validationError = err.message;
<add> }
<add> }
<add> const validationWarning = composeValidators(
<add> editorValidator,
<add> localhostValidator
<add> )(value);
<add> const message = error || validationError || validationWarning;
<add> return message ? (
<add> <HelpBlock>
<add> <Alert bsStyle={error || validationError ? 'danger' : 'info'}>
<add> {message}
<add> </Alert>
<add> </HelpBlock>
<add> ) : null;
<add> };
<ide> return (
<ide> <div>
<ide> {formFields
<ide> function FormFields(props) {
<ide> const type = name in types ? types[name] : 'text';
<ide> const placeholder =
<ide> name in placeholders ? placeholders[name] : '';
<add> const isURL = types[name] === 'url';
<ide> return (
<ide> <Col key={key} xs={12}>
<ide> <FormGroup>
<ide> function FormFields(props) {
<ide> type={type}
<ide> value={value}
<ide> />
<del> {error && !pristine ? (
<del> <HelpBlock>
<del> <Alert bsStyle='danger'>{error}</Alert>
<del> </HelpBlock>
<del> ) : null}
<add> {nullOrWarning(value, !pristine && error, isURL)}
<ide> </FormGroup>
<ide> </Col>
<ide> );
<ide><path>client/src/components/formHelpers/FormValidators.js
<add>// Matches editor links for: Repl.it, Glitch, CodeSandbox
<add>const editorRegex = /repl\.it\/@|glitch\.com\/edit\/#!|codesandbox\.io\/s\//;
<add>const localhostRegex = /localhost:/;
<add>
<add>export const editorValidator = value =>
<add> editorRegex.test(value) ? 'Remember to submit the Live App URL.' : null;
<add>
<add>export const localhostValidator = value =>
<add> localhostRegex.test(value)
<add> ? 'Remember to submit a publicly visible app URL.'
<add> : null;
<add>
<add>export const composeValidators = (...validators) => value =>
<add> validators.reduce((error, validator) => error ?? validator(value), null);
<ide><path>client/src/components/formHelpers/index.js
<ide> import normalizeUrl from 'normalize-url';
<add>import {
<add> localhostValidator,
<add> editorValidator,
<add> composeValidators
<add>} from './FormValidators';
<ide>
<ide> export { default as BlockSaveButton } from './BlockSaveButton.js';
<ide> export { default as BlockSaveWrapper } from './BlockSaveWrapper.js';
<ide> const normalizeOptions = {
<ide> };
<ide>
<ide> export function formatUrlValues(values, options) {
<del> return Object.keys(values).reduce((result, key) => {
<add> const validatedValues = { values: {}, errors: [], invalidValues: [] };
<add> const urlValues = Object.keys(values).reduce((result, key) => {
<ide> let value = values[key];
<add> const nullOrWarning = composeValidators(
<add> localhostValidator,
<add> editorValidator
<add> )(value);
<add> if (nullOrWarning) {
<add> validatedValues.invalidValues.push(nullOrWarning);
<add> }
<ide> if (value && options.types[key] === 'url') {
<del> value = normalizeUrl(value, normalizeOptions);
<add> try {
<add> value = normalizeUrl(value, normalizeOptions);
<add> } catch (err) {
<add> // Not a valid URL for testing or submission
<add> validatedValues.errors.push({ error: err, value });
<add> }
<ide> }
<ide> return { ...result, [key]: value };
<ide> }, {});
<add> validatedValues.values = urlValues;
<add> return validatedValues;
<ide> }
<ide><path>client/src/components/settings/Certification.js
<ide> export class CertificationSettings extends Component {
<ide> };
<ide>
<ide> // legacy projects rendering
<del> handleSubmitLegacy(formChalObj) {
<add> handleSubmitLegacy({ values: formChalObj }) {
<ide> const {
<ide> isHonest,
<ide> createFlashMessage,
<ide><path>client/src/templates/Challenges/projects/SolutionForm.js
<ide> export class SolutionForm extends Component {
<ide> componentDidMount() {
<ide> this.props.updateSolutionForm({});
<ide> }
<del> handleSubmit(values) {
<del> this.props.updateSolutionForm(values);
<del> this.props.onSubmit();
<add>
<add> handleSubmit(validatedValues) {
<add> // Do not execute challenge, if errors
<add> if (validatedValues.errors.length === 0) {
<add> if (validatedValues.invalidValues.length === 0) {
<add> // updates values on server
<add> this.props.updateSolutionForm(validatedValues.values);
<add> this.props.onSubmit({ isShouldCompletionModalOpen: true });
<add> } else {
<add> this.props.onSubmit({ isShouldCompletionModalOpen: false });
<add> }
<add> }
<ide> }
<add>
<ide> render() {
<ide> const { isSubmitting, challengeType, description, t } = this.props;
<ide>
<ide><path>client/src/templates/Challenges/projects/backend/Show.js
<ide> export class BackEnd extends Component {
<ide> super(props);
<ide> this.state = {};
<ide> this.updateDimensions = this.updateDimensions.bind(this);
<add> this.handleSubmit = this.handleSubmit.bind(this);
<ide> }
<ide>
<ide> componentDidMount() {
<ide> export class BackEnd extends Component {
<ide> challengeMounted(challengeMeta.id);
<ide> }
<ide>
<add> handleSubmit({ isShouldCompletionModalOpen }) {
<add> this.props.executeChallenge(isShouldCompletionModalOpen);
<add> }
<add>
<ide> render() {
<ide> const {
<ide> data: {
<ide> export class BackEnd extends Component {
<ide> },
<ide> t,
<ide> tests,
<del> executeChallenge,
<ide> updateSolutionFormValues
<ide> } = this.props;
<ide>
<ide> export class BackEnd extends Component {
<ide> />
<ide> <SolutionForm
<ide> challengeType={challengeType}
<del> onSubmit={executeChallenge}
<add> onSubmit={this.handleSubmit}
<ide> updateSolutionForm={updateSolutionFormValues}
<ide> />
<ide> <ProjectToolPanel
<ide><path>client/src/templates/Challenges/projects/frontend/Show.js
<ide> import {
<ide> openModal,
<ide> updateSolutionFormValues
<ide> } from '../../redux';
<add>
<ide> import { getGuideUrl } from '../../utils';
<ide>
<ide> import LearnLayout from '../../../../components/layouts/Learn';
<ide> const propTypes = {
<ide> };
<ide>
<ide> export class Project extends Component {
<add> constructor() {
<add> super();
<add> this.handleSubmit = this.handleSubmit.bind(this);
<add> }
<ide> componentDidMount() {
<ide> const {
<ide> challengeMounted,
<ide> export class Project extends Component {
<ide> }
<ide> }
<ide>
<add> handleSubmit({ isShouldCompletionModalOpen }) {
<add> if (isShouldCompletionModalOpen) {
<add> this.props.openCompletionModal();
<add> }
<add> }
<add>
<ide> render() {
<ide> const {
<ide> data: {
<ide> export class Project extends Component {
<ide> }
<ide> },
<ide> isChallengeCompleted,
<del> openCompletionModal,
<ide> pageContext: {
<ide> challengeMeta: { nextChallengePath, prevChallengePath }
<ide> },
<ide> export class Project extends Component {
<ide> <SolutionForm
<ide> challengeType={challengeType}
<ide> description={description}
<del> onSubmit={openCompletionModal}
<add> onSubmit={this.handleSubmit}
<ide> updateSolutionForm={updateSolutionFormValues}
<ide> />
<ide> <ProjectToolPanel
<ide><path>client/src/templates/Challenges/redux/challenge-modal-epic.js
<del>import { ofType } from 'redux-observable';
<del>import { switchMap } from 'rxjs/operators';
<del>import { of, empty } from 'rxjs';
<del>
<del>import { types, openModal } from './';
<del>
<del>function challengeModalEpic(action$) {
<del> return action$.pipe(
<del> ofType(types.updateTests),
<del> switchMap(({ payload: tests }) => {
<del> const challengeComplete = tests.every(test => test.pass && !test.err);
<del> return challengeComplete ? of(openModal('completion')) : empty();
<del> })
<del> );
<del>}
<del>
<del>export default challengeModalEpic;
<ide><path>client/src/templates/Challenges/redux/execute-challenge-saga.js
<ide> import {
<ide> updateLogs,
<ide> logsToConsole,
<ide> updateTests,
<add> openModal,
<ide> isBuildEnabledSelector,
<ide> disableBuildOnError,
<ide> types
<ide> import {
<ide> const previewTimeout = 2500;
<ide> let previewTask;
<ide>
<del>export function* executeCancellableChallengeSaga() {
<add>export function* executeCancellableChallengeSaga(payload) {
<ide> if (previewTask) {
<ide> yield cancel(previewTask);
<ide> }
<del> const task = yield fork(executeChallengeSaga);
<add> // executeChallenge with payload containing isShouldCompletionModalOpen
<add> const task = yield fork(executeChallengeSaga, payload);
<ide> previewTask = yield fork(previewChallengeSaga, { flushLogs: false });
<ide>
<ide> yield take(types.cancelTests);
<ide> export function* executeCancellablePreviewSaga() {
<ide> previewTask = yield fork(previewChallengeSaga);
<ide> }
<ide>
<del>export function* executeChallengeSaga() {
<add>export function* executeChallengeSaga({
<add> payload: isShouldCompletionModalOpen
<add>}) {
<ide> const isBuildEnabled = yield select(isBuildEnabledSelector);
<ide> if (!isBuildEnabled) {
<ide> return;
<ide> export function* executeChallengeSaga() {
<ide> document
<ide> );
<ide> const testResults = yield executeTests(testRunner, tests);
<del>
<ide> yield put(updateTests(testResults));
<add>
<add> const challengeComplete = testResults.every(test => test.pass && !test.err);
<add> if (challengeComplete && isShouldCompletionModalOpen) {
<add> yield put(openModal('completion'));
<add> }
<add>
<ide> yield put(updateConsole(i18next.t('learn.tests-completed')));
<ide> yield put(logsToConsole(i18next.t('learn.console-output')));
<ide> } catch (e) {
<ide><path>client/src/templates/Challenges/redux/index.js
<ide> import { createTypes } from '../../../../utils/stateManagement';
<ide>
<ide> import { createPoly } from '../../../../../utils/polyvinyl';
<ide> import { getLines } from '../../../../../utils/get-lines';
<del>import challengeModalEpic from './challenge-modal-epic';
<ide> import completionEpic from './completion-epic';
<ide> import codeLockEpic from './code-lock-epic';
<ide> import createQuestionEpic from './create-question-epic';
<ide> export const types = createTypes(
<ide> );
<ide>
<ide> export const epics = [
<del> challengeModalEpic,
<ide> codeLockEpic,
<ide> completionEpic,
<ide> createQuestionEpic,
<ide> export const isCompletionModalOpenSelector = state =>
<ide> export const isHelpModalOpenSelector = state => state[ns].modal.help;
<ide> export const isVideoModalOpenSelector = state => state[ns].modal.video;
<ide> export const isResetModalOpenSelector = state => state[ns].modal.reset;
<add>
<ide> export const isBuildEnabledSelector = state => state[ns].isBuildEnabled;
<ide> export const successMessageSelector = state => state[ns].successMessage;
<ide> | 11 |
PHP | PHP | correct property comment | 827c815cf1a6e33fe041f5d4b62ce8f0dd7f92ec | <ide><path>lib/Cake/Test/Case/Model/models.php
<ide> class TranslatedArticle extends CakeTestModel {
<ide> public $belongsTo = array('User');
<ide>
<ide> /**
<del> * belongsTo property
<add> * hasMany property
<ide> *
<ide> * @var array
<ide> */ | 1 |
Javascript | Javascript | fix code style | 059726d4cf426cae30dc9eee9f50bc216f18de24 | <ide><path>test/binCases/plugins/uglifyjsplugin-empty-args/test.js
<ide> "use strict";
<ide>
<ide> module.exports = function testAssertions(code, stdout, stderr) {
<del> code.should.be.exactly(0);
<add> code.should.be.exactly(0);
<ide>
<del> stdout.should.be.ok();
<del> stdout[3].should.containEql("Hash: ");
<del> stdout[4].should.containEql("Version: ");
<del> stdout[5].should.containEql("Time: ");
<del> stdout[7].should.containEql("null.js");
<del> stdout[8].should.containEql("./index.js");
<del> stdout[8].should.containEql("[built]");
<add> stdout.should.be.ok();
<add> stdout[3].should.containEql("Hash: ");
<add> stdout[4].should.containEql("Version: ");
<add> stdout[5].should.containEql("Time: ");
<add> stdout[7].should.containEql("null.js");
<add> stdout[8].should.containEql("./index.js");
<add> stdout[8].should.containEql("[built]");
<ide>
<del> stderr.should.be.empty();
<del>}
<add> stderr.should.be.empty();
<add>};
<ide><path>test/binCases/plugins/uglifyjsplugin-empty-args/webpack.config.js
<ide> var path = require("path");
<ide>
<ide> module.exports = {
<del> entry: path.resolve(__dirname, "./index"),
<del>}
<add> entry: path.resolve(__dirname, "./index"),
<add>}; | 2 |
Ruby | Ruby | add tap audits for audit exceptions | fe1c7c16b0d2df1a6e9e85dbb5f4bdec93971e84 | <ide><path>Library/Homebrew/dev-cmd/audit.rb
<ide> def audit
<ide> options[:except_cops] = [:FormulaAuditStrict]
<ide> end
<ide>
<add> # Run tap audits first
<add> if args.tap
<add> tap = Tap.fetch(args.tap)
<add> ta = TapAuditor.new(tap, options)
<add> ta.audit
<add>
<add> if ta.problems.any?
<add> tap_problem_lines = format_problem_lines(ta.problems)
<add> tap_problem_count = ta.problems.size
<add>
<add> puts "#{tap.name}:", tap_problem_lines.map { |s| " #{s}" }
<add> odie "#{tap_problem_count} #{"problem".pluralize(tap_problem_count)} in 1 tap detected"
<add> end
<add> end
<add>
<ide> # Check style in a single batch run up front for performance
<ide> style_offenses = Style.check_style_json(style_files, options) if style_files
<ide> # load licenses
<ide> def problem(text)
<ide> @problems << text
<ide> end
<ide> end
<add>
<add> class TapAuditor
<add> attr_reader :name, :path, :problems
<add>
<add> def initialize(tap, options = {})
<add> @name = tap.name
<add> @path = tap.path
<add> @tap_audit_exceptions = tap.audit_exceptions
<add> @strict = options[:strict]
<add> @problems = []
<add> end
<add>
<add> def audit
<add> audit_json_files
<add> audit_tap_audit_exceptions
<add> self
<add> end
<add>
<add> def audit_json_files
<add> Dir[@path/"**/*.json"].each do |file|
<add> JSON.parse Pathname.new(file).read
<add> rescue JSON::ParserError
<add> problem "#{file.delete_prefix("#{@path}/")} contains invalid JSON"
<add> end
<add> end
<add>
<add> def audit_tap_audit_exceptions
<add> @tap_audit_exceptions.each do |list_name, formula_names|
<add> formula_names = formula_names.keys if formula_names.is_a? Hash
<add>
<add> invalid_formulae = []
<add> formula_names.each do |name|
<add> invalid_formulae.push name if Formulary.factory(name).tap != @name
<add> rescue FormulaUnavailableError
<add> invalid_formulae.push name
<add> end
<add>
<add> next if invalid_formulae.empty?
<add>
<add> problem <<~EOS
<add> audit_exceptions/#{list_name}.json references
<add> formulae that were are found in the #{@name} tap.
<add> Invalid formulae: #{invalid_formulae.join(", ")}
<add> EOS
<add> end
<add> end
<add>
<add> def problem(message, location: nil)
<add> @problems << ({ message: message, location: location })
<add> end
<add> end
<ide> end | 1 |
PHP | PHP | add first draft of schema data | b65a408946d3f29c4c40e322ca00905207656390 | <ide><path>tests/schema.php
<ide> * features of the Database package.
<ide> */
<ide> return [
<add> [
<add> 'table' => 'binary_uuid_items',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'binaryuuid',
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'published' => [
<add> 'type' => 'boolean',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'unique_authors',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'first_author_id' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> 'second_author_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> 'nullable_non_nullable_unique' => [
<add> 'type' => 'unique',
<add> 'columns' => [
<add> 'first_author_id',
<add> 'second_author_id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'articles_more_translations',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'locale' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'subtitle' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'body' => 'text',
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'locale',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'users',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'username' => [
<add> 'type' => 'string',
<add> 'null' => true,
<add> ],
<add> 'password' => [
<add> 'type' => 'string',
<add> 'null' => true,
<add> ],
<add> 'created' => [
<add> 'type' => 'timestamp',
<add> 'null' => true,
<add> ],
<add> 'updated' => [
<add> 'type' => 'timestamp',
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'featured_tags',
<add> 'columns' => [
<add> 'tag_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'priority' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'tag_id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'column_schema_aware_type_values',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'val' => [
<add> 'type' => 'text',
<add> 'null' => false,
<add> 'comment' => 'Fixture comment',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'sections_members',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'section_id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'member_id' => [
<add> 'type' => 'integer',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'site_articles_tags',
<add> 'columns' => [
<add> 'article_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'tag_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'site_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'UNIQUE_TAG2' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'article_id',
<add> 'tag_id',
<add> 'site_id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'authors_translations',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'locale' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'locale',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'binary_uuid_items_binary_uuid_tags',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'binary_uuid_item_id' => [
<add> 'type' => 'binaryuuid',
<add> 'null' => false,
<add> ],
<add> 'binary_uuid_tag_id' => [
<add> 'type' => 'binaryuuid',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> 'unique_item_tag' => [
<add> 'type' => 'unique',
<add> 'columns' => [
<add> 'binary_uuid_item_id',
<add> 'binary_uuid_tag_id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'auth_users',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'username' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'password' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'created' => 'datetime',
<add> 'updated' => 'datetime',
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'counter_cache_categories',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'length' => 255,
<add> 'null' => false,
<add> ],
<add> 'post_count' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'date_keys',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'date',
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'counter_cache_posts',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> 'length' => 255,
<add> ],
<add> 'user_id' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> 'category_id' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> 'published' => [
<add> 'type' => 'boolean',
<add> 'null' => false,
<add> 'default' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'test_plugin_comments',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'article_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'user_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'comment' => 'text',
<add> 'published' => [
<add> 'type' => 'string',
<add> 'length' => 1,
<add> 'default' => 'N',
<add> ],
<add> 'created' => 'datetime',
<add> 'updated' => 'datetime',
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'members',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'section_count' => [
<add> 'type' => 'integer',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'uuid_items',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'uuid',
<add> ],
<add> 'published' => [
<add> 'type' => 'boolean',
<add> 'null' => false,
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'special_tags_translations',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'locale' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'extra_info' => [
<add> 'type' => 'string',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'locale',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'articles',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'author_id' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> 'null' => true,
<add> ],
<add> 'body' => 'text',
<add> 'published' => [
<add> 'type' => 'string',
<add> 'length' => 1,
<add> 'default' => 'N',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'articles_translations',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'locale' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> 'null' => true,
<add> ],
<add> 'body' => 'text',
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'locale',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'products',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'category' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'price' => [
<add> 'type' => 'integer',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'category',
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'orders',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'product_category' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'product_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> 'product_category_fk' => [
<add> 'type' => 'foreign',
<add> 'columns' => [
<add> 'product_category',
<add> 'product_id',
<add> ],
<add> 'references' => [
<add> 'products',
<add> [
<add> 'category',
<add> 'id',
<add> ],
<add> ],
<add> 'update' => 'cascade',
<add> 'delete' => 'cascade',
<add> ],
<add> ],
<add> 'indexes' => [
<add> 'product_category' => [
<add> 'type' => 'index',
<add> 'columns' => [
<add> 'product_category',
<add> 'product_id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'comments',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'article_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'user_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'comment' => [
<add> 'type' => 'text',
<add> ],
<add> 'published' => [
<add> 'type' => 'string',
<add> 'length' => 1,
<add> 'default' => 'N',
<add> ],
<add> 'created' => [
<add> 'type' => 'datetime',
<add> ],
<add> 'updated' => [
<add> 'type' => 'datetime',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'datatypes',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'biginteger',
<add> ],
<add> 'cost' => [
<add> 'type' => 'decimal',
<add> 'length' => 20,
<add> 'precision' => 1,
<add> 'null' => true,
<add> ],
<add> 'fraction' => [
<add> 'type' => 'decimal',
<add> 'length' => 20,
<add> 'precision' => 19,
<add> 'null' => true,
<add> ],
<add> 'floaty' => [
<add> 'type' => 'float',
<add> 'null' => true,
<add> ],
<add> 'small' => [
<add> 'type' => 'smallinteger',
<add> 'null' => true,
<add> ],
<add> 'tiny' => [
<add> 'type' => 'tinyinteger',
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'authors',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'default' => null,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'counter_cache_comments',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> 'length' => 255,
<add> ],
<add> 'user_id' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'special_tags',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'article_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'tag_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'highlighted' => [
<add> 'type' => 'boolean',
<add> 'null' => true,
<add> ],
<add> 'highlighted_time' => [
<add> 'type' => 'timestamp',
<add> 'null' => true,
<add> ],
<add> 'extra_info' => [
<add> 'type' => 'string',
<add> ],
<add> 'author_id' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> 'UNIQUE_TAG2' => [
<add> 'type' => 'unique',
<add> 'columns' => [
<add> 'article_id',
<add> 'tag_id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'ordered_uuid_items',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'string',
<add> 'length' => 32,
<add> ],
<add> 'published' => [
<add> 'type' => 'boolean',
<add> 'null' => false,
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'counter_cache_users',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'length' => 255,
<add> 'null' => false,
<add> ],
<add> 'post_count' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> 'comment_count' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> 'posts_published' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'tags',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'description' => [
<add> 'type' => 'text',
<add> 'length' => 16777215,
<add> ],
<add> 'created' => [
<add> 'type' => 'datetime',
<add> 'null' => true,
<add> 'default' => null,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'articles_tags',
<add> 'columns' => [
<add> 'article_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'tag_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'unique_tag' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'article_id',
<add> 'tag_id',
<add> ],
<add> ],
<add> 'tag_id_fk' => [
<add> 'type' => 'foreign',
<add> 'columns' => [
<add> 'tag_id',
<add> ],
<add> 'references' => [
<add> 'tags',
<add> 'id',
<add> ],
<add> 'update' => 'cascade',
<add> 'delete' => 'cascade',
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'profiles',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> 'autoIncrement' => true,
<add> ],
<add> 'user_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'first_name' => [
<add> 'type' => 'string',
<add> 'null' => true,
<add> ],
<add> 'last_name' => [
<add> 'type' => 'string',
<add> 'null' => true,
<add> ],
<add> 'is_active' => [
<add> 'type' => 'boolean',
<add> 'null' => false,
<add> 'default' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'sessions',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'string',
<add> 'length' => 128,
<add> ],
<add> 'data' => [
<add> 'type' => 'binary',
<add> 'length' => 16777215,
<add> 'null' => true,
<add> ],
<add> 'expires' => [
<add> 'type' => 'integer',
<add> 'length' => 11,
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'comments_translations',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'locale' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'comment' => 'text',
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'locale',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'menu_link_trees',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'menu' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'lft' => [
<add> 'type' => 'integer',
<add> ],
<add> 'rght' => [
<add> 'type' => 'integer',
<add> ],
<add> 'parent_id' => 'integer',
<add> 'url' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'polymorphic_tagged',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'tag_id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'foreign_key' => [
<add> 'type' => 'integer',
<add> ],
<add> 'foreign_model' => [
<add> 'type' => 'string',
<add> ],
<add> 'position' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'things',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> 'length' => 20,
<add> ],
<add> 'body' => [
<add> 'type' => 'string',
<add> 'length' => 50,
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'site_articles',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'author_id' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> 'site_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> 'null' => true,
<add> ],
<add> 'body' => 'text',
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'site_id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'sections_translations',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'locale' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'locale',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'authors_tags',
<add> 'columns' => [
<add> 'author_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'tag_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'unique_tag' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'author_id',
<add> 'tag_id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'site_authors',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'default' => null,
<add> ],
<add> 'site_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'site_id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'i18n',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'locale' => [
<add> 'type' => 'string',
<add> 'length' => 6,
<add> 'null' => false,
<add> ],
<add> 'model' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'foreign_key' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'field' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'content' => [
<add> 'type' => 'text',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'number_trees',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'parent_id' => 'integer',
<add> 'lft' => [
<add> 'type' => 'integer',
<add> ],
<add> 'rght' => [
<add> 'type' => 'integer',
<add> ],
<add> 'depth' => [
<add> 'type' => 'integer',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'composite_increments',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> 'autoIncrement' => true,
<add> ],
<add> 'account_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'default' => null,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'account_id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'tags_shadow_translations',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'locale' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'locale',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'posts',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'author_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'body' => 'text',
<add> 'published' => [
<add> 'type' => 'string',
<add> 'length' => 1,
<add> 'default' => 'N',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'binary_uuid_tags',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'binaryuuid',
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'tags_translations',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> 'autoIncrement' => true,
<add> ],
<add> 'locale' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'cake_sessions',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'string',
<add> 'length' => 128,
<add> ],
<add> 'data' => [
<add> 'type' => 'text',
<add> 'null' => true,
<add> ],
<add> 'expires' => [
<add> 'type' => 'integer',
<add> 'length' => 11,
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'attachments',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'comment_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'attachment' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'created' => 'datetime',
<add> 'updated' => 'datetime',
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'categories',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'parent_id' => [
<add> 'type' => 'integer',
<add> 'null' => false,
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> 'created' => 'datetime',
<add> 'updated' => 'datetime',
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'sections',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'title' => [
<add> 'type' => 'string',
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'counter_cache_user_category_posts',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'category_id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'user_id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'post_count' => [
<add> 'type' => 'integer',
<add> 'null' => true,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> ],
<add> ],
<add> ],
<add> ],
<add> [
<add> 'table' => 'site_tags',
<add> 'columns' => [
<add> 'id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'site_id' => [
<add> 'type' => 'integer',
<add> ],
<add> 'name' => [
<add> 'type' => 'string',
<add> 'null' => false,
<add> ],
<add> ],
<add> 'constraints' => [
<add> 'primary' => [
<add> 'type' => 'primary',
<add> 'columns' => [
<add> 'id',
<add> 'site_id',
<add> ],
<add> ],
<add> ],
<add> ],
<ide> ]; | 1 |
PHP | PHP | add deprecation warnings to i18n package | d5fcf2745d2dce1ad58fcf896d27a835233ec570 | <ide><path>src/I18n/FrozenTime.php
<ide> public function wasWithinLast($timeInterval)
<ide> {
<ide> $tmp = trim($timeInterval);
<ide> if (is_numeric($tmp)) {
<add> deprecationWarning(
<add> 'Passing int/numeric string into FrozenTime::wasWithinLast() is deprecated. ' .
<add> 'Pass strings including interval eg. "6 days"'
<add> );
<ide> $timeInterval = $tmp . ' days';
<ide> }
<ide>
<ide> public function isWithinNext($timeInterval)
<ide> {
<ide> $tmp = trim($timeInterval);
<ide> if (is_numeric($tmp)) {
<add> deprecationWarning(
<add> 'Passing int/numeric string into FrozenTime::isWithinNext() is deprecated. ' .
<add> 'Pass strings including interval eg. "6 days"'
<add> );
<ide> $timeInterval = $tmp . ' days';
<ide> }
<ide>
<ide><path>src/I18n/I18n.php
<ide> public static function translators()
<ide> */
<ide> public static function translator($name = 'default', $locale = null, callable $loader = null)
<ide> {
<add> deprecationWarning(
<add> 'I18n::translator() is deprecated. ' .
<add> 'Use I18n::setTranslator()/getTranslator() instead.'
<add> );
<ide> if ($loader !== null) {
<ide> static::setTranslator($name, $loader, $locale);
<ide>
<ide> public static function config($name, callable $loader)
<ide> */
<ide> public static function locale($locale = null)
<ide> {
<add> deprecationWarning(
<add> 'I18n::locale() is deprecated. ' .
<add> 'Use I18n::setLocale()/getLocale() instead.'
<add> );
<ide> if (!empty($locale)) {
<ide> static::setLocale($locale);
<ide>
<ide> public static function getLocale()
<ide> */
<ide> public static function defaultLocale()
<ide> {
<add> deprecationWarning('I18n::defaultLocale() is deprecated. Use I18n::getDefaultLocale() instead.');
<add>
<ide> return static::getDefaultLocale();
<ide> }
<ide>
<ide> public static function getDefaultLocale()
<ide> */
<ide> public static function defaultFormatter($name = null)
<ide> {
<add> deprecationWarning(
<add> 'I18n::defaultFormatter() is deprecated. ' .
<add> 'Use I18n::setDefaultFormatter()/getDefaultFormatter() instead.'
<add> );
<add>
<ide> return static::translators()->defaultFormatter($name);
<ide> }
<ide>
<ide><path>src/I18n/Time.php
<ide> public function wasWithinLast($timeInterval)
<ide> {
<ide> $tmp = trim($timeInterval);
<ide> if (is_numeric($tmp)) {
<add> deprecationWarning(
<add> 'Passing int/numeric string into Time::wasWithinLast() is deprecated. ' .
<add> 'Pass strings including interval eg. "6 days"'
<add> );
<ide> $timeInterval = $tmp . ' days';
<ide> }
<ide>
<ide> public function isWithinNext($timeInterval)
<ide> {
<ide> $tmp = trim($timeInterval);
<ide> if (is_numeric($tmp)) {
<add> deprecationWarning(
<add> 'Passing int/numeric string into Time::isWithinNext() is deprecated. ' .
<add> 'Pass strings including interval eg. "6 days"'
<add> );
<ide> $timeInterval = $tmp . ' days';
<ide> }
<ide>
<ide><path>src/View/Helper/TimeHelper.php
<ide> public function timeAgoInWords($dateTime, array $options = [])
<ide> *
<ide> * @param string|int $timeInterval the numeric value with space then time type.
<ide> * Example of valid types: 6 hours, 2 days, 1 minute.
<add> * Integer input values are deprecated and support will be removed in 4.0.0
<ide> * @param int|string|\DateTime $dateString UNIX timestamp, strtotime() valid string or DateTime object
<ide> * @param string|\DateTimeZone|null $timezone User's timezone string or DateTimeZone object
<ide> * @return bool
<ide> public function wasWithinLast($timeInterval, $dateString, $timezone = null)
<ide> *
<ide> * @param string|int $timeInterval the numeric value with space then time type.
<ide> * Example of valid types: 6 hours, 2 days, 1 minute.
<add> * Integer input values are deprecated and support will be removed in 4.0.0
<ide> * @param int|string|\DateTime $dateString UNIX timestamp, strtotime() valid string or DateTime object
<ide> * @param string|\DateTimeZone|null $timezone User's timezone string or DateTimeZone object
<ide> * @return bool
<ide><path>tests/TestCase/I18n/I18nTest.php
<ide> public function tearDown()
<ide> {
<ide> parent::tearDown();
<ide> I18n::clear();
<del> I18n::defaultFormatter('default');
<add> I18n::setDefaultFormatter('default');
<ide> I18n::setLocale($this->locale);
<ide> Plugin::unload();
<ide> Cache::clear(false, '_cake_core_');
<ide> public function tearDown()
<ide> /**
<ide> * Tests that the default locale is set correctly
<ide> *
<add> * @group deprecated
<ide> * @return void
<ide> */
<ide> public function testDefaultLocale()
<ide> {
<del> $newLocale = 'de_DE';
<del> I18n::setLocale($newLocale);
<del> $this->assertEquals($newLocale, I18n::getLocale());
<del> $this->assertEquals($this->locale, I18n::getDefaultLocale());
<add> $this->deprecated(function () {
<add> $newLocale = 'de_DE';
<add> I18n::setLocale($newLocale);
<add> $this->assertEquals($newLocale, I18n::getLocale());
<add> $this->assertEquals($this->locale, I18n::getDefaultLocale());
<add> });
<ide> }
<ide>
<ide> /**
<ide> public function testGetTranslatorLoadMoFile()
<ide> */
<ide> public function testPluralSelection()
<ide> {
<del> I18n::defaultFormatter('sprintf');
<add> I18n::setDefaultFormatter('sprintf');
<ide> $translator = I18n::getTranslator(); // en_US
<ide> $result = $translator->translate('%d = 0 or > 1', ['_count' => 1]);
<ide> $this->assertEquals('1 is 1 (po translated)', $result);
<ide> public function testGetTranslatorByDefaultLocale()
<ide> */
<ide> public function testBasicTranslateFunction()
<ide> {
<del> I18n::defaultFormatter('sprintf');
<add> I18n::setDefaultFormatter('sprintf');
<ide> $this->assertEquals('%d is 1 (po translated)', __('%d = 1'));
<ide> $this->assertEquals('1 is 1 (po translated)', __('%d = 1', 1));
<ide> $this->assertEquals('1 is 1 (po translated)', __('%d = 1', [1]));
<ide> public function testBasicTranslateFunctionsWithNullParam()
<ide> */
<ide> public function testBasicTranslateFunctionPluralData()
<ide> {
<del> I18n::defaultFormatter('sprintf');
<add> I18n::setDefaultFormatter('sprintf');
<ide> $this->assertEquals('%d is 1 (po translated)', __('%d = 0 or > 1'));
<ide> }
<ide>
<ide> public function testBasicTranslateFunctionPluralData()
<ide> */
<ide> public function testBasicTranslatePluralFunction()
<ide> {
<del> I18n::defaultFormatter('sprintf');
<add> I18n::setDefaultFormatter('sprintf');
<ide> $result = __n('singular msg', '%d = 0 or > 1', 1);
<ide> $this->assertEquals('1 is 1 (po translated)', $result);
<ide>
<ide> public function testBasicTranslatePluralFunction()
<ide> */
<ide> public function testBasicTranslatePluralFunctionSingularMessage()
<ide> {
<del> I18n::defaultFormatter('sprintf');
<add> I18n::setDefaultFormatter('sprintf');
<ide> $result = __n('No translation needed', 'not used', 1);
<ide> $this->assertEquals('No translation needed', $result);
<ide> }
<ide> public function testFallbackTranslatorWithFactory()
<ide> */
<ide> public function testEmptyTranslationString()
<ide> {
<del> I18n::defaultFormatter('sprintf');
<add> I18n::setDefaultFormatter('sprintf');
<ide> $result = __('No translation needed');
<ide> $this->assertEquals('No translation needed', $result);
<ide> }
<ide> public function testEmptyTranslationString()
<ide> */
<ide> public function testPluralTranslationsFromDomain()
<ide> {
<del> I18n::locale('de');
<add> I18n::setLocale('de');
<ide> $this->assertEquals('Standorte', __dn('wa', 'Location', 'Locations', 0));
<ide> $this->assertEquals('Standort', __dn('wa', 'Location', 'Locations', 1));
<ide> $this->assertEquals('Standorte', __dn('wa', 'Location', 'Locations', 2));
<ide><path>tests/TestCase/ORM/Behavior/TranslateBehaviorTest.php
<ide> class TranslateBehaviorTest extends TestCase
<ide> public function tearDown()
<ide> {
<ide> parent::tearDown();
<del> I18n::setLocale(I18n::defaultLocale());
<add> I18n::setLocale(I18n::getDefaultLocale());
<ide> TableRegistry::clear();
<ide> }
<ide>
<ide><path>tests/TestCase/View/Helper/TimeHelperTest.php
<ide> public function testWasWithinLast()
<ide> $this->assertTrue($this->Time->wasWithinLast('1 year', '-60 minutes -30 seconds'));
<ide> $this->assertTrue($this->Time->wasWithinLast('3 years', '-2 months'));
<ide> $this->assertTrue($this->Time->wasWithinLast('5 months', '-4 months'));
<add> }
<ide>
<del> $this->assertTrue($this->Time->wasWithinLast('5 ', '-3 days'));
<del> $this->assertTrue($this->Time->wasWithinLast('1 ', '-1 hour'));
<del> $this->assertTrue($this->Time->wasWithinLast('1 ', '-1 minute'));
<del> $this->assertTrue($this->Time->wasWithinLast('1 ', '-23 hours -59 minutes -59 seconds'));
<add> /**
<add> * test deprecated usage of wasWithinLast()
<add> *
<add> * @group deprecated
<add> * @return void
<add> */
<add> public function testWasWithinLastNumericString()
<add> {
<add> $this->deprecated(function () {
<add> $this->assertTrue($this->Time->wasWithinLast('5 ', '-3 days'));
<add> $this->assertTrue($this->Time->wasWithinLast('1 ', '-1 hour'));
<add> $this->assertTrue($this->Time->wasWithinLast('1 ', '-1 minute'));
<add> $this->assertTrue($this->Time->wasWithinLast('1 ', '-23 hours -59 minutes -59 seconds'));
<add> });
<ide> }
<ide>
<ide> /** | 7 |
Ruby | Ruby | use full name in whitelist | 2e74e50f822c9f8e74b418f83c2df2acee3a981c | <ide><path>Library/Homebrew/rubocops/conflicts.rb
<ide> class Conflicts < FormulaCop
<ide> "Use `keg_only :versioned_formula` instead."
<ide>
<ide> WHITELIST = %w[
<del> bash-completion@
<add> bash-completion@2
<ide> ].freeze
<ide>
<ide> def audit_formula(_node, _class_node, _parent_class_node, body)
<ide> return unless versioned_formula?
<ide>
<del> problem MSG if !@formula_name.start_with?(*WHITELIST) &&
<add> problem MSG if !WHITELIST.include?(@formula_name) &&
<ide> method_called_ever?(body, :conflicts_with)
<ide> end
<ide> end | 1 |
Javascript | Javascript | add router support for qp meta not being present | 100dc174af0931922379ec993a75a63b369e1f51 | <ide><path>packages/ember-routing/lib/system/router.js
<ide> import EmberLocation from '../location/api';
<ide> import {
<ide> routeArgs,
<ide> getActiveTargetName,
<del> stashParamNames,
<ide> calculateCacheKey
<ide> } from '../utils';
<ide> import RouterState from './router_state';
<ide> const EmberRouter = EmberObject.extend(Evented, {
<ide> this._pruneDefaultQueryParamValues(state.handlerInfos, queryParams);
<ide> },
<ide>
<add> /**
<add> Returns the meta information for the query params of a given route. This
<add> will be overriden to allow support for lazy routes.
<add>
<add> @private
<add> @method _getQPMeta
<add> @param {HandlerInfo} handlerInfo
<add> @return {Object}
<add> */
<add> _getQPMeta(handlerInfo) {
<add> let route = handlerInfo.handler;
<add> return route && get(route, '_qp');
<add> },
<add>
<ide> /**
<ide> Returns a merged query params meta object for a given set of handlerInfos.
<ide> Useful for knowing what query params are available for a given route hierarchy.
<ide> const EmberRouter = EmberObject.extend(Evented, {
<ide> return this._qpCache[leafRouteName];
<ide> }
<ide>
<add> let shouldCache = true;
<ide> let qpsByUrlKey = {};
<ide> let map = {};
<ide> let qps = [];
<del> this._qpCache[leafRouteName] = {
<del> map: map,
<del> qps: qps
<del> };
<ide>
<ide> for (let i = 0; i < handlerInfos.length; ++i) {
<del> let route = handlerInfos[i].handler;
<del> let qpMeta = get(route, '_qp');
<add> let qpMeta = this._getQPMeta(handlerInfos[i]);
<ide>
<del> if (!qpMeta) { continue; }
<add> if (!qpMeta) {
<add> shouldCache = false;
<add> continue;
<add> }
<ide>
<ide> // Loop over each QP to make sure we don't have any collisions by urlKey
<ide> for (let i = 0; i < qpMeta.qps.length; i++) {
<ide> const EmberRouter = EmberObject.extend(Evented, {
<ide> assign(map, qpMeta.map);
<ide> }
<ide>
<del> return {
<add> let finalQPMeta = {
<ide> qps: qps,
<ide> map: map
<ide> };
<add>
<add> if (shouldCache) {
<add> this._qpCache[leafRouteName] = finalQPMeta;
<add> }
<add>
<add> return finalQPMeta;
<ide> },
<ide>
<ide> /**
<ide> const EmberRouter = EmberObject.extend(Evented, {
<ide> _fullyScopeQueryParams(leafRouteName, contexts, queryParams) {
<ide> var state = calculatePostTransitionState(this, leafRouteName, contexts);
<ide> var handlerInfos = state.handlerInfos;
<del> stashParamNames(this, handlerInfos);
<ide>
<ide> for (var i = 0, len = handlerInfos.length; i < len; ++i) {
<del> var route = handlerInfos[i].handler;
<del> var qpMeta = get(route, '_qp');
<add> var qpMeta = this._getQPMeta(handlerInfos[i]);
<add>
<add> if (!qpMeta) { continue; }
<ide>
<ide> for (var j = 0, qpLen = qpMeta.qps.length; j < qpLen; ++j) {
<ide> var qp = qpMeta.qps[j];
<ide> const EmberRouter = EmberObject.extend(Evented, {
<ide> _hydrateUnsuppliedQueryParams(state, queryParams) {
<ide> let handlerInfos = state.handlerInfos;
<ide> let appCache = this._bucketCache;
<del> stashParamNames(this, handlerInfos);
<ide>
<ide> for (let i = 0; i < handlerInfos.length; ++i) {
<del> let route = handlerInfos[i].handler;
<del> let qpMeta = get(route, '_qp');
<add> let qpMeta = this._getQPMeta(handlerInfos[i]);
<add>
<add> if (!qpMeta) { continue; }
<ide>
<ide> for (let j = 0, qpLen = qpMeta.qps.length; j < qpLen; ++j) {
<ide> let qp = qpMeta.qps[j]; | 1 |
Ruby | Ruby | remove unused global define | b2ae884e27df98b05e19fa1fa04988d069bef4db | <ide><path>Library/Homebrew/brew.h.rb
<ide> FORMULA_META_FILES = %w[README README.md ChangeLog COPYING LICENSE LICENCE COPYRIGHT AUTHORS]
<ide> PLEASE_REPORT_BUG = "#{Tty.white}Please report this bug at #{Tty.em}http://github.com/mxcl/homebrew/issues#{Tty.reset}"
<del>HOMEBREW_RECOMMENDED_GCC = 5577
<ide>
<ide> def check_for_blacklisted_formula names
<ide> return if ARGV.force? | 1 |
Text | Text | improve issue templates | 062b5d41c1b615d12f6e33f8431111f84425287c | <ide><path>.github/ISSUE_TEMPLATE/Bug-Report.md
<ide> name: Bug Report
<ide> about: Is something wrong with Celery?
<ide> ---
<del>
<add><!--
<add>Please fill this template entirely and do not erase parts of it.
<add>We reserve the right to close without a response
<add>bug reports which are incomplete.
<add>-->
<ide> # Checklist
<add><!--
<add>To check an item on the list replace [ ] with [x].
<add>-->
<add>
<add>- [ ] I have read the relevant section in the
<add> [contribution guide](http://docs.celeryproject.org/en/latest/contributing.html#other-bugs)
<add> on reporting bugs.
<add>- [ ] I have checked the [issues list](https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22)
<add> for similar or identical bug reports.
<add>- [ ] I have checked the [pull requests list](https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22)
<add> for existing proposed fixes.
<add>- [ ] I have checked the [commit log](https://github.com/celery/celery/commits/master)
<add> to find out if the bug was already fixed in the master branch.
<add>- [ ] I have included all related issues and possible duplicate issues
<add> in this issue (If there are none, check this box anyway).
<add>
<add>## Mandatory Debugging Information
<ide>
<ide> - [ ] I have included the output of ``celery -A proj report`` in the issue.
<ide> (if you are not able to do this, then at least specify the Celery
<ide> version affected).
<del>- [ ] I have included all related issues and possible duplicate issues in this issue.
<del>- [ ] I have included the contents of ``pip freeze`` in the issue.
<ide> - [ ] I have verified that the issue exists against the `master` branch of Celery.
<del>- [ ] I have tried reproducing the issue on more than one message broker and/or result backend.
<add>- [ ] I have included the contents of ``pip freeze`` in the issue.
<add>- [ ] I have included all the versions of all the external dependencies required
<add> to reproduce this bug.
<add>
<add>## Optional Debugging Information
<add><!--
<add>Try some of the below if you think they are relevant.
<add>It will help us figure out the scope of the bug and how many users it affects.
<add>-->
<add>- [ ] I have tried reproducing the issue on more than one Python version
<add> and/or implementation.
<add>- [ ] I have tried reproducing the issue on more than one message broker and/or
<add> result backend.
<add>- [ ] I have tried reproducing the issue on more than one version of the message
<add> broker and/or result backend.
<add>- [ ] I have tried reproducing the issue on more than one operating system.
<ide> - [ ] I have tried reproducing the issue on more than one workers pool.
<del>- [ ] I have tried reproducing the issue with retries, ETA/Countdown & rate limits disabled.
<add>- [ ] I have tried reproducing the issue with autoscaling, retries,
<add> ETA/Countdown & rate limits disabled.
<add>- [ ] I have tried reproducing the issue after downgrading
<add> and/or upgrading Celery and its dependencies.
<ide>
<ide> ## Related Issues and Possible Duplicates
<ide> <!--
<del>Please make sure to search and mention any related issues or possible duplicates to this issue.
<add>Please make sure to search and mention any related issues
<add>or possible duplicates to this issue as requested by the checklist above.
<add>
<add>This may or may not include issues in other repositories that the Celery project
<add>maintains or other repositories that are dependencies of Celery.
<add>
<add>If you don't know how to mention issues, please refer to Github's documentation
<add>on the subject: https://help.github.com/en/articles/autolinked-references-and-urls#issues-and-pull-requests
<ide> -->
<ide>
<ide> #### Related Issues
<ide> Please make sure to search and mention any related issues or possible duplicates
<ide> ## Required Dependencies
<ide> <!-- Please fill the required dependencies to reproduce this issue -->
<ide> * **Minimal Python Version**: N/A or Unknown
<add>* **Minimal Celery Version**: N/A or Unknown
<add>* **Minimal Kombu Version**: N/A or Unknown
<ide> * **Minimal Broker Version**: N/A or Unknown
<ide> * **Minimal Result Backend Version**: N/A or Unknown
<ide> * **Minimal OS and/or Kernel Version**: N/A or Unknown
<ide> Refer to the Reporting Bugs section in our contribution guide.
<ide> We prefer submitting test cases in the form of a PR to our integration test suite.
<ide> If you can provide one, please mention the PR number below.
<ide> If not, please attach the most minimal code example required to reproduce the issue below.
<del>If there test case is too large, please include a link to a gist or a repository below.
<add>If the test case is too large, please include a link to a gist or a repository below.
<ide> -->
<ide>
<ide> <details>
<ide> If there test case is too large, please include a link to a gist or a repository
<ide> <!--
<ide> Describe in detail what actually happened.
<ide> Please include a backtrace and surround it with triple backticks (```).
<del>In addition, include the Celery daemon logs below.
<add>In addition, include the Celery daemon logs, the broker logs,
<add>the result backend logs and system logs below if they will help us debug
<add>the issue.
<ide> -->
<ide><path>.github/ISSUE_TEMPLATE/Documentation-Bug-Report.md
<ide> name: Documentation Bug Report
<ide> about: Is something wrong with our documentation?
<ide> ---
<add><!--
<add>Please fill this template entirely and do not erase parts of it.
<add>We reserve the right to close without a response
<add>bug reports which are incomplete.
<add>-->
<add># Checklist
<add><!--
<add>To check an item on the list replace [ ] with [x].
<add>-->
<add>
<add>- [ ] I have checked the [issues list](https://github.com/celery/celery/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22Category%3A+Documentation%22+)
<add> for similar or identical bug reports.
<add>- [ ] I have checked the [pull requests list](https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Category%3A+Documentation%22)
<add> for existing proposed fixes.
<add>- [ ] I have checked the [commit log](https://github.com/celery/celery/commits/master)
<add> to find out if the bug was already fixed in the master branch.
<add>- [ ] I have included all related issues and possible duplicate issues in this issue
<add> (If there are none, check this box anyway).
<add>
<add>## Related Issues and Possible Duplicates
<add><!--
<add>Please make sure to search and mention any related issues
<add>or possible duplicates to this issue as requested by the checklist above.
<add>
<add>This may or may not include issues in other repositories that the Celery project
<add>maintains or other repositories that are dependencies of Celery.
<add>
<add>If you don't know how to mention issues, please refer to Github's documentation
<add>on the subject: https://help.github.com/en/articles/autolinked-references-and-urls#issues-and-pull-requests
<add>-->
<add>
<add>#### Related Issues
<add>
<add>- None
<add>
<add>#### Possible Duplicates
<add>
<add>- None
<ide>
<ide> # Description
<ide> <!--
<ide> Please describe what's missing or incorrect about our documentation.
<del>Include links and or screenshots which will aid us to resolve the issue.
<add>Include links and/or screenshots which will aid us to resolve the issue.
<ide> -->
<add>
<ide> # Suggestions
<ide> <!-- Please provide us suggestions for how to fix the documentation -->
<ide><path>.github/ISSUE_TEMPLATE/Enhancement.md
<ide> name: Enhancement
<ide> about: Do you want to improve an existing feature?
<ide> ---
<del>
<add><!--
<add>Please fill this template entirely and do not erase parts of it.
<add>We reserve the right to close without a response
<add>enhancement requests which are incomplete.
<add>-->
<ide> # Checklist
<add><!--
<add>To check an item on the list replace [ ] with [x].
<add>-->
<add>
<add>- [ ] I have checked the [issues list](https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Enhancement%22+-label%3A%22Category%3A+Documentation%22)
<add> for similar or identical enhancement to an existing feature.
<add>- [ ] I have checked the [pull requests list](https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Issue+Type%3A+Enhancement%22+-label%3A%22Category%3A+Documentation%22)
<add> for existing proposed enhancements.
<add>- [ ] I have checked the [commit log](https://github.com/celery/celery/commits/master)
<add> to find out if the if the same enhancement was already implemented in the
<add> master branch.
<add>- [ ] I have included all related issues and possible duplicate issues in this issue
<add> (If there are none, check this box anyway).
<add>
<add>## Related Issues and Possible Duplicates
<add><!--
<add>Please make sure to search and mention any related issues
<add>or possible duplicates to this issue as requested by the checklist above.
<add>
<add>This may or may not include issues in other repositories that the Celery project
<add>maintains or other repositories that are dependencies of Celery.
<add>
<add>If you don't know how to mention issues, please refer to Github's documentation
<add>on the subject: https://help.github.com/en/articles/autolinked-references-and-urls#issues-and-pull-requests
<add>-->
<add>
<add>#### Related Issues
<add>
<add>- None
<add>
<add>#### Possible Duplicates
<ide>
<del>- [ ] I have checked the issues list for similar or identical enhancement to an existing feature.
<del>- [ ] I have checked the commit log to find out if a the same enhancement was already implemented in master.
<add>- None
<ide>
<ide> # Brief Summary
<ide> <!--
<ide><path>.github/ISSUE_TEMPLATE/Feature-Request.md
<ide> name: Feature Request
<ide> about: Do you need a new feature?
<ide> ---
<del>
<add><!--
<add>Please fill this template entirely and do not erase parts of it.
<add>We reserve the right to close without a response
<add>feature requests which are incomplete.
<add>-->
<ide> # Checklist
<add><!--
<add>To check an item on the list replace [ ] with [x].
<add>-->
<add>
<add>- [ ] I have checked the [issues list](https://github.com/celery/celery/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22Issue+Type%3A+Feature+Request%22+)
<add> for similar or identical feature requests.
<add>- [ ] I have checked the [pull requests list](https://github.com/celery/celery/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3A%22PR+Type%3A+Feature%22+)
<add> for existing proposed implementations of this feature.
<add>- [ ] I have checked the [commit log](https://github.com/celery/celery/commits/master)
<add> to find out if the if the same feature was already implemented in the
<add> master branch.
<add>- [ ] I have included all related issues and possible duplicate issues
<add> in this issue (If there are none, check this box anyway).
<add>
<add>## Related Issues and Possible Duplicates
<add><!--
<add>Please make sure to search and mention any related issues
<add>or possible duplicates to this issue as requested by the checklist above.
<add>
<add>This may or may not include issues in other repositories that the Celery project
<add>maintains or other repositories that are dependencies of Celery.
<add>
<add>If you don't know how to mention issues, please refer to Github's documentation
<add>on the subject: https://help.github.com/en/articles/autolinked-references-and-urls#issues-and-pull-requests
<add>-->
<add>
<add>#### Related Issues
<add>
<add>- None
<add>
<add>#### Possible Duplicates
<ide>
<del>- [ ] I have checked the issues list for similar or identical feature requests.
<del>- [ ] I have checked the commit log to find out if a feature was already implemented in master.
<add>- None
<ide>
<ide> # Brief Summary
<ide> <!--
<add><path>.github/PULL_REQUEST_TEMPLATE.md
<del><path>.github/PULL_REQUEST_TEMPLATE
<ide> guidelines](https://docs.celeryproject.org/en/master/contributing.html).
<ide>
<ide> ## Description
<ide>
<del>Please describe your pull request.
<add><!-- Please describe your pull request.
<ide>
<ide> NOTE: All patches should be made against master, not a maintenance branch like
<ide> 3.1, 2.5, etc. That is unless the bug is already fixed in master, but not in
<ide> that version series.
<ide>
<ide> If it fixes a bug or resolves a feature request,
<ide> be sure to link to that issue via (Fixes #4412) for example.
<add>--> | 5 |
Ruby | Ruby | pull ternary out of hash literal | c0c5298ae5cf12f4a058732072d55ba3a6a02d77 | <ide><path>Library/Contributions/cmd/brew-gist-logs.rb
<ide> def gist_logs f
<ide>
<ide> def load_logs name
<ide> logs = {}
<del> dir = (HOMEBREW_LOGS/name)
<add> dir = HOMEBREW_LOGS/name
<ide> dir.children.sort.each do |file|
<del> logs[file.basename.to_s] = {:content => (file.size == 0 ? "empty log" : file.read)}
<add> contents = file.size? ? file.read : "empty log"
<add> logs[file.basename.to_s] = { :content => contents }
<ide> end if dir.exist?
<ide> raise 'No logs.' if logs.empty?
<ide> logs | 1 |
Java | Java | add webclient create() and build() static methods | 123ee5f2dab22f1148272a9e1a852cd474b233a5 | <ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClientBuilder.java
<ide> class DefaultWebClientBuilder implements WebClient.Builder {
<ide> private MultiValueMap<String, String> defaultCookies;
<ide>
<ide>
<add> public DefaultWebClientBuilder() {
<add> this(new DefaultUriBuilderFactory());
<add> }
<add>
<ide> public DefaultWebClientBuilder(String baseUrl) {
<ide> this(new DefaultUriBuilderFactory(baseUrl));
<ide> }
<ide><path>spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java
<ide> public interface WebClient {
<ide>
<ide> // Static, factory methods
<ide>
<add> /**
<add> * Shortcut for:
<add> * <pre class="code">
<add> * WebClient client = builder().build();
<add> * </pre>
<add> */
<add> static WebClient create() {
<add> return new DefaultWebClientBuilder().build();
<add> }
<add>
<ide> /**
<ide> * Shortcut for:
<ide> * <pre class="code">
<ide> static WebClient create(String baseUrl) {
<ide> return new DefaultWebClientBuilder(baseUrl).build();
<ide> }
<ide>
<add> /**
<add> * Obtain a {@code WebClient} builder.
<add> */
<add> static WebClient.Builder builder() {
<add> return new DefaultWebClientBuilder();
<add> }
<add>
<ide> /**
<ide> * Obtain a {@code WebClient} builder with a base URI to be used as the
<ide> * base for expanding URI templates during exchanges. The given String | 2 |
Ruby | Ruby | fix relocation of frameworks | 6f5307fbd91670ac9395a4190a83e7d82211379d | <ide><path>Library/Homebrew/keg_relocate.rb
<ide> def fixed_name(file, bad_name)
<ide> "@loader_path/#{bad_name}"
<ide> elsif file.mach_o_executable? && (lib + bad_name).exist?
<ide> "#{lib}/#{bad_name}"
<del> elsif (abs_name = find_dylib(Pathname.new(bad_name).basename)) && abs_name.exist?
<add> elsif (abs_name = find_dylib(bad_name)) && abs_name.exist?
<ide> abs_name.to_s
<ide> else
<ide> opoo "Could not fix #{bad_name} in #{file}"
<ide> def dylib_id_for(file)
<ide> opt_record.join(relative_dirname, basename).to_s
<ide> end
<ide>
<del> def find_dylib(name)
<del> lib.find { |pn| break pn if pn.basename == name } if lib.directory?
<add> # Matches framework references like `XXX.framework/Versions/YYY/XXX` and
<add> # `XXX.framework/XXX`, both with or without a slash-delimited prefix.
<add> FRAMEWORK_RX = %r{(?:^|/)(([^/]+)\.framework/(?:Versions/[^/]+/)?\2)$}.freeze
<add>
<add> def find_dylib_suffix_from(bad_name)
<add> if (framework = bad_name.match(FRAMEWORK_RX))
<add> framework[1]
<add> else
<add> File.basename(bad_name)
<add> end
<add> end
<add>
<add> def find_dylib(bad_name)
<add> return unless lib.directory?
<add> suffix = "/#{find_dylib_suffix_from(bad_name)}"
<add> lib.find { |pn| break pn if pn.to_s.end_with?(suffix) }
<ide> end
<ide>
<ide> def mach_o_files | 1 |
PHP | PHP | add docblocks, shorten lines | 193f35b3f243b9444a789dc9835c56a4025bdc26 | <ide><path>src/View/Helper/UrlHelper.php
<ide> public function build($url = null, $full = false)
<ide> return h(Router::url($url, $full));
<ide> }
<ide>
<add> /**
<add> * Generate URL for given image file. Depending on options passed provides full URL
<add> * with domain name. Also calls Helper::assetTimestamp() to add timestamp to local files
<add> *
<add> * @param string|array $path Path string or URL array
<add> * @param array $options Options array. Possible keys:
<add> * `fullBase` Return full URL with domain name
<add> * `pathPrefix` Path prefix for relative URLs
<add> * `ext` Asset extension to append
<add> * `plugin` False value will prevent parsing path as a plugin
<add> * @return string Generated URL
<add> */
<ide> public function imageUrl($path, array $options = [])
<ide> {
<del> return $this->assetUrl($path, $options + ['pathPrefix' => Configure::read('App.imageBaseUrl')]);
<add> $pathPrefix = Configure::read('App.imageBaseUrl');
<add> return $this->assetUrl($path, $options + compact('pathPrefix'));
<ide> }
<ide>
<add> /**
<add> * Generate URL for given CSS file. Depending on options passed provides full URL
<add> * with domain name. Also calls Helper::assetTimestamp() to add timestamp to local files
<add> *
<add> * @param string|array $path Path string or URL array
<add> * @param array $options Options array. Possible keys:
<add> * `fullBase` Return full URL with domain name
<add> * `pathPrefix` Path prefix for relative URLs
<add> * `ext` Asset extension to append
<add> * `plugin` False value will prevent parsing path as a plugin
<add> * @return string Generated URL
<add> */
<ide> public function cssUrl($path, array $options = [])
<ide> {
<del> return $this->assetUrl($path, $options + ['pathPrefix' => Configure::read('App.cssBaseUrl'), 'ext' => '.css']);
<add> $pathPrefix = Configure::read('App.cssBaseUrl');
<add> $ext = '.css';
<add> return $this->assetUrl($path, $options + compact('pathPrefix', 'ext'));
<ide> }
<ide>
<add> /**
<add> * Generate URL for given javascript file. Depending on options passed provides full
<add> * URL with domain name. Also calls Helper::assetTimestamp() to add timestamp to local files
<add> *
<add> * @param string|array $path Path string or URL array
<add> * @param array $options Options array. Possible keys:
<add> * `fullBase` Return full URL with domain name
<add> * `pathPrefix` Path prefix for relative URLs
<add> * `ext` Asset extension to append
<add> * `plugin` False value will prevent parsing path as a plugin
<add> * @return string Generated URL
<add> */
<ide> public function scriptUrl($path, array $options = [])
<ide> {
<del> return $this->assetUrl($url, $options + ['pathPrefix' => Configure::read('App.jsBaseUrl'), 'ext' => '.js']);
<add> $pathPrefix = Configure::read('App.jsBaseUrl');
<add> $ext = '.js';
<add> return $this->assetUrl($path, $options + compact('pathPrefix', 'ext'));
<ide> }
<ide>
<ide> /** | 1 |
Text | Text | add a break between expected and actual | 641a721ff613951e3e9e11596838b16120b9842a | <ide><path>ISSUE_TEMPLATE.md
<ide> 3. [and so on...]
<ide>
<ide> **Expected:** [What you expected to happen]
<add>
<ide> **Actual:** [What actually happened]
<ide>
<ide> ### Versions | 1 |
Python | Python | add missing session.commit() and test | 423a382678deac5cb161d38e9266ce47b5666344 | <ide><path>airflow/models/skipmixin.py
<ide> def skip_all_except(
<ide> self._set_state_to_skipped(
<ide> dag_run, ti.execution_date, skip_tasks, session=session
<ide> )
<add> # For some reason, session.commit() needs to happen before xcom_push.
<add> # Otherwise the session is not committed.
<add> session.commit()
<ide> ti.xcom_push(
<ide> key=XCOM_SKIPMIXIN_KEY, value={XCOM_SKIPMIXIN_FOLLOWED: follow_task_ids}
<ide> )
<ide><path>tests/models/test_skipmixin.py
<ide> def test_skip_none_tasks(self):
<ide> SkipMixin().skip(dag_run=None, execution_date=None, tasks=[], session=session)
<ide> self.assertFalse(session.query.called)
<ide> self.assertFalse(session.commit.called)
<add>
<add> def test_skip_all_except(self):
<add> dag = DAG(
<add> 'dag_test_skip_all_except',
<add> start_date=DEFAULT_DATE,
<add> )
<add> with dag:
<add> task1 = DummyOperator(task_id='task1')
<add> task2 = DummyOperator(task_id='task2')
<add> task3 = DummyOperator(task_id='task3')
<add>
<add> task1 >> [task2, task3]
<add>
<add> ti1 = TI(task1, execution_date=DEFAULT_DATE)
<add> ti2 = TI(task2, execution_date=DEFAULT_DATE)
<add> ti3 = TI(task3, execution_date=DEFAULT_DATE)
<add>
<add> SkipMixin().skip_all_except(
<add> ti=ti1,
<add> branch_task_ids=['task2']
<add> )
<add>
<add> def get_state(ti):
<add> ti.refresh_from_db()
<add> return ti.state
<add>
<add> assert get_state(ti2) == State.NONE
<add> assert get_state(ti3) == State.SKIPPED | 2 |
Text | Text | note documentation license | 7ba19f76975228861dbf75c8dbe40d499e4a98db | <ide><path>README.md
<ide> Homebrew was originally created by [Max Howell](https://github.com/mxcl).
<ide>
<ide> ## License
<ide> Code is under the [BSD 2 Clause (NetBSD) license](https://github.com/Homebrew/homebrew/tree/master/LICENSE.txt).
<add>Documentation is under the [Creative Commons Attribution license](https://creativecommons.org/licenses/by/4.0/).
<ide>
<ide> ## Sponsors
<ide> Our CI infrastructure was paid for by [our Kickstarter supporters](https://github.com/Homebrew/homebrew/blob/master/SUPPORTERS.md). | 1 |
Javascript | Javascript | add header to example | b186709003954cb53d25d3371fed85480a0d5e2f | <ide><path>src/ng/compile.js
<ide> * }
<ide> * ```
<ide> *
<del> * Below is an example using `$compileProvider`.
<add> * ## Example
<ide> *
<ide> * <div class="alert alert-warning">
<ide> * **Note**: Typically directives are registered with `module.directive`. The example below is | 1 |
Javascript | Javascript | fix a little typo | 6a7b37ab68e6612cbda567aaef790cf9d0c75b59 | <ide><path>fonts.js
<ide> var Type1Parser = function() {
<ide> var index = parseInt(getToken());
<ide> var glyph = getToken();
<ide>
<del> if (!properties.differences[j]) {
<add> if (!properties.encoding[index]) {
<ide> var code = GlyphsUnicode[glyph];
<ide> properties.glyphs[glyph] = properties.encoding[index] = code;
<ide> } | 1 |
Javascript | Javascript | add $route.parent for setting parentscope | d7686a429c43fd031a0d39788973f726d74bdb33 | <ide><path>src/services.js
<ide> angularServiceInject('$route', function(location) {
<ide> */
<ide> onChange: bind(onChange, onChange.push),
<ide>
<add> /**
<add> * @workInProgress
<add> * @ngdoc method
<add> * @name angular.service.$route#parent
<add> * @methodOf angular.service.$route
<add> *
<add> * @param {Scope} [scope=rootScope] Scope to be used as parent for newly created
<add> * `$route.current.scope` scopes.
<add> *
<add> * @description
<add> * Sets a scope to be used as the parent scope for scopes created on route change. If not
<add> * set, defaults to the root scope.
<add> */
<add> parent: function(scope) {
<add> if (scope) parentScope = scope;
<add> },
<add>
<ide> /**
<ide> * @workInProgress
<ide> * @ngdoc method
<ide><path>test/servicesSpec.js
<ide> describe("service", function(){
<ide> expect($route.current.template).toBe('bar.html');
<ide> expect(onChangeSpy.callCount).toBe(1);
<ide> });
<add>
<add> it('should make parentScope configurable via parent()', function() {
<add> var scope = angular.scope(),
<add> parentScope = scope.$new(),
<add> $location = scope.$service('$location'),
<add> $route = scope.$service('$route');
<add>
<add> $route.parent(parentScope);
<add> $route.when('/foo', {template: 'foo.html'});
<add> $route.otherwise({template: '404.html'});
<add>
<add> scope.$eval();
<add>
<add> expect($route.current.template).toBe('404.html');
<add> expect($route.current.scope.$parent).toBe(parentScope);
<add>
<add> $location.updateHash('/foo');
<add> scope.$eval();
<add>
<add> expect($route.current.template).toBe('foo.html');
<add> expect($route.current.scope.$parent).toBe(parentScope);
<add> });
<ide> });
<ide>
<ide> | 2 |
Javascript | Javascript | make findcomponentroot faster with more nodecache | d96c6914c7ed4efdabea8edc11d0c8ba64acb42b | <ide><path>src/core/ReactInstanceHandles.js
<ide> function getFirstCommonAncestorID(oneID, twoID) {
<ide>
<ide> /**
<ide> * Traverses the parent path between two IDs (either up or down). The IDs must
<del> * not be the same, and there must exist a parent path between them.
<add> * not be the same, and there must exist a parent path between them. If the
<add> * callback returns `false`, traversal is stopped.
<ide> *
<ide> * @param {?string} start ID at which to start traversal.
<ide> * @param {?string} stop ID at which to end traversal.
<ide> function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {
<ide> var depth = 0;
<ide> var traverse = traverseUp ? getParentID : getNextDescendantID;
<ide> for (var id = start; /* until break */; id = traverse(id, stop)) {
<add> var ret;
<ide> if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) {
<del> cb(id, traverseUp, arg);
<add> ret = cb(id, traverseUp, arg);
<ide> }
<del> if (id === stop) {
<add> if (ret === false || id === stop) {
<ide> // Only break //after// visiting `stop`.
<ide> break;
<ide> }
<ide> var ReactInstanceHandles = {
<ide> }
<ide> },
<ide>
<add> /**
<add> * Traverse a node ID, calling the supplied `cb` for each ancestor ID. For
<add> * example, passing `.r[0].{row-0}.[1]` would result in `cb` getting called
<add> * with `.r[0]`, `.r[0].{row-0}`, and `.r[0].{row-0}.[1]`.
<add> *
<add> * NOTE: This traversal happens on IDs without touching the DOM.
<add> *
<add> * @param {string} targetID ID of the target node.
<add> * @param {function} cb Callback to invoke.
<add> * @param {*} arg Argument to invoke the callback with.
<add> * @internal
<add> */
<add> traverseAncestors: function(targetID, cb, arg) {
<add> traverseParentPath('', targetID, cb, arg, true, false);
<add> },
<add>
<ide> /**
<ide> * Exposed for unit testing.
<ide> * @private
<ide><path>src/core/ReactMount.js
<ide> function purgeID(id) {
<ide> delete nodeCache[id];
<ide> }
<ide>
<add>var deepestNodeSoFar = null;
<add>function findDeepestCachedAncestorImpl(ancestorID) {
<add> var ancestor = nodeCache[ancestorID];
<add> if (ancestor && isValid(ancestor, ancestorID)) {
<add> deepestNodeSoFar = ancestor;
<add> } else {
<add> // This node isn't populated in the cache, so presumably none of its
<add> // descendants are. Break out of the loop.
<add> return false;
<add> }
<add>}
<add>
<add>/**
<add> * Return the deepest cached node whose ID is a prefix of `targetID`.
<add> */
<add>function findDeepestCachedAncestor(targetID) {
<add> deepestNodeSoFar = null;
<add> ReactInstanceHandles.traverseAncestors(
<add> targetID,
<add> findDeepestCachedAncestorImpl
<add> );
<add>
<add> var foundNode = deepestNodeSoFar;
<add> deepestNodeSoFar = null;
<add> return foundNode;
<add>}
<add>
<ide> /**
<ide> * Mounting is the process of initializing a React component by creatings its
<ide> * representative DOM elements and inserting them into a supplied `container`.
<ide> var ReactMount = {
<ide> },
<ide>
<ide> /**
<del> * Finds a node with the supplied `id` inside of the supplied `ancestorNode`.
<del> * Exploits the ID naming scheme to perform the search quickly.
<add> * Finds a node with the supplied `targetID` inside of the supplied
<add> * `ancestorNode`. Exploits the ID naming scheme to perform the search
<add> * quickly.
<ide> *
<ide> * @param {DOMEventTarget} ancestorNode Search from this root.
<del> * @pararm {string} id ID of the DOM representation of the component.
<del> * @return {DOMEventTarget} DOM node with the supplied `id`.
<add> * @pararm {string} targetID ID of the DOM representation of the component.
<add> * @return {DOMEventTarget} DOM node with the supplied `targetID`.
<ide> * @internal
<ide> */
<del> findComponentRoot: function(ancestorNode, id) {
<add> findComponentRoot: function(ancestorNode, targetID) {
<ide> var firstChildren = findComponentRootReusableArray;
<ide> var childIndex = 0;
<ide>
<del> firstChildren[0] = ancestorNode.firstChild;
<add> var deepestAncestor = findDeepestCachedAncestor(targetID) || ancestorNode;
<add>
<add> firstChildren[0] = deepestAncestor.firstChild;
<ide> firstChildren.length = 1;
<ide>
<ide> while (childIndex < firstChildren.length) {
<ide> var child = firstChildren[childIndex++];
<add> var targetChild;
<add>
<ide> while (child) {
<ide> var childID = ReactMount.getID(child);
<ide> if (childID) {
<del> if (id === childID) {
<del> // Emptying firstChildren/findComponentRootReusableArray is
<del> // not necessary for correctness, but it helps the GC reclaim
<del> // any nodes that were left at the end of the search.
<del> firstChildren.length = 0;
<del>
<del> return child;
<del> }
<del>
<del> if (ReactInstanceHandles.isAncestorIDOf(childID, id)) {
<add> // Even if we find the node we're looking for, we finish looping
<add> // through its siblings to ensure they're cached so that we don't have
<add> // to revisit this node again. Otherwise, we make n^2 calls to getID
<add> // when visiting the many children of a single node in order.
<add>
<add> if (targetID === childID) {
<add> targetChild = child;
<add> } else if (ReactInstanceHandles.isAncestorIDOf(childID, targetID)) {
<ide> // If we find a child whose ID is an ancestor of the given ID,
<ide> // then we can be sure that we only want to search the subtree
<ide> // rooted at this child, so we can throw out the rest of the
<ide> // search state.
<ide> firstChildren.length = childIndex = 0;
<ide> firstChildren.push(child.firstChild);
<del>
<del> // Ignore the rest of this child's siblings and immediately
<del> // continue the outer loop with child.firstChild as child.
<del> break;
<ide> }
<ide>
<ide> } else {
<ide> var ReactMount = {
<ide>
<ide> child = child.nextSibling;
<ide> }
<add>
<add> if (targetChild) {
<add> // Emptying firstChildren/findComponentRootReusableArray is
<add> // not necessary for correctness, but it helps the GC reclaim
<add> // any nodes that were left at the end of the search.
<add> firstChildren.length = 0;
<add>
<add> return targetChild;
<add> }
<ide> }
<ide>
<ide> firstChildren.length = 0;
<ide> var ReactMount = {
<ide> 'findComponentRoot(..., %s): Unable to find element. This probably ' +
<ide> 'means the DOM was unexpectedly mutated (e.g., by the browser). ' +
<ide> 'Try inspecting the child nodes of the element with React ID `%s`.',
<del> id,
<add> targetID,
<ide> ReactMount.getID(ancestorNode)
<ide> );
<ide> }, | 2 |
Go | Go | remove sysinitpath, lxc leftover | 1b726b29b21bbc1aebfe0f6b71dfd61145bdd6af | <ide><path>daemon/daemon.go
<ide> func (c *contStore) List() []*Container {
<ide> type Daemon struct {
<ide> ID string
<ide> repository string
<del> sysInitPath string
<ide> containers *contStore
<ide> execCommands *exec.Store
<ide> tagStore tag.Store
<ide> func NewDaemon(config *Config, registryService *registry.Service) (daemon *Daemo
<ide>
<ide> d.containerGraphDB = graph
<ide>
<del> var sysInitPath string
<del>
<ide> sysInfo := sysinfo.New(false)
<ide> // Check if Devices cgroup is mounted, it is hard requirement for container security,
<ide> // on Linux/FreeBSD.
<ide> if runtime.GOOS != "windows" && !sysInfo.CgroupDevicesEnabled {
<ide> return nil, fmt.Errorf("Devices cgroup isn't mounted")
<ide> }
<ide>
<del> ed, err := execdrivers.NewDriver(config.ExecOptions, config.ExecRoot, config.Root, sysInitPath, sysInfo)
<add> ed, err := execdrivers.NewDriver(config.ExecOptions, config.ExecRoot, config.Root, sysInfo)
<ide> if err != nil {
<ide> return nil, err
<ide> }
<ide> func NewDaemon(config *Config, registryService *registry.Service) (daemon *Daemo
<ide> d.trustKey = trustKey
<ide> d.idIndex = truncindex.NewTruncIndex([]string{})
<ide> d.configStore = config
<del> d.sysInitPath = sysInitPath
<ide> d.execDriver = ed
<ide> d.statsCollector = d.newStatsCollector(1 * time.Second)
<ide> d.defaultLogConfig = config.LogConfig
<ide> func (daemon *Daemon) config() *Config {
<ide> return daemon.configStore
<ide> }
<ide>
<del>func (daemon *Daemon) systemInitPath() string {
<del> return daemon.sysInitPath
<del>}
<del>
<ide> // GraphDriver returns the currently used driver for processing
<ide> // container layers.
<ide> func (daemon *Daemon) GraphDriver() graphdriver.Driver {
<ide><path>daemon/execdriver/execdrivers/execdrivers_freebsd.go
<ide> import (
<ide> )
<ide>
<ide> // NewDriver returns a new execdriver.Driver from the given name configured with the provided options.
<del>func NewDriver(options []string, root, libPath, initPath string, sysInfo *sysinfo.SysInfo) (execdriver.Driver, error) {
<add>func NewDriver(options []string, root, libPath string, sysInfo *sysinfo.SysInfo) (execdriver.Driver, error) {
<ide> return nil, fmt.Errorf("jail driver not yet supported on FreeBSD")
<ide> }
<ide><path>daemon/execdriver/execdrivers/execdrivers_linux.go
<ide> import (
<ide> )
<ide>
<ide> // NewDriver returns a new execdriver.Driver from the given name configured with the provided options.
<del>func NewDriver(options []string, root, libPath, initPath string, sysInfo *sysinfo.SysInfo) (execdriver.Driver, error) {
<del> return native.NewDriver(path.Join(root, "execdriver", "native"), initPath, options)
<add>func NewDriver(options []string, root, libPath string, sysInfo *sysinfo.SysInfo) (execdriver.Driver, error) {
<add> return native.NewDriver(path.Join(root, "execdriver", "native"), options)
<ide> }
<ide><path>daemon/execdriver/execdrivers/execdrivers_windows.go
<ide> import (
<ide> )
<ide>
<ide> // NewDriver returns a new execdriver.Driver from the given name configured with the provided options.
<del>func NewDriver(options []string, root, libPath, initPath string, sysInfo *sysinfo.SysInfo) (execdriver.Driver, error) {
<del> return windows.NewDriver(root, initPath, options)
<add>func NewDriver(options []string, root, libPath string, sysInfo *sysinfo.SysInfo) (execdriver.Driver, error) {
<add> return windows.NewDriver(root, options)
<ide> }
<ide><path>daemon/execdriver/native/driver.go
<ide> const (
<ide> // it implements execdriver.Driver.
<ide> type Driver struct {
<ide> root string
<del> initPath string
<ide> activeContainers map[string]libcontainer.Container
<ide> machineMemory int64
<ide> factory libcontainer.Factory
<ide> sync.Mutex
<ide> }
<ide>
<ide> // NewDriver returns a new native driver, called from NewDriver of execdriver.
<del>func NewDriver(root, initPath string, options []string) (*Driver, error) {
<add>func NewDriver(root string, options []string) (*Driver, error) {
<ide> meminfo, err := sysinfo.ReadMemInfo()
<ide> if err != nil {
<ide> return nil, err
<ide> func NewDriver(root, initPath string, options []string) (*Driver, error) {
<ide>
<ide> return &Driver{
<ide> root: root,
<del> initPath: initPath,
<ide> activeContainers: make(map[string]libcontainer.Container),
<ide> machineMemory: meminfo.MemTotal,
<ide> factory: f,
<ide><path>daemon/execdriver/windows/windows.go
<ide> type activeContainer struct {
<ide> // it implements execdriver.Driver
<ide> type Driver struct {
<ide> root string
<del> initPath string
<ide> activeContainers map[string]*activeContainer
<ide> sync.Mutex
<ide> }
<ide> func (d *Driver) Name() string {
<ide> }
<ide>
<ide> // NewDriver returns a new windows driver, called from NewDriver of execdriver.
<del>func NewDriver(root, initPath string, options []string) (*Driver, error) {
<add>func NewDriver(root string, options []string) (*Driver, error) {
<ide>
<ide> for _, option := range options {
<ide> key, val, err := parsers.ParseKeyValueOpt(option)
<ide> func NewDriver(root, initPath string, options []string) (*Driver, error) {
<ide>
<ide> return &Driver{
<ide> root: root,
<del> initPath: initPath,
<ide> activeContainers: make(map[string]*activeContainer),
<ide> }, nil
<ide> }
<ide><path>daemon/info.go
<ide> func (daemon *Daemon) SystemInfo() (*types.Info, error) {
<ide> // that's more intuitive (the copied path is trivial to derive
<ide> // by hand given VERSION)
<ide> initPath := utils.DockerInitPath("")
<del> if initPath == "" {
<del> // if that fails, we'll just return the path from the daemon
<del> initPath = daemon.systemInitPath()
<del> }
<del>
<ide> sysInfo := sysinfo.New(true)
<ide>
<ide> v := &types.Info{ | 7 |
Go | Go | add err check before getting term | 73bf9b5c195170b3d71f86b285ac12e50d26ef51 | <ide><path>daemon/execdriver/lxc/driver.go
<ide> func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
<ide> dataPath = d.containerDir(c.ID)
<ide> )
<ide>
<add> container, err := d.createContainer(c)
<add> if err != nil {
<add> return execdriver.ExitStatus{ExitCode: -1}, err
<add> }
<add>
<ide> if c.ProcessConfig.Tty {
<ide> term, err = NewTtyConsole(&c.ProcessConfig, pipes)
<ide> } else {
<ide> term, err = execdriver.NewStdConsole(&c.ProcessConfig, pipes)
<ide> }
<del> c.ProcessConfig.Terminal = term
<del> container, err := d.createContainer(c)
<ide> if err != nil {
<ide> return execdriver.ExitStatus{ExitCode: -1}, err
<ide> }
<add> c.ProcessConfig.Terminal = term
<add>
<ide> d.Lock()
<ide> d.activeContainers[c.ID] = &activeContainer{
<ide> container: container, | 1 |
Python | Python | fix print styling | 1c4df1b20f8a2eda361277c3313c5963962cf7ab | <ide><path>autoencoder/AdditiveGaussianNoiseAutoencoderRunner.py
<ide> def get_random_block_from_data(data, batch_size):
<ide>
<ide> # Display logs per epoch step
<ide> if epoch % display_step == 0:
<del> print("Epoch: ", '%d,' % (epoch + 1),
<del> "Cost: ", "{:.9f}".format(avg_cost))
<add> print("Epoch:", '%d,' % (epoch + 1),
<add> "Cost:", "{:.9f}".format(avg_cost))
<ide>
<ide> print("Total cost: " + str(autoencoder.calc_total_cost(X_test))) | 1 |
Text | Text | remove errors that were never released | bf772896fe3621e6b2324c7dd610dfbd79f63ab9 | <ide><path>doc/api/errors.md
<ide> removed: v10.0.0
<ide> Used when an attempt is made to use a `zlib` object after it has already been
<ide> closed.
<ide>
<del>### Other error codes
<del>
<del>These errors have never been released, but had been present on master between
<del>releases.
<del>
<del><a id="ERR_ENTRY_TYPE_MISMATCH"></a>
<del>#### `ERR_ENTRY_TYPE_MISMATCH`
<del>
<del>The `--entry-type=commonjs` flag was used to attempt to execute an `.mjs` file
<del>or a `.js` file where the nearest parent `package.json` contains
<del>`"type": "module"`; or
<del>the `--entry-type=module` flag was used to attempt to execute a `.cjs` file or
<del>a `.js` file where the nearest parent `package.json` either lacks a `"type"`
<del>field or contains `"type": "commonjs"`.
<del>
<del><a id="ERR_FS_WATCHER_ALREADY_STARTED"></a>
<del>#### `ERR_FS_WATCHER_ALREADY_STARTED`
<del>
<del>An attempt was made to start a watcher returned by `fs.watch()` that has
<del>already been started.
<del>
<del><a id="ERR_FS_WATCHER_NOT_STARTED"></a>
<del>#### `ERR_FS_WATCHER_NOT_STARTED`
<del>
<del>An attempt was made to initiate operations on a watcher returned by
<del>`fs.watch()` that has not yet been started.
<del>
<del><a id="ERR_HTTP2_ALREADY_SHUTDOWN"></a>
<del>#### `ERR_HTTP2_ALREADY_SHUTDOWN`
<del>
<del>Occurs with multiple attempts to shutdown an HTTP/2 session.
<del>
<del><a id="ERR_HTTP2_ERROR"></a>
<del>#### `ERR_HTTP2_ERROR`
<del>
<del>A non-specific HTTP/2 error has occurred.
<del>
<del><a id="ERR_INVALID_REPL_HISTORY"></a>
<del>#### `ERR_INVALID_REPL_HISTORY`
<del>
<del>Used in the `repl` in case the old history file is used and an error occurred
<del>while trying to read and parse it.
<del>
<del><a id="ERR_INVALID_REPL_TYPE"></a>
<del>#### `ERR_INVALID_REPL_TYPE`
<del>
<del>The `--entry-type=...` flag is not compatible with the Node.js REPL.
<del>
<del><a id="ERR_STREAM_HAS_STRINGDECODER"></a>
<del>#### `ERR_STREAM_HAS_STRINGDECODER`
<del>
<del>Used to prevent an abort if a string decoder was set on the Socket.
<del>
<del>```js
<del>const Socket = require('net').Socket;
<del>const instance = new Socket();
<del>
<del>instance.setEncoding('utf8');
<del>```
<del>
<del><a id="ERR_STRING_TOO_LARGE"></a>
<del>#### `ERR_STRING_TOO_LARGE`
<del>
<del>An attempt has been made to create a string larger than the maximum allowed
<del>size.
<del>
<del><a id="ERR_TTY_WRITABLE_NOT_READABLE"></a>
<del>#### `ERR_TTY_WRITABLE_NOT_READABLE`
<del>
<del>This `Error` is thrown when a read is attempted on a TTY `WriteStream`,
<del>such as `process.stdout.on('data')`.
<del>
<ide> [`'uncaughtException'`]: process.html#process_event_uncaughtexception
<ide> [`--disable-proto=throw`]: cli.html#cli_disable_proto_mode
<ide> [`--force-fips`]: cli.html#cli_force_fips | 1 |
Text | Text | add language to further elaborate on frameworks | 1a12a567a09ef3d477fea9532b9ac28d510d3163 | <ide><path>guide/english/css/index.md
<ide> and `yellow` is the style we want to give it.
<ide> We use the `<style>` and `</style>` tags to define the CSS in the HTML file.
<ide>
<ide> ### Popular CSS Frameworks 2018
<del>Frameworks exist to make the more complex parts of css easier and more efficient for developers to build out websites.
<add>Frameworks exist to make the more complex parts of css easier and more efficient for developers to build out websites. They also allow the developer to have more flexibility as well as additional features to produce amazing results.
<ide> Some of the most popular CSS Frameworks are:
<ide> Bootstrap, Foundation, Bulma, uikit, Semantic UI, mini.css, Materialize, Material Design Lite, Spectre and Kube.
<ide> | 1 |
PHP | PHP | remove test for deleted command | 33903c2c96d8d0ebdb58b77330d300e8fc522d3c | <ide><path>tests/TestCase/Command/CompletionCommandTest.php
<ide> public function testCommands()
<ide> 'routes',
<ide> 'schema_cache',
<ide> 'server',
<del> 'upgrade',
<ide> 'version',
<ide> 'abort',
<ide> 'auto_load_model', | 1 |
PHP | PHP | use path for group directly | 3e661aa9f54f2a4dc643464bea452367b3406499 | <ide><path>app/Providers/RouteServiceProvider.php
<ide> protected function mapWebRoutes()
<ide> {
<ide> Route::middleware('web')
<ide> ->namespace($this->namespace)
<del> ->group(function ($router) {
<del> require base_path('routes/web.php');
<del> });
<add> ->group(base_path('routes/web.php'));
<ide> }
<ide>
<ide> /**
<ide> protected function mapApiRoutes()
<ide> Route::prefix('api')
<ide> ->middleware('api')
<ide> ->namespace($this->namespace)
<del> ->group(function ($router) {
<del> require base_path('routes/api.php');
<del> });
<add> ->group(base_path('routes/api.php'));
<ide> }
<ide> } | 1 |
Javascript | Javascript | handle long files reading in fs.promises | 11819c7773d123efb8db836aefc73bde8c5f431a | <ide><path>lib/fs/promises.js
<ide> async function readFileHandle(filehandle, options) {
<ide>
<ide> const chunks = [];
<ide> const chunkSize = Math.min(size, 16384);
<del> const buf = Buffer.alloc(chunkSize);
<ide> let totalRead = 0;
<add> let endOfFile = false;
<ide> do {
<add> const buf = Buffer.alloc(chunkSize);
<ide> const { bytesRead, buffer } =
<del> await read(filehandle, buf, 0, buf.length);
<del> totalRead = bytesRead;
<del> if (totalRead > 0)
<del> chunks.push(buffer.slice(0, totalRead));
<del> } while (totalRead === chunkSize);
<add> await read(filehandle, buf, 0, chunkSize, totalRead);
<add> totalRead += bytesRead;
<add> endOfFile = bytesRead !== chunkSize;
<add> if (bytesRead > 0)
<add> chunks.push(buffer.slice(0, bytesRead));
<add> } while (!endOfFile);
<ide>
<ide> const result = Buffer.concat(chunks);
<ide> if (options.encoding) {
<ide><path>test/parallel/test-fs-promises-readfile.js
<add>'use strict';
<add>
<add>const common = require('../common');
<add>
<add>const assert = require('assert');
<add>const path = require('path');
<add>const { writeFile, readFile } = require('fs/promises');
<add>const tmpdir = require('../common/tmpdir');
<add>tmpdir.refresh();
<add>
<add>const fn = path.join(tmpdir.path, 'large-file');
<add>
<add>common.crashOnUnhandledRejection();
<add>
<add>// Creating large buffer with random content
<add>const buffer = Buffer.from(
<add> Array.apply(null, { length: 16834 * 2 })
<add> .map(Math.random)
<add> .map((number) => (number * (1 << 8)))
<add>);
<add>
<add>// Writing buffer to a file then try to read it
<add>writeFile(fn, buffer)
<add> .then(() => readFile(fn))
<add> .then((readBuffer) => {
<add> assert.strictEqual(readBuffer.equals(buffer), true);
<add> })
<add> .then(common.mustCall()); | 2 |
Text | Text | clarify operation of napi_cancel_async_work | 1b28022de0556350ed75137e0d94446441ea5544 | <ide><path>doc/api/n-api.md
<ide> NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,
<ide>
<ide> Returns `napi_ok` if the API succeeded.
<ide>
<del>This API cancels a previously allocated work, provided
<del>it has not yet been queued for execution. After this function is called
<add>This API cancels queued work if it has not yet
<add>been started. If it has already started executing, it cannot be
<add>cancelled and `napi_generic_failure` will be returned. If successful,
<ide> the `complete` callback will be invoked with a status value of
<ide> `napi_cancelled`. The work should not be deleted before the `complete`
<del>callback invocation, even when it was cancelled.
<add>callback invocation, even if it has been successfully cancelled.
<ide>
<ide>
<ide> [Aynchronous Operations]: #n_api_asynchronous_operations | 1 |
Javascript | Javascript | change fixtures.readsync to fixtures.readkey | 84bb35b4f041684f57140efe40316861e29be41c | <ide><path>test/parallel/test-tls-getprotocol.js
<ide> const clientConfigs = [
<ide>
<ide> const serverConfig = {
<ide> secureProtocol: 'TLS_method',
<del> key: fixtures.readSync('/keys/agent2-key.pem'),
<del> cert: fixtures.readSync('/keys/agent2-cert.pem')
<add> key: fixtures.readKey('agent2-key.pem'),
<add> cert: fixtures.readKey('agent2-cert.pem')
<ide> };
<ide>
<ide> const server = tls.createServer(serverConfig, common.mustCall(function() {
<ide><path>test/parallel/test-tls-keylog-tlsv13.js
<ide> const tls = require('tls');
<ide> const fixtures = require('../common/fixtures');
<ide>
<ide> const server = tls.createServer({
<del> key: fixtures.readSync('/keys/agent2-key.pem'),
<del> cert: fixtures.readSync('/keys/agent2-cert.pem'),
<add> key: fixtures.readKey('agent2-key.pem'),
<add> cert: fixtures.readKey('agent2-cert.pem'),
<ide> // Amount of keylog events depends on negotiated protocol
<ide> // version, so force a specific one:
<ide> minVersion: 'TLSv1.3', | 2 |
Ruby | Ruby | remove mocha from actionpack tests | 81bc771e7cccb8a43f067a89f721f83798e63483 | <ide><path>actionpack/test/abstract_unit.rb
<ide> def jruby_skip(message = '')
<ide> skip message if defined?(JRUBY_VERSION)
<ide> end
<ide>
<del>require 'mocha/setup' # FIXME: stop using mocha
<ide> require 'active_support/testing/method_call_assertions'
<ide>
<ide> class ForkingExecutor
<ide><path>actionpack/test/controller/caching_test.rb
<ide> def setup
<ide> def test_output_buffer
<ide> output_buffer = ActionView::OutputBuffer.new
<ide> controller = MockController.new
<del> cache_helper = Object.new
<add> cache_helper = Class.new do
<add> def self.controller; end;
<add> def self.output_buffer; end;
<add> def self.output_buffer=; end;
<add> end
<ide> cache_helper.extend(ActionView::Helpers::CacheHelper)
<del> cache_helper.expects(:controller).returns(controller).at_least(0)
<del> cache_helper.expects(:output_buffer).returns(output_buffer).at_least(0)
<del> # if the output_buffer is changed, the new one should be html_safe and of the same type
<del> cache_helper.expects(:output_buffer=).with(responds_with(:html_safe?, true)).with(instance_of(output_buffer.class)).at_least(0)
<ide>
<del> assert_nothing_raised do
<del> cache_helper.send :fragment_for, 'Test fragment name', 'Test fragment', &Proc.new{ nil }
<add> cache_helper.stub :controller, controller do
<add> cache_helper.stub :output_buffer, output_buffer do
<add> assert_called_with cache_helper, :output_buffer=, [output_buffer.class.new(output_buffer)] do
<add> assert_nothing_raised do
<add> cache_helper.send :fragment_for, 'Test fragment name', 'Test fragment', &Proc.new{ nil }
<add> end
<add> end
<add> end
<ide> end
<ide> end
<ide>
<ide> def test_safe_buffer
<ide> output_buffer = ActiveSupport::SafeBuffer.new
<ide> controller = MockController.new
<del> cache_helper = Object.new
<add> cache_helper = Class.new do
<add> def self.controller; end;
<add> def self.output_buffer; end;
<add> def self.output_buffer=; end;
<add> end
<ide> cache_helper.extend(ActionView::Helpers::CacheHelper)
<del> cache_helper.expects(:controller).returns(controller).at_least(0)
<del> cache_helper.expects(:output_buffer).returns(output_buffer).at_least(0)
<del> # if the output_buffer is changed, the new one should be html_safe and of the same type
<del> cache_helper.expects(:output_buffer=).with(responds_with(:html_safe?, true)).with(instance_of(output_buffer.class)).at_least(0)
<ide>
<del> assert_nothing_raised do
<del> cache_helper.send :fragment_for, 'Test fragment name', 'Test fragment', &Proc.new{ nil }
<add> cache_helper.stub :controller, controller do
<add> cache_helper.stub :output_buffer, output_buffer do
<add> assert_called_with cache_helper, :output_buffer=, [output_buffer.class.new(output_buffer)] do
<add> assert_nothing_raised do
<add> cache_helper.send :fragment_for, 'Test fragment name', 'Test fragment', &Proc.new{ nil }
<add> end
<add> end
<add> end
<ide> end
<ide> end
<ide> end
<ide><path>actionpack/test/controller/params_wrapper_test.rb
<ide> def parse
<ide> end
<ide> end
<ide>
<del> class User; end
<del> class Person; end
<add> class User
<add> def self.attribute_names
<add> []
<add> end
<add> end
<add>
<add> class Person
<add> def self.attribute_names
<add> []
<add> end
<add> end
<ide>
<ide> tests UsersController
<ide>
<ide> def test_nested_params
<ide> end
<ide>
<ide> def test_derived_wrapped_keys_from_matching_model
<del> User.expects(:respond_to?).with(:attribute_names).returns(true)
<del> User.expects(:attribute_names).twice.returns(["username"])
<del>
<del> with_default_wrapper_options do
<del> @request.env['CONTENT_TYPE'] = 'application/json'
<del> post :parse, params: { 'username' => 'sikachu', 'title' => 'Developer' }
<del> assert_parameters({ 'username' => 'sikachu', 'title' => 'Developer', 'user' => { 'username' => 'sikachu' }})
<add> assert_called(User, :attribute_names, times: 2, returns: ["username"]) do
<add> with_default_wrapper_options do
<add> @request.env['CONTENT_TYPE'] = 'application/json'
<add> post :parse, params: { 'username' => 'sikachu', 'title' => 'Developer' }
<add> assert_parameters({ 'username' => 'sikachu', 'title' => 'Developer', 'user' => { 'username' => 'sikachu' }})
<add> end
<ide> end
<ide> end
<ide>
<ide> def test_derived_wrapped_keys_from_specified_model
<ide> with_default_wrapper_options do
<del> Person.expects(:respond_to?).with(:attribute_names).returns(true)
<del> Person.expects(:attribute_names).twice.returns(["username"])
<add> assert_called(Person, :attribute_names, times: 2, returns: ["username"]) do
<add> UsersController.wrap_parameters Person
<ide>
<del> UsersController.wrap_parameters Person
<del>
<del> @request.env['CONTENT_TYPE'] = 'application/json'
<del> post :parse, params: { 'username' => 'sikachu', 'title' => 'Developer' }
<del> assert_parameters({ 'username' => 'sikachu', 'title' => 'Developer', 'person' => { 'username' => 'sikachu' }})
<add> @request.env['CONTENT_TYPE'] = 'application/json'
<add> post :parse, params: { 'username' => 'sikachu', 'title' => 'Developer' }
<add> assert_parameters({ 'username' => 'sikachu', 'title' => 'Developer', 'person' => { 'username' => 'sikachu' }})
<add> end
<ide> end
<ide> end
<ide>
<ide> def test_not_wrapping_abstract_model
<del> User.expects(:respond_to?).with(:attribute_names).returns(true)
<del> User.expects(:attribute_names).returns([])
<del>
<ide> with_default_wrapper_options do
<ide> @request.env['CONTENT_TYPE'] = 'application/json'
<ide> post :parse, params: { 'username' => 'sikachu', 'title' => 'Developer' }
<ide><path>actionpack/test/controller/request_forgery_protection_test.rb
<ide> def test_should_only_allow_cross_origin_js_get_without_xhr_header_if_protection_
<ide> end
<ide>
<ide> def test_should_not_raise_error_if_token_is_not_a_string
<del> @controller.unstub(:valid_authenticity_token?)
<ide> assert_blocked do
<ide> patch :index, params: { custom_authenticity_token: { foo: 'bar' } }
<ide> end
<ide><path>actionpack/test/controller/rescue_test.rb
<ide> def test_rescue_handler_string
<ide> end
<ide>
<ide> def test_rescue_handler_with_argument
<del> @controller.expects(:show_errors).once.with { |e| e.is_a?(Exception) }
<del> get :record_invalid
<add> assert_called_with @controller, :show_errors, [Exception] do
<add> get :record_invalid
<add> end
<ide> end
<add>
<ide> def test_rescue_handler_with_argument_as_string
<del> @controller.expects(:show_errors).once.with { |e| e.is_a?(Exception) }
<del> get :record_invalid_raise_as_string
<add> assert_called_with @controller, :show_errors, [Exception] do
<add> get :record_invalid_raise_as_string
<add> end
<ide> end
<ide>
<ide> def test_proc_rescue_handler
<ide><path>actionpack/test/dispatch/debug_exceptions_test.rb
<ide> def call(env)
<ide>
<ide> test 'uses backtrace cleaner from env' do
<ide> @app = DevelopmentApp
<del> cleaner = stub(:clean => ['passed backtrace cleaner'])
<del> get "/", headers: { 'action_dispatch.show_exceptions' => true, 'action_dispatch.backtrace_cleaner' => cleaner }
<del> assert_match(/passed backtrace cleaner/, body)
<add> backtrace_cleaner = ActiveSupport::BacktraceCleaner.new
<add>
<add> backtrace_cleaner.stub :clean, ['passed backtrace cleaner'] do
<add> get "/", headers: { 'action_dispatch.show_exceptions' => true, 'action_dispatch.backtrace_cleaner' => backtrace_cleaner }
<add> assert_match(/passed backtrace cleaner/, body)
<add> end
<ide> end
<ide>
<ide> test 'logs exception backtrace when all lines silenced' do
<ide><path>actionpack/test/dispatch/exception_wrapper_test.rb
<ide> def backtrace
<ide> exception = TestError.new("lib/file.rb:42:in `index'")
<ide> wrapper = ExceptionWrapper.new(nil, exception)
<ide>
<del> wrapper.expects(:source_fragment).with('lib/file.rb', 42).returns('foo')
<del>
<del> assert_equal [ code: 'foo', line_number: 42 ], wrapper.source_extracts
<add> assert_called_with(wrapper, :source_fragment, ['lib/file.rb', 42], returns: 'foo') do
<add> assert_equal [ code: 'foo', line_number: 42 ], wrapper.source_extracts
<add> end
<ide> end
<ide>
<ide> test '#source_extracts works with Windows paths' do
<ide> exc = TestError.new("c:/path/to/rails/app/controller.rb:27:in 'index':")
<ide>
<ide> wrapper = ExceptionWrapper.new(nil, exc)
<del> wrapper.expects(:source_fragment).with('c:/path/to/rails/app/controller.rb', 27).returns('nothing')
<ide>
<del> assert_equal [ code: 'nothing', line_number: 27 ], wrapper.source_extracts
<add> assert_called_with(wrapper, :source_fragment, ['c:/path/to/rails/app/controller.rb', 27], returns: 'nothing') do
<add> assert_equal [ code: 'nothing', line_number: 27 ], wrapper.source_extracts
<add> end
<ide> end
<ide>
<ide> test '#source_extracts works with non standard backtrace' do
<ide> exc = TestError.new('invalid')
<ide>
<ide> wrapper = ExceptionWrapper.new(nil, exc)
<del> wrapper.expects(:source_fragment).with('invalid', 0).returns('nothing')
<ide>
<del> assert_equal [ code: 'nothing', line_number: 0 ], wrapper.source_extracts
<add> assert_called_with(wrapper, :source_fragment, ['invalid', 0], returns: 'nothing') do
<add> assert_equal [ code: 'nothing', line_number: 0 ], wrapper.source_extracts
<add> end
<ide> end
<ide>
<ide> test '#application_trace returns traces only from the application' do
<ide><path>actionpack/test/dispatch/request_test.rb
<ide> class RequestMethod < BaseRequestTest
<ide> class RequestFormat < BaseRequestTest
<ide> test "xml format" do
<ide> request = stub_request
<del> request.expects(:parameters).at_least_once.returns({ :format => 'xml' })
<del> assert_equal Mime::XML, request.format
<add> assert_called(request, :parameters, times: 2, returns: {format: :xml}) do
<add> assert_equal Mime::XML, request.format
<add> end
<ide> end
<ide>
<ide> test "xhtml format" do
<ide> request = stub_request
<del> request.expects(:parameters).at_least_once.returns({ :format => 'xhtml' })
<del> assert_equal Mime::HTML, request.format
<add> assert_called(request, :parameters, times: 2, returns: {format: :xhtml}) do
<add> assert_equal Mime::HTML, request.format
<add> end
<ide> end
<ide>
<ide> test "txt format" do
<ide> request = stub_request
<del> request.expects(:parameters).at_least_once.returns({ :format => 'txt' })
<del> assert_equal Mime::TEXT, request.format
<add> assert_called(request, :parameters, times: 2, returns: {format: :txt}) do
<add> assert_equal Mime::TEXT, request.format
<add> end
<ide> end
<ide>
<ide> test "XMLHttpRequest" do
<ide> request = stub_request(
<ide> 'HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest',
<ide> 'HTTP_ACCEPT' => [Mime::JS, Mime::HTML, Mime::XML, "text/xml", Mime::ALL].join(",")
<ide> )
<del> request.expects(:parameters).at_least_once.returns({})
<del> assert request.xhr?
<del> assert_equal Mime::JS, request.format
<add>
<add> assert_called(request, :parameters, times: 1, returns: {}) do
<add> assert request.xhr?
<add> assert_equal Mime::JS, request.format
<add> end
<ide> end
<ide>
<ide> test "can override format with parameter negative" do
<ide> request = stub_request
<del> request.expects(:parameters).at_least_once.returns({ :format => :txt })
<del> assert !request.format.xml?
<add> assert_called(request, :parameters, times: 2, returns: {format: :txt}) do
<add> assert !request.format.xml?
<add> end
<ide> end
<ide>
<ide> test "can override format with parameter positive" do
<ide> request = stub_request
<del> request.expects(:parameters).at_least_once.returns({ :format => :xml })
<del> assert request.format.xml?
<add> assert_called(request, :parameters, times: 2, returns: {format: :xml}) do
<add> assert request.format.xml?
<add> end
<ide> end
<ide>
<ide> test "formats text/html with accept header" do
<ide> class RequestFormat < BaseRequestTest
<ide>
<ide> test "formats format:text with accept header" do
<ide> request = stub_request
<del> request.expects(:parameters).at_least_once.returns({ :format => :txt })
<del> assert_equal [Mime::TEXT], request.formats
<add> assert_called(request, :parameters, times: 2, returns: {format: :txt}) do
<add> assert_equal [Mime::TEXT], request.formats
<add> end
<ide> end
<ide>
<ide> test "formats format:unknown with accept header" do
<ide> request = stub_request
<del> request.expects(:parameters).at_least_once.returns({ :format => :unknown })
<del> assert_instance_of Mime::NullType, request.format
<add> assert_called(request, :parameters, times: 2, returns: {format: :unknown}) do
<add> assert_instance_of Mime::NullType, request.format
<add> end
<ide> end
<ide>
<ide> test "format is not nil with unknown format" do
<ide> request = stub_request
<del> request.expects(:parameters).at_least_once.returns({ format: :hello })
<del> assert request.format.nil?
<del> assert_not request.format.html?
<del> assert_not request.format.xml?
<del> assert_not request.format.json?
<add> assert_called(request, :parameters, times: 2, returns: {format: :hello}) do
<add> assert request.format.nil?
<add> assert_not request.format.html?
<add> assert_not request.format.xml?
<add> assert_not request.format.json?
<add> end
<ide> end
<ide>
<ide> test "format does not throw exceptions when malformed parameters" do
<ide> class RequestFormat < BaseRequestTest
<ide>
<ide> test "formats with xhr request" do
<ide> request = stub_request 'HTTP_X_REQUESTED_WITH' => "XMLHttpRequest"
<del> request.expects(:parameters).at_least_once.returns({})
<del> assert_equal [Mime::JS], request.formats
<add> assert_called(request, :parameters, times: 1, returns: {}) do
<add> assert_equal [Mime::JS], request.formats
<add> end
<ide> end
<ide>
<ide> test "ignore_accept_header" do
<ide> class RequestFormat < BaseRequestTest
<ide>
<ide> begin
<ide> request = stub_request 'HTTP_ACCEPT' => 'application/xml'
<del> request.expects(:parameters).at_least_once.returns({})
<del> assert_equal [ Mime::HTML ], request.formats
<add> assert_called(request, :parameters, times: 1, returns: {}) do
<add> assert_equal [ Mime::HTML ], request.formats
<add> end
<ide>
<ide> request = stub_request 'HTTP_ACCEPT' => 'koz-asked/something-crazy'
<del> request.expects(:parameters).at_least_once.returns({})
<del> assert_equal [ Mime::HTML ], request.formats
<add> assert_called(request, :parameters, times: 1, returns: {}) do
<add> assert_equal [ Mime::HTML ], request.formats
<add> end
<ide>
<ide> request = stub_request 'HTTP_ACCEPT' => '*/*;q=0.1'
<del> request.expects(:parameters).at_least_once.returns({})
<del> assert_equal [ Mime::HTML ], request.formats
<add> assert_called(request, :parameters, times: 1, returns: {}) do
<add> assert_equal [ Mime::HTML ], request.formats
<add> end
<ide>
<ide> request = stub_request 'HTTP_ACCEPT' => 'application/jxw'
<del> request.expects(:parameters).at_least_once.returns({})
<del> assert_equal [ Mime::HTML ], request.formats
<add> assert_called(request, :parameters, times: 1, returns: {}) do
<add> assert_equal [ Mime::HTML ], request.formats
<add> end
<ide>
<ide> request = stub_request 'HTTP_ACCEPT' => 'application/xml',
<ide> 'HTTP_X_REQUESTED_WITH' => "XMLHttpRequest"
<del> request.expects(:parameters).at_least_once.returns({})
<del> assert_equal [ Mime::JS ], request.formats
<add>
<add> assert_called(request, :parameters, times: 1, returns: {}) do
<add> assert_equal [ Mime::JS ], request.formats
<add> end
<ide>
<ide> request = stub_request 'HTTP_ACCEPT' => 'application/xml',
<ide> 'HTTP_X_REQUESTED_WITH' => "XMLHttpRequest"
<del> request.expects(:parameters).at_least_once.returns({:format => :json})
<del> assert_equal [ Mime::JSON ], request.formats
<add> assert_called(request, :parameters, times: 2, returns: {format: :json}) do
<add> assert_equal [ Mime::JSON ], request.formats
<add> end
<ide> ensure
<ide> ActionDispatch::Request.ignore_accept_header = old_ignore_accept_header
<ide> end
<ide> class RequestMimeType < BaseRequestTest
<ide> class RequestParameters < BaseRequestTest
<ide> test "parameters" do
<ide> request = stub_request
<del> request.expects(:request_parameters).at_least_once.returns({ "foo" => 1 })
<del> request.expects(:query_parameters).at_least_once.returns({ "bar" => 2 })
<ide>
<del> assert_equal({"foo" => 1, "bar" => 2}, request.parameters)
<del> assert_equal({"foo" => 1}, request.request_parameters)
<del> assert_equal({"bar" => 2}, request.query_parameters)
<add> assert_called(request, :request_parameters, times: 2, returns: {"foo" => 1}) do
<add> assert_called(request, :query_parameters, times: 2, returns: {"bar" => 2}) do
<add> assert_equal({"foo" => 1, "bar" => 2}, request.parameters)
<add> assert_equal({"foo" => 1}, request.request_parameters)
<add> assert_equal({"bar" => 2}, request.query_parameters)
<add> end
<add> end
<ide> end
<ide>
<ide> test "parameters not accessible after rack parse error" do | 8 |
Ruby | Ruby | add headless browser support in api docs [ci skip] | 72aca5231f8492b17e0185e4d98b3c7c6d179497 | <ide><path>actionpack/lib/action_dispatch/system_test_case.rb
<ide> module ActionDispatch
<ide> # size of the browser screen. These two options are not applicable for
<ide> # headless drivers and will be silently ignored if passed.
<ide> #
<add> # Headless browsers such as headless Chrome and headless Firefox are also supported.
<add> # You can use these browsers by setting the +:using+ argument to +:headless_chrome+ or +:headless_firefox+.
<add> #
<ide> # To use a headless driver, like Poltergeist, update your Gemfile to use
<ide> # Poltergeist instead of Selenium and then declare the driver name in the
<ide> # +application_system_test_case.rb+ file. In this case, you would leave out | 1 |
PHP | PHP | allow skipping for expired views | 7355d0193f34c4514aeb5499528d91396a307a09 | <ide><path>src/Illuminate/View/Engines/CompilerEngine.php
<ide> class CompilerEngine extends PhpEngine
<ide> */
<ide> protected $lastCompiled = [];
<ide>
<add> /**
<add> * Flag to check expired views.
<add> *
<add> * @var bool
<add> */
<add> protected $checkExpiredViews;
<add>
<ide> /**
<ide> * Create a new Blade view engine instance.
<ide> *
<ide> * @param \Illuminate\View\Compilers\CompilerInterface $compiler
<add> * @param bool $checkExpiredViews
<ide> * @return void
<ide> */
<del> public function __construct(CompilerInterface $compiler)
<add> public function __construct(CompilerInterface $compiler, $checkExpiredViews = true)
<ide> {
<ide> $this->compiler = $compiler;
<add> $this->checkExpiredViews = $checkExpiredViews;
<ide> }
<ide>
<ide> /**
<ide> public function get($path, array $data = [])
<ide> // If this given view has expired, which means it has simply been edited since
<ide> // it was last compiled, we will re-compile the views so we can evaluate a
<ide> // fresh copy of the view. We'll pass the compiler the path of the view.
<del> if ($this->compiler->isExpired($path)) {
<add> if ($this->checkExpiredViews && $this->compiler->isExpired($path)) {
<ide> $this->compiler->compile($path);
<ide> }
<ide>
<ide><path>src/Illuminate/View/ViewServiceProvider.php
<ide> public function registerPhpEngine($resolver)
<ide> public function registerBladeEngine($resolver)
<ide> {
<ide> $resolver->register('blade', function () {
<del> return new CompilerEngine($this->app['blade.compiler']);
<add> return new CompilerEngine($this->app['blade.compiler'], $this->app['config']['view.check_compiled']);
<ide> });
<ide> }
<ide> }
<ide><path>tests/View/ViewCompilerEngineTest.php
<ide> public function testViewsAreNotRecompiledIfTheyAreNotExpired()
<ide> ', $results);
<ide> }
<ide>
<del> protected function getEngine()
<add> public function testViewsAreNotRecompiledIfWeDoNotWantThemRecompiled()
<ide> {
<del> return new CompilerEngine(m::mock(CompilerInterface::class));
<add> $engine = $this->getEngine(false);
<add> $engine->getCompiler()->shouldReceive('getCompiledPath')->with(__DIR__.'/fixtures/foo.php')->andReturn(__DIR__.'/fixtures/basic.php');
<add> $engine->getCompiler()->shouldReceive('isExpired')->never();
<add> $engine->getCompiler()->shouldReceive('compile')->never();
<add> $results = $engine->get(__DIR__.'/fixtures/foo.php');
<add>
<add> $this->assertSame('Hello World
<add>', $results);
<add> }
<add>
<add> protected function getEngine($checkExpiredViews = true)
<add> {
<add> return new CompilerEngine(m::mock(CompilerInterface::class), $checkExpiredViews);
<ide> }
<ide> } | 3 |
Go | Go | fix certificate directory for registry | 831b00303f1979dda6ed66980fc32a65f9229768 | <ide><path>registry/config.go
<ide> type Options struct {
<ide> InsecureRegistries opts.ListOpts
<ide> }
<ide>
<add>const (
<add> // DefaultNamespace is the default namespace
<add> DefaultNamespace = "docker.io"
<add> // DefaultRegistryVersionHeader is the name of the default HTTP header
<add> // that carries Registry version info
<add> DefaultRegistryVersionHeader = "Docker-Distribution-Api-Version"
<add> // DefaultV1Registry is the URI of the default v1 registry
<add> DefaultV1Registry = "https://index.docker.io"
<add>
<add> // IndexServer is the v1 registry server used for user auth + account creation
<add> IndexServer = DefaultV1Registry + "/v1/"
<add> // IndexName is the name of the index
<add> IndexName = "docker.io"
<add>
<add> // NotaryServer is the endpoint serving the Notary trust server
<add> NotaryServer = "https://notary.docker.io"
<add>
<add> // IndexServer = "https://registry-stage.hub.docker.com/v1/"
<add>)
<add>
<ide> var (
<ide> // ErrInvalidRepositoryName is an error returned if the repository name did
<ide> // not have the correct form
<ide><path>registry/config_unix.go
<add>// +build !windows
<add>
<add>package registry
<add>
<add>const (
<add> // DefaultV2Registry is the URI of the default v2 registry
<add> DefaultV2Registry = "https://registry-1.docker.io"
<add>
<add> // CertsDir is the directory where certificates are stored
<add> CertsDir = "/etc/docker/certs.d"
<add>)
<add>
<add>// cleanPath is used to ensure that a directory name is valid on the target
<add>// platform. It will be passed in something *similar* to a URL such as
<add>// https:/index.docker.io/v1. Not all platforms support directory names
<add>// which contain those characters (such as : on Windows)
<add>func cleanPath(s string) string {
<add> return s
<add>}
<ide><path>registry/config_windows.go
<add>package registry
<add>
<add>import (
<add> "os"
<add> "path/filepath"
<add> "strings"
<add>)
<add>
<add>// DefaultV2Registry is the URI of the default (official) v2 registry.
<add>// This is the windows-specific endpoint.
<add>//
<add>// Currently it is a TEMPORARY link that allows Microsoft to continue
<add>// development of Docker Engine for Windows.
<add>const DefaultV2Registry = "https://ms-tp3.registry-1.docker.io"
<add>
<add>// CertsDir is the directory where certificates are stored
<add>var CertsDir = os.Getenv("programdata") + `\docker\certs.d`
<add>
<add>// cleanPath is used to ensure that a directory name is valid on the target
<add>// platform. It will be passed in something *similar* to a URL such as
<add>// https:\index.docker.io\v1. Not all platforms support directory names
<add>// which contain those characters (such as : on Windows)
<add>func cleanPath(s string) string {
<add> return filepath.FromSlash(strings.Replace(s, ":", "", -1))
<add>}
<ide><path>registry/consts.go
<del>package registry
<del>
<del>const (
<del> // DefaultNamespace is the default namespace
<del> DefaultNamespace = "docker.io"
<del> // DefaultRegistryVersionHeader is the name of the default HTTP header
<del> // that carries Registry version info
<del> DefaultRegistryVersionHeader = "Docker-Distribution-Api-Version"
<del> // DefaultV1Registry is the URI of the default v1 registry
<del> DefaultV1Registry = "https://index.docker.io"
<del>
<del> // CertsDir is the directory where certificates are stored
<del> CertsDir = "/etc/docker/certs.d"
<del>
<del> // IndexServer is the v1 registry server used for user auth + account creation
<del> IndexServer = DefaultV1Registry + "/v1/"
<del> // IndexName is the name of the index
<del> IndexName = "docker.io"
<del>
<del> // NotaryServer is the endpoint serving the Notary trust server
<del> NotaryServer = "https://notary.docker.io"
<del>
<del> // IndexServer = "https://registry-stage.hub.docker.com/v1/"
<del>)
<ide><path>registry/consts_unix.go
<del>// +build !windows
<del>
<del>package registry
<del>
<del>// DefaultV2Registry is the URI of the default v2 registry
<del>const DefaultV2Registry = "https://registry-1.docker.io"
<ide><path>registry/consts_windows.go
<del>// +build windows
<del>
<del>package registry
<del>
<del>// DefaultV2Registry is the URI of the default (official) v2 registry.
<del>// This is the windows-specific endpoint.
<del>//
<del>// Currently it is a TEMPORARY link that allows Microsoft to continue
<del>// development of Docker Engine for Windows.
<del>const DefaultV2Registry = "https://ms-tp3.registry-1.docker.io"
<ide><path>registry/registry.go
<ide> func newTLSConfig(hostname string, isSecure bool) (*tls.Config, error) {
<ide> tlsConfig.InsecureSkipVerify = !isSecure
<ide>
<ide> if isSecure {
<del> hostDir := filepath.Join(CertsDir, hostname)
<add> hostDir := filepath.Join(CertsDir, cleanPath(hostname))
<ide> logrus.Debugf("hostDir: %s", hostDir)
<ide> if err := ReadCertsDirectory(&tlsConfig, hostDir); err != nil {
<ide> return nil, err | 7 |
PHP | PHP | fix generation of datetime control | b413224e50a4ea68f55ca20d6a47d4a15dfe032f | <ide><path>src/View/Helper/FormHelper.php
<ide> public function dateTime(string $fieldName, array $options = []): string
<ide> 'value' => null,
<ide> ];
<ide> $options = $this->_initInputField($fieldName, $options);
<add> $options['type'] = 'datetime-local';
<ide>
<ide> return $this->widget('datetime', $options);
<ide> }
<ide><path>tests/TestCase/View/Helper/FormHelperTest.php
<ide> use Cake\Form\Form;
<ide> use Cake\Http\ServerRequest;
<ide> use Cake\I18n\Date;
<add>use Cake\I18n\FrozenTime;
<ide> use Cake\ORM\Entity;
<ide> use Cake\ORM\Table;
<ide> use Cake\Routing\Router;
<ide> public function testControlHidden()
<ide> */
<ide> public function testControlDatetime()
<ide> {
<del> $this->Form = $this->getMockBuilder('Cake\View\Helper\FormHelper')
<del> ->setMethods(['datetime'])
<del> ->setConstructorArgs([new View()])
<del> ->getMock();
<del> $this->Form->expects($this->once())->method('datetime')
<del> ->with('prueba', [
<del> 'type' => 'datetime',
<del> 'timeFormat' => 24,
<del> 'minYear' => 2008,
<del> 'maxYear' => 2011,
<del> 'interval' => 15,
<del> 'options' => null,
<del> 'empty' => false,
<del> 'id' => 'prueba',
<del> 'required' => false,
<del> 'templateVars' => [],
<del> ])
<del> ->will($this->returnValue('This is it!'));
<ide> $result = $this->Form->control('prueba', [
<del> 'type' => 'datetime', 'timeFormat' => 24, 'minYear' => 2008,
<del> 'maxYear' => 2011, 'interval' => 15,
<add> 'type' => 'datetime',
<add> 'value' => new FrozenTime('2019-09-27 02:52:43'),
<ide> ]);
<ide> $expected = [
<ide> 'div' => ['class' => 'input datetime'],
<ide> '<label',
<ide> 'Prueba',
<ide> '/label',
<del> 'This is it!',
<add> 'input' => ['name' => 'prueba', 'id' => 'prueba', 'type' => 'datetime-local', 'value' => '2019-09-27T02:52:43'],
<ide> '/div',
<ide> ];
<ide> $this->assertHtml($expected, $result);
<ide> public function testControlDatetime()
<ide> */
<ide> public function testControlDatetimeIdPrefix()
<ide> {
<del> $this->Form = $this->getMockBuilder('Cake\View\Helper\FormHelper')
<del> ->setMethods(['datetime'])
<del> ->setConstructorArgs([new View()])
<del> ->getMock();
<del>
<ide> $this->Form->create(null, ['idPrefix' => 'prefix']);
<ide>
<del> $this->Form->expects($this->once())->method('datetime')
<del> ->with('prueba', [
<del> 'type' => 'datetime',
<del> 'timeFormat' => 24,
<del> 'minYear' => 2008,
<del> 'maxYear' => 2011,
<del> 'interval' => 15,
<del> 'options' => null,
<del> 'empty' => false,
<del> 'id' => 'prefix-prueba',
<del> 'required' => false,
<del> 'templateVars' => [],
<del> ])
<del> ->will($this->returnValue('This is it!'));
<ide> $result = $this->Form->control('prueba', [
<del> 'type' => 'datetime', 'timeFormat' => 24, 'minYear' => 2008,
<del> 'maxYear' => 2011, 'interval' => 15,
<add> 'type' => 'datetime',
<ide> ]);
<ide> $expected = [
<ide> 'div' => ['class' => 'input datetime'],
<ide> '<label',
<ide> 'Prueba',
<ide> '/label',
<del> 'This is it!',
<add> 'input' => ['name' => 'prueba', 'id' => 'prefix-prueba', 'type' => 'datetime-local', 'value' => ''],
<ide> '/div',
<ide> ];
<ide> $this->assertHtml($expected, $result); | 2 |
Python | Python | add validation for fields & exclude type | d68c61450440a522b08b64fdd21028cc739e6ead | <ide><path>rest_framework/serializers.py
<ide> def get_fields(self):
<ide> depth = getattr(self.Meta, 'depth', 0)
<ide> extra_kwargs = getattr(self.Meta, 'extra_kwargs', {})
<ide>
<add> if fields and not isinstance(fields, (list, tuple)):
<add> raise TypeError('`fields` must be a list or tuple')
<add>
<add> if exclude and not isinstance(exclude, (list, tuple)):
<add> raise TypeError('`exclude` must be a list or tuple')
<add>
<ide> assert not (fields and exclude), "Cannot set both 'fields' and 'exclude'."
<ide>
<ide> extra_kwargs = self._include_additional_options(extra_kwargs)
<ide><path>tests/test_serializer_metaclass.py
<add>from django.test import TestCase
<add>from rest_framework import serializers
<add>from .models import BasicModel
<add>
<add>
<add>class TestSerializerMetaClass(TestCase):
<add> def setUp(self):
<add> class FieldsSerializer(serializers.ModelSerializer):
<add> text = serializers.CharField()
<add>
<add> class Meta:
<add> model = BasicModel
<add> fields = ('text')
<add>
<add> class ExcludeSerializer(serializers.ModelSerializer):
<add> text = serializers.CharField()
<add>
<add> class Meta:
<add> model = BasicModel
<add> exclude = ('text')
<add>
<add> class FieldsAndExcludeSerializer(serializers.ModelSerializer):
<add> text = serializers.CharField()
<add>
<add> class Meta:
<add> model = BasicModel
<add> fields = ('text',)
<add> exclude = ('text',)
<add>
<add> self.fields_serializer = FieldsSerializer
<add> self.exclude_serializer = ExcludeSerializer
<add> self.faeSerializer = FieldsAndExcludeSerializer
<add>
<add> def test_meta_class_fields(self):
<add> object = BasicModel(text="Hello World.")
<add> serializer = self.fields_serializer(instance=object)
<add>
<add> with self.assertRaises(TypeError) as result:
<add> serializer.data
<add>
<add> exception = result.exception
<add> self.assertEqual(str(exception), "`fields` must be a list or tuple")
<add>
<add> def test_meta_class_exclude(self):
<add> object = BasicModel(text="Hello World.")
<add> serializer = self.exclude_serializer(instance=object)
<add>
<add> with self.assertRaises(TypeError) as result:
<add> serializer.data
<add>
<add> exception = result.exception
<add> self.assertEqual(str(exception), "`exclude` must be a list or tuple")
<add>
<add> def test_meta_class_fields_and_exclude(self):
<add> object = BasicModel(text="Hello World.")
<add> serializer = self.faeSerializer(instance=object)
<add>
<add> with self.assertRaises(AssertionError) as result:
<add> serializer.data
<add>
<add> exception = result.exception
<add> self.assertEqual(str(exception), "Cannot set both 'fields' and 'exclude'.") | 2 |
Javascript | Javascript | use null assignment instead of deleting property | 0397223ab4a050f4acffeee6952660710327f2a0 | <ide><path>lib/events.js
<ide> EventEmitter.prototype.removeListener = function(type, listener) {
<ide> if (position < 0) return this;
<ide> list.splice(position, 1);
<ide> if (list.length == 0)
<del> delete this._events[type];
<add> this._events[type] = null;
<ide>
<ide> if (this._events.removeListener) {
<ide> this.emit('removeListener', type, listener);
<ide> }
<ide> } else if (list === listener ||
<ide> (list.listener && list.listener === listener))
<ide> {
<del> delete this._events[type];
<add> this._events[type] = null;
<ide>
<ide> if (this._events.removeListener) {
<ide> this.emit('removeListener', type, listener); | 1 |
Go | Go | produce duplicate cache keys on pull | bb68c8132b593cb2fd633f2cb1c8761243c0b120 | <ide><path>builder/builder-next/adapters/containerimage/pull.go
<ide> import (
<ide> "github.com/moby/buildkit/util/progress"
<ide> "github.com/moby/buildkit/util/tracing"
<ide> digest "github.com/opencontainers/go-digest"
<add> "github.com/opencontainers/image-spec/identity"
<ide> ocispec "github.com/opencontainers/image-spec/specs-go/v1"
<ide> "github.com/pkg/errors"
<del> netcontext "golang.org/x/net/context"
<ide> "golang.org/x/time/rate"
<ide> )
<ide>
<ide> func (is *imageSource) Resolve(ctx context.Context, id source.Identifier) (sourc
<ide> }
<ide>
<ide> type puller struct {
<del> is *imageSource
<del> resolveOnce sync.Once
<del> src *source.ImageIdentifier
<del> desc ocispec.Descriptor
<del> ref string
<del> resolveErr error
<del> resolver remotes.Resolver
<del> imageID image.ID
<del> cacheKey digest.Digest
<add> is *imageSource
<add> resolveOnce sync.Once
<add> resolveLocalOnce sync.Once
<add> src *source.ImageIdentifier
<add> desc ocispec.Descriptor
<add> ref string
<add> resolveErr error
<add> resolver remotes.Resolver
<add> config []byte
<ide> }
<ide>
<del>func (p *puller) resolve(ctx context.Context) error {
<del> p.resolveOnce.Do(func() {
<del> resolveProgressDone := oneOffProgress(ctx, "resolve "+p.src.Reference.String())
<add>func (p *puller) mainManifestKey(dgst digest.Digest) (digest.Digest, error) {
<add> dt, err := json.Marshal(struct {
<add> Digest digest.Digest
<add> OS string
<add> Arch string
<add> }{
<add> Digest: p.desc.Digest,
<add> OS: runtime.GOOS,
<add> Arch: runtime.GOARCH,
<add> })
<add> if err != nil {
<add> return "", err
<add> }
<add> return digest.FromBytes(dt), nil
<add>}
<ide>
<del> // dgst := p.src.Reference.Digest()
<del> // if dgst != "" {
<del> // info, err := p.is.ContentStore.Info(ctx, dgst)
<del> // if err == nil {
<del> // p.ref = p.src.Reference.String()
<del> // ra, err := p.is.ContentStore.ReaderAt(ctx, dgst)
<del> // if err == nil {
<del> // mt, err := imageutil.DetectManifestMediaType(ra)
<del> // if err == nil {
<del> // p.desc = ocispec.Descriptor{
<del> // Size: info.Size,
<del> // Digest: dgst,
<del> // MediaType: mt,
<del> // }
<del> // resolveProgressDone(nil)
<del> // return
<del> // }
<del> // }
<del> // }
<del> // }
<del>
<del> // ref, desc, err := p.resolver.Resolve(ctx, p.src.Reference.String())
<del> // if err != nil {
<del> // p.resolveErr = err
<del> // resolveProgressDone(err)
<del> // return
<del> // }
<add>func (p *puller) resolveLocal() {
<add> p.resolveLocalOnce.Do(func() {
<add> dgst := p.src.Reference.Digest()
<add> if dgst != "" {
<add> info, err := p.is.ContentStore.Info(context.TODO(), dgst)
<add> if err == nil {
<add> p.ref = p.src.Reference.String()
<add> ra, err := p.is.ContentStore.ReaderAt(context.TODO(), dgst)
<add> if err == nil {
<add> mt, err := imageutil.DetectManifestMediaType(ra)
<add> if err == nil {
<add> p.desc = ocispec.Descriptor{
<add> Size: info.Size,
<add> Digest: dgst,
<add> MediaType: mt,
<add> }
<add> }
<add> }
<add> }
<add> }
<ide>
<ide> if preferLocal {
<ide> dt, err := p.is.resolveLocal(p.src.Reference.String())
<ide> if err == nil {
<del> dgst := digest.FromBytes(dt)
<del> p.imageID = image.ID(dgst)
<del> p.cacheKey = dgst
<del> resolveProgressDone(nil)
<del> return
<add> p.config = dt
<ide> }
<del>
<ide> }
<add> })
<add>}
<add>
<add>func (p *puller) resolve(ctx context.Context) error {
<add> p.resolveOnce.Do(func() {
<add> resolveProgressDone := oneOffProgress(ctx, "resolve "+p.src.Reference.String())
<ide>
<ide> ref, err := distreference.ParseNormalizedNamed(p.src.Reference.String())
<ide> if err != nil {
<ide> func (p *puller) resolve(ctx context.Context) error {
<ide> return
<ide> }
<ide>
<del> outRef, desc, err := p.resolver.Resolve(ctx, p.src.Reference.String())
<del> if err != nil {
<del> p.resolveErr = err
<del> resolveProgressDone(err)
<del> return
<del> }
<add> if p.desc.Digest == "" && p.config == nil {
<add> origRef, desc, err := p.resolver.Resolve(ctx, ref.String())
<add> if err != nil {
<add> p.resolveErr = err
<add> resolveProgressDone(err)
<add> return
<add> }
<ide>
<del> ref, err = distreference.WithDigest(ref, desc.Digest)
<del> if err != nil {
<del> p.resolveErr = err
<del> resolveProgressDone(err)
<del> return
<add> p.desc = desc
<add> p.ref = origRef
<ide> }
<ide>
<del> _, dt, err := p.is.ResolveImageConfig(ctx, ref.String())
<del> if err != nil {
<del> p.resolveErr = err
<del> resolveProgressDone(err)
<del> return
<add> if p.config == nil {
<add> ref, err := distreference.WithDigest(ref, p.desc.Digest)
<add> if err != nil {
<add> p.resolveErr = err
<add> resolveProgressDone(err)
<add> return
<add> }
<add>
<add> _, dt, err := p.is.ResolveImageConfig(ctx, ref.String())
<add> if err != nil {
<add> p.resolveErr = err
<add> resolveProgressDone(err)
<add> return
<add> }
<add>
<add> p.config = dt
<ide> }
<del> p.desc = desc
<del> p.cacheKey = digest.FromBytes(dt)
<del> p.ref = outRef
<ide> resolveProgressDone(nil)
<ide> })
<ide> return p.resolveErr
<ide> }
<ide>
<ide> func (p *puller) CacheKey(ctx context.Context, index int) (string, bool, error) {
<add> p.resolveLocal()
<add>
<add> if p.desc.Digest != "" && index == 0 {
<add> dgst, err := p.mainManifestKey(p.desc.Digest)
<add> if err != nil {
<add> return "", false, err
<add> }
<add> return dgst.String(), false, nil
<add> }
<add>
<add> if p.config != nil {
<add> return cacheKeyFromConfig(p.config).String(), true, nil
<add> }
<add>
<ide> if err := p.resolve(ctx); err != nil {
<ide> return "", false, err
<ide> }
<del> return p.cacheKey.String(), true, nil
<add>
<add> if p.desc.Digest != "" && index == 0 {
<add> dgst, err := p.mainManifestKey(p.desc.Digest)
<add> if err != nil {
<add> return "", false, err
<add> }
<add> return dgst.String(), false, nil
<add> }
<add>
<add> return cacheKeyFromConfig(p.config).String(), true, nil
<ide> }
<ide>
<ide> func (p *puller) Snapshot(ctx context.Context) (cache.ImmutableRef, error) {
<add> p.resolveLocal()
<ide> if err := p.resolve(ctx); err != nil {
<ide> return nil, err
<ide> }
<ide>
<del> if p.imageID != "" {
<del> img, err := p.is.ImageStore.Get(p.imageID)
<add> if p.config != nil {
<add> img, err := p.is.ImageStore.Get(image.ID(digest.Digest(p.config)))
<ide> if err != nil {
<ide> return nil, err
<ide> }
<del> ref, err := p.is.CacheAccessor.Get(ctx, string(img.RootFS.ChainID()), cache.WithDescription(fmt.Sprintf("from local %s", p.ref)))
<add> ref, err := p.is.CacheAccessor.GetFromSnapshotter(ctx, string(img.RootFS.ChainID()), cache.WithDescription(fmt.Sprintf("from local %s", p.ref)))
<ide> if err != nil {
<ide> return nil, err
<ide> }
<ide> func (p *puller) Snapshot(ctx context.Context) (cache.ImmutableRef, error) {
<ide> }
<ide> stopProgress()
<ide>
<del> ref, err := p.is.CacheAccessor.Get(ctx, string(rootFS.ChainID()), cache.WithDescription(fmt.Sprintf("pulled from %s", p.ref)))
<add> ref, err := p.is.CacheAccessor.GetFromSnapshotter(ctx, string(rootFS.ChainID()), cache.WithDescription(fmt.Sprintf("pulled from %s", p.ref)))
<ide> release()
<ide> if err != nil {
<ide> return nil, err
<ide> func (ld *layerDescriptor) DiffID() (layer.DiffID, error) {
<ide> return ld.diffID, nil
<ide> }
<ide>
<del>func (ld *layerDescriptor) Download(ctx netcontext.Context, progressOutput pkgprogress.Output) (io.ReadCloser, int64, error) {
<add>func (ld *layerDescriptor) Download(ctx context.Context, progressOutput pkgprogress.Output) (io.ReadCloser, int64, error) {
<ide> rc, err := ld.fetcher.Fetch(ctx, ld.desc)
<ide> if err != nil {
<ide> return nil, 0, err
<ide> func oneOffProgress(ctx context.Context, id string) func(err error) error {
<ide> return err
<ide> }
<ide> }
<add>
<add>// cacheKeyFromConfig returns a stable digest from image config. If image config
<add>// is a known oci image we will use chainID of layers.
<add>func cacheKeyFromConfig(dt []byte) digest.Digest {
<add> var img ocispec.Image
<add> err := json.Unmarshal(dt, &img)
<add> if err != nil {
<add> return digest.FromBytes(dt)
<add> }
<add> if img.RootFS.Type != "layers" {
<add> return digest.FromBytes(dt)
<add> }
<add> return identity.ChainID(img.RootFS.DiffIDs)
<add>}
<ide><path>builder/builder-next/builder.go
<ide> import (
<ide> "github.com/moby/buildkit/identity"
<ide> "github.com/moby/buildkit/session"
<ide> "github.com/pkg/errors"
<del> netcontext "golang.org/x/net/context"
<ide> "golang.org/x/sync/errgroup"
<ide> grpcmetadata "google.golang.org/grpc/metadata"
<ide> )
<ide> func (sp *statusProxy) Send(resp *controlapi.StatusResponse) error {
<ide> return sp.SendMsg(resp)
<ide> }
<ide>
<del>func (sp *statusProxy) Context() netcontext.Context {
<add>func (sp *statusProxy) Context() context.Context {
<ide> return sp.ctx
<ide> }
<ide> func (sp *statusProxy) SendMsg(m interface{}) error {
<ide><path>builder/builder-next/worker/worker.go
<ide> import (
<ide> digest "github.com/opencontainers/go-digest"
<ide> ocispec "github.com/opencontainers/image-spec/specs-go/v1"
<ide> "github.com/pkg/errors"
<del> netcontext "golang.org/x/net/context"
<ide> )
<ide>
<ide> // WorkerOpt is specific to a worker.
<ide> func (ld *layerDescriptor) DiffID() (layer.DiffID, error) {
<ide> return ld.diffID, nil
<ide> }
<ide>
<del>func (ld *layerDescriptor) Download(ctx netcontext.Context, progressOutput pkgprogress.Output) (io.ReadCloser, int64, error) {
<add>func (ld *layerDescriptor) Download(ctx context.Context, progressOutput pkgprogress.Output) (io.ReadCloser, int64, error) {
<ide> done := oneOffProgress(ld.pctx, fmt.Sprintf("pulling %s", ld.desc.Digest))
<ide> if err := contentutil.Copy(ctx, ld.w.ContentStore, ld.provider, ld.desc); err != nil {
<ide> return nil, 0, done(err) | 3 |
Mixed | Javascript | add missing deprecation code | 4e833b605986c4581525d3ebc5ffe56210abb0fd | <ide><path>doc/api/deprecations.md
<ide> Type: Documentation-only.
<ide>
<ide> Prefer [`message.socket`][] over [`message.connection`][].
<ide>
<del>### DEP0XXX: Changing the value of `process.config`
<add>### DEP0150: Changing the value of `process.config`
<ide> <!-- YAML
<ide> changes:
<ide> - version: REPLACEME
<ide><path>lib/internal/bootstrap/node.js
<ide> const deprecationHandler = {
<ide> warned: false,
<ide> message: 'Setting process.config is deprecated. ' +
<ide> 'In the future the property will be read-only.',
<del> code: 'DEP0XXX',
<add> code: 'DEP0150',
<ide> maybeWarn() {
<ide> if (!this.warned) {
<ide> process.emitWarning(this.message, { | 2 |
Ruby | Ruby | make rails_* give deprecation warning just once | 25b6b95459ae71218754e8469f77f86b676bf215 | <ide><path>railties/lib/rails/deprecation.rb
<ide> require "active_support/deprecation"
<ide>
<ide> RAILS_ROOT = (Class.new(ActiveSupport::Deprecation::DeprecationProxy) do
<add> cattr_accessor :warned
<add> self.warned = false
<add>
<ide> def target
<ide> Rails.root
<ide> end
<ide> def replace(*args)
<ide> end
<ide>
<ide> def warn(callstack, called, args)
<del> msg = "RAILS_ROOT is deprecated! Use Rails.root instead"
<del> ActiveSupport::Deprecation.warn(msg, callstack)
<add> unless warned
<add> ActiveSupport::Deprecation.warn("RAILS_ROOT is deprecated! Use Rails.root instead", callstack)
<add> self.warned = true
<add> end
<ide> end
<ide> end).new
<ide>
<ide> RAILS_ENV = (Class.new(ActiveSupport::Deprecation::DeprecationProxy) do
<add> cattr_accessor :warned
<add> self.warned = false
<add>
<ide> def target
<ide> Rails.env
<ide> end
<ide> def replace(*args)
<ide> end
<ide>
<ide> def warn(callstack, called, args)
<del> msg = "RAILS_ENV is deprecated! Use Rails.env instead"
<del> ActiveSupport::Deprecation.warn(msg, callstack)
<add> unless warned
<add> ActiveSupport::Deprecation.warn("RAILS_ENV is deprecated! Use Rails.env instead", callstack)
<add> self.warned = true
<add> end
<ide> end
<ide> end).new
<ide>
<ide> RAILS_DEFAULT_LOGGER = (Class.new(ActiveSupport::Deprecation::DeprecationProxy) do
<add> cattr_accessor :warned
<add> self.warned = false
<add>
<ide> def target
<ide> Rails.logger
<ide> end
<ide> def replace(*args)
<ide> end
<ide>
<ide> def warn(callstack, called, args)
<del> msg = "RAILS_DEFAULT_LOGGER is deprecated! Use Rails.logger instead"
<del> ActiveSupport::Deprecation.warn(msg, callstack)
<add> unless warned
<add> ActiveSupport::Deprecation.warn("RAILS_DEFAULT_LOGGER is deprecated! Use Rails.logger instead", callstack)
<add> self.warned = true
<add> end
<ide> end
<ide> end).new | 1 |
Ruby | Ruby | remove extra space [ci skip] | beff7d9d8edfc628f64f784c971e99d696fc4c7f | <ide><path>guides/bug_report_templates/active_record_master.rb
<ide> ActiveRecord::Base.logger = Logger.new(STDOUT)
<ide>
<ide> ActiveRecord::Schema.define do
<del> create_table :posts, force: true do |t|
<add> create_table :posts, force: true do |t|
<ide> end
<ide>
<del> create_table :comments, force: true do |t|
<add> create_table :comments, force: true do |t|
<ide> t.integer :post_id
<ide> end
<ide> end | 1 |
Javascript | Javascript | fix url encoding | e1aec710aaa51de37fb42365d41caafbd28ea26b | <ide><path>client/commonFramework/create-editor.js
<ide> window.common = (function(global) {
<ide> break;
<ide> case common.challengeTypes.JS:
<ide> case common.challengeTypes.BONFIRE:
<del> type = 'javascript';
<add> type = 'js';
<ide> break;
<ide> default:
<ide> type = '';
<ide> }
<ide>
<ide> var returnValue = '';
<del> if (trigger.id === 'markdown') {
<del> returnValue = '```' + type + '\n' + editor.getSelection() + '\n```';
<del> editor.replaceSelection(editor.getSelection());
<del> return returnValue;
<del> } else if (trigger.id === 'plain') {
<del> returnValue = editor.getSelection();
<del> editor.replaceSelection(editor.getSelection());
<del> return returnValue;
<del> } else if (trigger.id === 'link') {
<del> editor.replaceSelection(editor.getSelection());
<del> return ('[Challenge - ' + common.challengeName +
<del> (common.username ? ' (' + common.username + '\'s solution)' : '')
<del> + '](' + window.location + ')')
<del> .replace(/\)/g, '%29').replace(/%29\]/g, ')]') + ')';
<add> switch (trigger.id) {
<add> case 'markdown':
<add> returnValue = '```' + type + '\n' + editor.getSelection() + '\n```';
<add> editor.replaceSelection(editor.getSelection());
<add> return returnValue;
<add> case 'plain':
<add> returnValue = editor.getSelection();
<add> editor.replaceSelection(editor.getSelection());
<add> return returnValue;
<add> case 'link':
<add> editor.replaceSelection(editor.getSelection());
<add> return '[Challenge - ' + common.challengeName +
<add> (common.username ? ' (' + common.username + '\'s solution)' : '')
<add> + '](' + String(window.location).replace(/\)/g, '%29') + ')';
<ide> }
<ide> }
<ide> }); | 1 |
Mixed | Javascript | expose stream api in clearline() | 79cc8bb24117aa40e101971610d5813d927f9fbe | <ide><path>doc/api/readline.md
<ide> async function processLineByLine() {
<ide> }
<ide> ```
<ide>
<del>## readline.clearLine(stream, dir)
<add>## readline.clearLine(stream, dir[, callback])
<ide> <!-- YAML
<ide> added: v0.7.7
<add>changes:
<add> - version: REPLACEME
<add> pr-url: https://github.com/nodejs/node/pull/28674
<add> description: The stream's write() callback and return value are exposed.
<ide> -->
<ide>
<ide> * `stream` {stream.Writable}
<ide> * `dir` {number}
<ide> * `-1` - to the left from cursor
<ide> * `1` - to the right from cursor
<ide> * `0` - the entire line
<add>* `callback` {Function} Invoked once the operation completes.
<add>* Returns: {boolean} `false` if `stream` wishes for the calling code to wait for
<add> the `'drain'` event to be emitted before continuing to write additional data;
<add> otherwise `true`.
<ide>
<ide> The `readline.clearLine()` method clears current line of given [TTY][] stream
<ide> in a specified direction identified by `dir`.
<ide><path>lib/readline.js
<ide> function moveCursor(stream, dx, dy) {
<ide> * 0 for the entire line
<ide> */
<ide>
<del>function clearLine(stream, dir) {
<del> if (stream === null || stream === undefined)
<del> return;
<add>function clearLine(stream, dir, callback) {
<add> if (callback !== undefined && typeof callback !== 'function')
<add> throw new ERR_INVALID_CALLBACK(callback);
<ide>
<del> if (dir < 0) {
<del> // to the beginning
<del> stream.write(kClearToBeginning);
<del> } else if (dir > 0) {
<del> // to the end
<del> stream.write(kClearToEnd);
<del> } else {
<del> // entire line
<del> stream.write(kClearLine);
<add> if (stream === null || stream === undefined) {
<add> if (typeof callback === 'function')
<add> process.nextTick(callback);
<add> return true;
<ide> }
<add>
<add> const type = dir < 0 ? kClearToBeginning : dir > 0 ? kClearToEnd : kClearLine;
<add> return stream.write(type, callback);
<ide> }
<ide>
<ide> /**
<ide><path>test/parallel/test-readline-csi.js
<ide> assert.strictEqual(readline.clearScreenDown(undefined, common.mustCall()),
<ide> true);
<ide>
<ide> writable.data = '';
<del>readline.clearLine(writable, -1);
<add>assert.strictEqual(readline.clearLine(writable, -1), true);
<ide> assert.deepStrictEqual(writable.data, CSI.kClearToBeginning);
<ide>
<ide> writable.data = '';
<del>readline.clearLine(writable, 1);
<add>assert.strictEqual(readline.clearLine(writable, 1), true);
<ide> assert.deepStrictEqual(writable.data, CSI.kClearToEnd);
<ide>
<ide> writable.data = '';
<del>readline.clearLine(writable, 0);
<add>assert.strictEqual(readline.clearLine(writable, 0), true);
<ide> assert.deepStrictEqual(writable.data, CSI.kClearLine);
<ide>
<add>writable.data = '';
<add>assert.strictEqual(readline.clearLine(writable, -1, common.mustCall()), true);
<add>assert.deepStrictEqual(writable.data, CSI.kClearToBeginning);
<add>
<add>// Verify that clearLine() throws on invalid callback.
<add>assert.throws(() => {
<add> readline.clearLine(writable, 0, null);
<add>}, /ERR_INVALID_CALLBACK/);
<add>
<add>// Verify that clearLine() does not throw on null or undefined stream.
<add>assert.strictEqual(readline.clearLine(null, 0), true);
<add>assert.strictEqual(readline.clearLine(undefined, 0), true);
<add>assert.strictEqual(readline.clearLine(null, 0, common.mustCall()), true);
<add>assert.strictEqual(readline.clearLine(undefined, 0, common.mustCall()), true);
<add>
<ide> // Nothing is written when moveCursor 0, 0
<ide> [
<ide> [0, 0, ''], | 3 |
PHP | PHP | avoid unnecessary iterator to array conversion | 57244538a5229c8dffd86c6ae6c5acd6050ec37c | <ide><path>src/Http/Cookie/CookieCollection.php
<ide> public function addFromResponse(ResponseInterface $response, RequestInterface $r
<ide> $host = $uri->getHost();
<ide> $path = $uri->getPath() ?: '/';
<ide>
<del> $cookies = iterator_to_array(static::createFromHeader($response->getHeader('Set-Cookie')));
<add> $cookies = static::createFromHeader($response->getHeader('Set-Cookie'));
<ide> $cookies = $this->setRequestDefaults($cookies, $host, $path);
<ide> $new = clone $this;
<ide> foreach ($cookies as $cookie) {
<ide> public function addFromResponse(ResponseInterface $response, RequestInterface $r
<ide> /**
<ide> * Apply path and host to the set of cookies if they are not set.
<ide> *
<del> * @param array $cookies An array of cookies to update.
<add> * @param static $cookies A cookies collection to update.
<ide> * @param string $host The host to set.
<ide> * @param string $path The path to set.
<ide> * @return array An array of updated cookies.
<ide> */
<del> protected function setRequestDefaults(array $cookies, string $host, string $path): array
<add> protected function setRequestDefaults($cookies, string $host, string $path): array
<ide> {
<ide> $out = [];
<ide> foreach ($cookies as $name => $cookie) { | 1 |
Python | Python | add triggererjob to jobs check command | d3ac01052bad07f6ec341ab714faabed913169ce | <ide><path>airflow/cli/cli_parser.py
<ide> def _check(value):
<ide> # jobs check
<ide> ARG_JOB_TYPE_FILTER = Arg(
<ide> ('--job-type',),
<del> choices=('BackfillJob', 'LocalTaskJob', 'SchedulerJob'),
<add> choices=('BackfillJob', 'LocalTaskJob', 'SchedulerJob', 'TriggererJob'),
<ide> action='store',
<ide> help='The type of job(s) that will be checked.',
<ide> ) | 1 |
Javascript | Javascript | fix a couple of typos | d476dffdef59b35f259b6e9f63c531ea0616e557 | <ide><path>src/package.js
<ide> console.log(JSON.stringify({
<ide> "url": "https://github.com/mbostock/d3.git"
<ide> },
<ide> "main": "index.js",
<del> "browserify" : "index-browserify.js",
<add> "browserify": "index-browserify.js",
<ide> "jam": {
<ide> "main": "d3.js",
<ide> "shim": {
<ide><path>test/geo/path-test.js
<ide> suite.addBatch({
<ide> .rotate([0, 0])
<ide> .precision(1));
<ide> },
<del> "correctly resamples near the polesa": function(p) {
<add> "correctly resamples near the poles": function(p) {
<ide> p({type: "LineString", coordinates: [[0, 88], [180, 89]]});
<ide> assert.isTrue(testContext.buffer().filter(function(d) { return d.type === "lineTo"; }).length > 1);
<ide> p({type: "LineString", coordinates: [[180, 90], [1, 89.5]]});
<ide> suite.addBatch({
<ide> .rotate([11.5, 285])
<ide> .precision(1));
<ide> },
<del> "correctly resamples near the polesa": function(p) {
<add> "correctly resamples near the poles": function(p) {
<ide> p({type: "LineString", coordinates: [[170, 20], [170, 0]]});
<ide> assert.isTrue(testContext.buffer().filter(function(d) { return d.type === "lineTo"; }).length > 1);
<ide> } | 2 |
PHP | PHP | use rule alias as rule name by default | 3688ba755471a17caaa18ac00981728ce87bd956 | <ide><path>src/Validation/Validator.php
<ide> public function add($field, $name, $rule = [])
<ide> }
<ide>
<ide> foreach ($rules as $name => $rule) {
<del> $field->add($name, $rule);
<add> $field->add($name, $rule + ['rule' => $name]);
<ide> }
<ide>
<ide> return $this;
<ide><path>tests/TestCase/Validation/ValidatorTest.php
<ide> public function testAddingRulesToField()
<ide> $validator->add('body', 'another', ['rule' => 'crazy']);
<ide> $this->assertCount(1, $validator->field('body'));
<ide> $this->assertCount(2, $validator);
<add>
<add> $validator->add('email', 'notBlank');
<add> $result = $validator->field('email')->rule('notBlank')->get('rule');
<add> $this->assertEquals('notBlank', $result);
<ide> }
<ide>
<ide> /** | 2 |
Python | Python | fix optimizer serialization | 6cd8d3c37a2fcaf861e49bfebad49f43cfaa7ab3 | <ide><path>keras/optimizers.py
<ide> def get_updates(self, params, constraints, loss):
<ide>
<ide> def get_config(self):
<ide> return {"name": self.__class__.__name__,
<del> "lr": self.lr,
<del> "momentum": self.momentum,
<del> "decay": self.decay,
<add> "lr": float(self.lr.get_value()),
<add> "momentum": float(self.momentum.get_value()),
<add> "decay": float(self.decay.get_value()),
<ide> "nesterov": self.nesterov}
<ide>
<ide>
<ide> def get_updates(self, params, constraints, loss):
<ide>
<ide> def get_config(self):
<ide> return {"name": self.__class__.__name__,
<del> "lr": self.lr,
<del> "rho": self.rho,
<add> "lr": float(self.lr.get_value()),
<add> "rho": float(self.rho.get_value()),
<ide> "epsilon": self.epsilon}
<ide>
<ide>
<ide> def get_updates(self, params, constraints, loss):
<ide>
<ide> def get_config(self):
<ide> return {"name": self.__class__.__name__,
<del> "lr": self.lr,
<add> "lr": float(self.lr.get_value()),
<ide> "epsilon": self.epsilon}
<ide>
<ide>
<ide> def get_updates(self, params, constraints, loss):
<ide>
<ide> def get_config(self):
<ide> return {"name": self.__class__.__name__,
<del> "lr": self.lr,
<add> "lr": float(self.lr.get_value()),
<ide> "rho": self.rho,
<ide> "epsilon": self.epsilon}
<ide>
<ide> def get_updates(self, params, constraints, loss):
<ide>
<ide> def get_config(self):
<ide> return {"name": self.__class__.__name__,
<del> "lr": self.lr,
<add> "lr": float(self.lr.get_value()),
<ide> "beta_1": self.beta_1,
<ide> "beta_2": self.beta_2,
<ide> "epsilon": self.epsilon}
<ide><path>tests/auto/test_sequential_model.py
<ide> import numpy as np
<ide> np.random.seed(1337)
<ide>
<del>from keras.models import Sequential
<add>from keras.models import Sequential, model_from_json, model_from_yaml
<ide> from keras.layers.core import Dense, Activation, Merge
<ide> from keras.utils import np_utils
<ide> from keras.utils.test_utils import get_test_data
<ide> def test_sequential(self):
<ide> print(nloss)
<ide> assert(loss == nloss)
<ide>
<add> # test json serialization
<add> json_data = model.to_json()
<add> model = model_from_json(json_data)
<add>
<add> # test yaml serialization
<add> yaml_data = model.to_yaml()
<add> model = model_from_yaml(yaml_data)
<add>
<ide> def test_merge_sum(self):
<ide> print('Test merge: sum')
<ide> left = Sequential() | 2 |
Text | Text | revise long sentence about "pure" reducers | 3481c44d00fe9b78c61dcb34b5d3441ce56cbff3 | <ide><path>docs/recipes/reducers/PrerequisiteConcepts.md
<ide> As described in [Reducers](../../basics/Reducers.md), a Redux reducer function:
<ide>
<ide> - Should have a signature of `(previousState, action) => newState`, similar to the type of function you would pass to [`Array.prototype.reduce(reducer, ?initialValue)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce)
<del>- Should be "pure", which means it does not mutate its arguments, perform side effects like API calls or modify values outside of the function, or call non-pure functions like `Date.now()` or `Math.random()`. This also means that updates should be done in an ***"immutable"*** fashion, which means **always returning new objects with the updated data**, rather than directly modifying the original state tree in-place.
<add>- Should be "pure", which means the reducer:
<add> - Does not _perform side effects_ (such as calling API's or modifying non-local objects or variables).
<add> - Does not _call non-pure functions_ (like `Date.now` or `Math.random`).
<add> - Does not _mutate_ its arguments. If the reducer updates state, it should do so in an ***"immutable"*** fashion. In other words, the reducer should return a **new** object with the updated data rather than _modifying_ the **existing** state object _in-place_. The same approach should be used for any sub-objects within state that the reducer updates.
<ide>
<ide> >##### Note on immutability, side effects, and mutation
<ide> > Mutation is discouraged because it generally breaks time-travel debugging, and React Redux's `connect` function:
<ide> Because of these rules, it's important that the following core concepts are full
<ide>
<ide> #### Pure Functions and Side Effects
<ide>
<del>**Key Concepts**:
<add>**Key Concepts**:
<ide>
<ide> - Side effects
<ide> - Pure functions | 1 |
Javascript | Javascript | move changes from jsm to js version | 8d44d2619dd4fe319ab371643e5b4ddd518beded | <ide><path>examples/js/renderers/CSS2DRenderer.js
<ide> THREE.CSS2DObject.prototype.constructor = THREE.CSS2DObject;
<ide>
<ide> THREE.CSS2DRenderer = function () {
<ide>
<add> var _this = this;
<add>
<ide> var _width, _height;
<ide> var _widthHalf, _heightHalf;
<ide>
<ide> THREE.CSS2DRenderer = function () {
<ide>
<ide> };
<ide>
<del> var renderObject = function ( object, camera ) {
<add> var renderObject = function ( object, scene, camera ) {
<ide>
<ide> if ( object instanceof THREE.CSS2DObject ) {
<ide>
<add> object.onBeforeRender( _this, scene, camera );
<add>
<ide> vector.setFromMatrixPosition( object.matrixWorld );
<ide> vector.applyMatrix4( viewProjectionMatrix );
<ide>
<ide> THREE.CSS2DRenderer = function () {
<ide>
<ide> }
<ide>
<add> object.onAfterRender( _this, scene, camera );
<add>
<ide> }
<ide>
<ide> for ( var i = 0, l = object.children.length; i < l; i ++ ) {
<ide> THREE.CSS2DRenderer = function () {
<ide> viewMatrix.copy( camera.matrixWorldInverse );
<ide> viewProjectionMatrix.multiplyMatrices( camera.projectionMatrix, viewMatrix );
<ide>
<del> renderObject( scene, camera );
<add> renderObject( scene, scene, camera );
<ide> zOrder( scene );
<ide>
<ide> };
<ide><path>examples/jsm/renderers/CSS2DRenderer.js
<ide> CSS2DObject.prototype.constructor = CSS2DObject;
<ide>
<ide> var CSS2DRenderer = function () {
<ide>
<del> var _this = this;
<del>
<ide> var _width, _height;
<ide> var _widthHalf, _heightHalf;
<ide>
<ide> var CSS2DRenderer = function () {
<ide>
<ide> };
<ide>
<del> var renderObject = function ( object, scene, camera ) {
<add> var renderObject = function ( object, camera ) {
<ide>
<ide> if ( object instanceof CSS2DObject ) {
<ide>
<del> object.onBeforeRender( _this, scene, camera );
<del>
<ide> vector.setFromMatrixPosition( object.matrixWorld );
<ide> vector.applyMatrix4( viewProjectionMatrix );
<ide>
<ide> var CSS2DRenderer = function () {
<ide>
<ide> }
<ide>
<del> object.onAfterRender( _this, scene, camera );
<del>
<ide> }
<ide>
<ide> for ( var i = 0, l = object.children.length; i < l; i ++ ) {
<ide> var CSS2DRenderer = function () {
<ide> viewMatrix.copy( camera.matrixWorldInverse );
<ide> viewProjectionMatrix.multiplyMatrices( camera.projectionMatrix, viewMatrix );
<ide>
<del> renderObject( scene, scene, camera );
<add> renderObject( scene, camera );
<ide> zOrder( scene );
<ide>
<ide> }; | 2 |
Ruby | Ruby | extract common query to a constant | e7e28a71be68271c7892477c1b9336316a1871bc | <ide><path>activerecord/lib/active_record/relation/finder_methods.rb
<ide> module ActiveRecord
<ide> module FinderMethods
<add> ONE_AS_ONE = '1 AS one'
<add>
<ide> # Find by id - This can either be a specific id (1), a list of ids (1, 5, 6), or an array of ids ([5, 6, 10]).
<ide> # If no record can be found for all of the listed ids, then RecordNotFound will be raised. If the primary key
<ide> # is an integer, find by id coerces its arguments using +to_i+.
<ide> def exists?(conditions = :none)
<ide> relation = construct_relation_for_association_find(construct_join_dependency)
<ide> return false if ActiveRecord::NullRelation === relation
<ide>
<del> relation = relation.except(:select, :order).select("1 AS one").limit(1)
<add> relation = relation.except(:select, :order).select(ONE_AS_ONE).limit(1)
<ide>
<ide> case conditions
<ide> when Array, Hash | 1 |
Text | Text | improve grammar for this readme.md | 8d8dff86f308132a7e5bf713d2d0e41b8996dde6 | <ide><path>guide/english/algorithms/search-algorithms/jump-search/index.md
<ide> title: Jump Search
<ide> ---
<ide>
<ide> ## Jump Search
<del>A jump search locates an item in a sorted array by jumping k itens and then verify if the item wanted is between
<del>the previous jump and current jump.
<add>A jump search locates an item in a sorted array by jumping k items in the array and then verifies if the item wanted is between the previous jump and current jump.
<ide>
<del># Complexity Worst Case
<add># Worst Case Complexity
<ide> O(√N)
<ide>
<del># Works
<del>1. Define the value of k, the number of jump: Optimal jump size is √N where the N is the length of array
<del>2. Jump the array k-by-k searching by the condition `Array[i] < valueWanted < Array[i+k]`
<del>3. Do a linear search between `Array[i]` and `Array[i + k]`
<add># How does it work ?
<add>1. Define the value of k, the number of jumps: The optimal jump size is √N where N is the length of the sorted array.
<add>2. Jump over the array elements by k everytime, checking the following condition `Array[i] < valueWanted < Array[i+k]`.
<add>3. If the previous condition is true, then do a linear search between `Array[i]` and `Array[i + k]`.
<add>4. Return the position of the value if it is found in the array.
<ide>
<ide> 
<ide>
<ide> # Code
<del>To view examples of code implementation of this method access this link below:
<add>To view examples of code implementation for this method, access this link below:
<ide>
<ide> [Jump Search - OpenGenus/cosmos](https://github.com/OpenGenus/cosmos/tree/master/code/search/jump_search)
<ide> | 1 |
Text | Text | add note about .babelrc | 32c3dd047612cd9eda044e100e36ca85117ca517 | <ide><path>examples/with-jest/README.md
<ide> npm test
<ide> This example features:
<ide>
<ide> * An app with jest tests
<add>
<add>> A very important part of this example is the `.babelrc` file which configures the `test` environment to use `babel-preset-env` and configures it to transpile modules to `commonjs`). [Learn more](https://github.com/zeit/next.js/issues/2895). | 1 |
Go | Go | remove listenandserve from unit tests | b2b59ddb10ea0bc9d7f0f39cea5f1d8742d1e83e | <ide><path>api_test.go
<ide> package docker
<ide>
<ide> import (
<add> "bytes"
<ide> "encoding/json"
<ide> "github.com/dotcloud/docker/auth"
<add> "net/http"
<add> "net/http/httptest"
<ide> "testing"
<ide> )
<ide>
<del>func init() {
<del> // Make it our Store root
<del> runtime, err := NewRuntimeFromDirectory(unitTestStoreBase, false)
<del> if err != nil {
<del> panic(err)
<del> }
<del>
<del> // Create the "Server"
<del> srv := &Server{
<del> runtime: runtime,
<del> }
<del> go ListenAndServe("0.0.0.0:4243", srv, false)
<add>// func init() {
<add>// // Make it our Store root
<add>// runtime, err := NewRuntimeFromDirectory(unitTestStoreBase, false)
<add>// if err != nil {
<add>// panic(err)
<add>// }
<ide>
<del>}
<add>// // Create the "Server"
<add>// srv := &Server{
<add>// runtime: runtime,
<add>// }
<add>// go ListenAndServe("0.0.0.0:4243", srv, false)
<add>// }
<ide>
<ide> func TestAuth(t *testing.T) {
<del> var out auth.AuthConfig
<del>
<del> out.Username = "utest"
<del> out.Password = "utest"
<del> out.Email = "utest@yopmail.com"
<del>
<del> _, _, err := call("POST", "/auth", out)
<add> runtime, err := newTestRuntime()
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<add> defer nuke(runtime)
<ide>
<del> out.Username = ""
<del> out.Password = ""
<del> out.Email = ""
<add> srv := &Server{runtime: runtime}
<ide>
<del> body, _, err := call("GET", "/auth", nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<add> r := httptest.NewRecorder()
<ide>
<del> err = json.Unmarshal(body, &out)
<del> if err != nil {
<del> t.Fatal(err)
<add> authConfig := &auth.AuthConfig{
<add> Username: "utest",
<add> Password: "utest",
<add> Email: "utest@yopmail.com",
<ide> }
<ide>
<del> if out.Username != "utest" {
<del> t.Errorf("Expected username to be utest, %s found", out.Username)
<del> }
<del>}
<del>
<del>func TestVersion(t *testing.T) {
<del> body, _, err := call("GET", "/version", nil)
<add> authConfigJson, err := json.Marshal(authConfig)
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<del> var out ApiVersion
<del> err = json.Unmarshal(body, &out)
<add>
<add> req, err := http.NewRequest("POST", "/auth", bytes.NewReader(authConfigJson))
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<del> if out.Version != VERSION {
<del> t.Errorf("Excepted version %s, %s found", VERSION, out.Version)
<del> }
<del>}
<ide>
<del>func TestImages(t *testing.T) {
<del> body, _, err := call("GET", "/images?quiet=0&all=0", nil)
<add> body, err := postAuth(srv, r, req)
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<del> var outs []ApiImages
<del> err = json.Unmarshal(body, &outs)
<del> if err != nil {
<del> t.Fatal(err)
<add> if body != nil {
<add> t.Fatalf("No body expected, received: %s\n", body)
<ide> }
<ide>
<del> if len(outs) != 1 {
<del> t.Errorf("Excepted 1 image, %d found", len(outs))
<add> if r.Code != http.StatusNoContent {
<add> t.Fatalf("%d NO CONTENT expected, received %d\n", http.StatusNoContent, r.Code)
<ide> }
<ide>
<del> if outs[0].Repository != "docker-ut" {
<del> t.Errorf("Excepted image docker-ut, %s found", outs[0].Repository)
<del> }
<del>}
<add> authConfig = &auth.AuthConfig{}
<ide>
<del>func TestInfo(t *testing.T) {
<del> body, _, err := call("GET", "/info", nil)
<add> req, err = http.NewRequest("GET", "/auth", nil)
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<del> var out ApiInfo
<del> err = json.Unmarshal(body, &out)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del> if out.Version != VERSION {
<del> t.Errorf("Excepted version %s, %s found", VERSION, out.Version)
<del> }
<del>}
<ide>
<del>func TestHistory(t *testing.T) {
<del> body, _, err := call("GET", "/images/"+unitTestImageName+"/history", nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del> var outs []ApiHistory
<del> err = json.Unmarshal(body, &outs)
<add> body, err = getAuth(srv, nil, req)
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<del> if len(outs) != 1 {
<del> t.Errorf("Excepted 1 line, %d found", len(outs))
<del> }
<del>}
<ide>
<del>func TestImagesSearch(t *testing.T) {
<del> body, _, err := call("GET", "/images/search?term=redis", nil)
<add> err = json.Unmarshal(body, authConfig)
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<del> var outs []ApiSearch
<del> err = json.Unmarshal(body, &outs)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del> if len(outs) < 2 {
<del> t.Errorf("Excepted at least 2 lines, %d found", len(outs))
<add>
<add> if authConfig.Username != "utest" {
<add> t.Errorf("Expected username to be utest, %s found", authConfig.Username)
<ide> }
<ide> }
<ide>
<del>func TestGetImage(t *testing.T) {
<del> obj, _, err := call("GET", "/images/"+unitTestImageName+"/json", nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del> var out Image
<del> err = json.Unmarshal(obj, &out)
<add>func TestVersion(t *testing.T) {
<add> runtime, err := newTestRuntime()
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<del> if out.Comment != "Imported from http://get.docker.io/images/busybox" {
<del> t.Errorf("Error inspecting image")
<del> }
<del>}
<add> defer nuke(runtime)
<ide>
<del>func TestCreateListStartStopRestartKillWaitDelete(t *testing.T) {
<del> containers := testListContainers(t, -1)
<del> for _, container := range containers {
<del> testDeleteContainer(t, container.Id)
<del> }
<del> testCreateContainer(t)
<del> id := testListContainers(t, 1)[0].Id
<del> testContainerStart(t, id)
<del> testContainerStop(t, id)
<del> testContainerRestart(t, id)
<del> testContainerKill(t, id)
<del> testContainerWait(t, id)
<del> testDeleteContainer(t, id)
<del> testListContainers(t, 0)
<del>}
<add> srv := &Server{runtime: runtime}
<ide>
<del>func testCreateContainer(t *testing.T) {
<del> config, _, err := ParseRun([]string{unitTestImageName, "touch test"}, nil)
<add> body, err := getVersion(srv, nil, nil)
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<del> _, _, err = call("POST", "/containers", *config)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del>}
<ide>
<del>func testListContainers(t *testing.T, expected int) []ApiContainers {
<del> body, _, err := call("GET", "/containers?quiet=1&all=1", nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del> var outs []ApiContainers
<del> err = json.Unmarshal(body, &outs)
<add> v := &ApiVersion{}
<add>
<add> err = json.Unmarshal(body, v)
<ide> if err != nil {
<ide> t.Fatal(err)
<ide> }
<del> if expected >= 0 && len(outs) != expected {
<del> t.Errorf("Excepted %d container, %d found", expected, len(outs))
<add> if v.Version != VERSION {
<add> t.Errorf("Excepted version %s, %s found", VERSION, v.Version)
<ide> }
<del> return outs
<ide> }
<ide>
<del>func testContainerStart(t *testing.T, id string) {
<del> _, _, err := call("POST", "/containers/"+id+"/start", nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del>}
<add>// func TestImages(t *testing.T) {
<add>// body, _, err := call("GET", "/images?quiet=0&all=0", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// var outs []ApiImages
<add>// err = json.Unmarshal(body, &outs)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<ide>
<del>func testContainerRestart(t *testing.T, id string) {
<del> _, _, err := call("POST", "/containers/"+id+"/restart?t=1", nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del>}
<add>// if len(outs) != 1 {
<add>// t.Errorf("Excepted 1 image, %d found", len(outs))
<add>// }
<ide>
<del>func testContainerStop(t *testing.T, id string) {
<del> _, _, err := call("POST", "/containers/"+id+"/stop?t=1", nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del>}
<add>// if outs[0].Repository != "docker-ut" {
<add>// t.Errorf("Excepted image docker-ut, %s found", outs[0].Repository)
<add>// }
<add>// }
<ide>
<del>func testContainerKill(t *testing.T, id string) {
<del> _, _, err := call("POST", "/containers/"+id+"/kill", nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del>}
<add>// func TestInfo(t *testing.T) {
<add>// body, _, err := call("GET", "/info", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// var out ApiInfo
<add>// err = json.Unmarshal(body, &out)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// if out.Version != VERSION {
<add>// t.Errorf("Excepted version %s, %s found", VERSION, out.Version)
<add>// }
<add>// }
<ide>
<del>func testContainerWait(t *testing.T, id string) {
<del> _, _, err := call("POST", "/containers/"+id+"/wait", nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del>}
<add>// func TestHistory(t *testing.T) {
<add>// body, _, err := call("GET", "/images/"+unitTestImageName+"/history", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// var outs []ApiHistory
<add>// err = json.Unmarshal(body, &outs)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// if len(outs) != 1 {
<add>// t.Errorf("Excepted 1 line, %d found", len(outs))
<add>// }
<add>// }
<ide>
<del>func testDeleteContainer(t *testing.T, id string) {
<del> _, _, err := call("DELETE", "/containers/"+id, nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del>}
<add>// func TestImagesSearch(t *testing.T) {
<add>// body, _, err := call("GET", "/images/search?term=redis", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// var outs []ApiSearch
<add>// err = json.Unmarshal(body, &outs)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// if len(outs) < 2 {
<add>// t.Errorf("Excepted at least 2 lines, %d found", len(outs))
<add>// }
<add>// }
<ide>
<del>func testContainerChanges(t *testing.T, id string) {
<del> _, _, err := call("GET", "/containers/"+id+"/changes", nil)
<del> if err != nil {
<del> t.Fatal(err)
<del> }
<del>}
<add>// func TestGetImage(t *testing.T) {
<add>// obj, _, err := call("GET", "/images/"+unitTestImageName+"/json", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// var out Image
<add>// err = json.Unmarshal(obj, &out)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// if out.Comment != "Imported from http://get.docker.io/images/busybox" {
<add>// t.Errorf("Error inspecting image")
<add>// }
<add>// }
<add>
<add>// func TestCreateListStartStopRestartKillWaitDelete(t *testing.T) {
<add>// containers := testListContainers(t, -1)
<add>// for _, container := range containers {
<add>// testDeleteContainer(t, container.Id)
<add>// }
<add>// testCreateContainer(t)
<add>// id := testListContainers(t, 1)[0].Id
<add>// testContainerStart(t, id)
<add>// testContainerStop(t, id)
<add>// testContainerRestart(t, id)
<add>// testContainerKill(t, id)
<add>// testContainerWait(t, id)
<add>// testDeleteContainer(t, id)
<add>// testListContainers(t, 0)
<add>// }
<add>
<add>// func testCreateContainer(t *testing.T) {
<add>// config, _, err := ParseRun([]string{unitTestImageName, "touch test"}, nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// _, _, err = call("POST", "/containers", *config)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// }
<add>
<add>// func testListContainers(t *testing.T, expected int) []ApiContainers {
<add>// body, _, err := call("GET", "/containers?quiet=1&all=1", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// var outs []ApiContainers
<add>// err = json.Unmarshal(body, &outs)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// if expected >= 0 && len(outs) != expected {
<add>// t.Errorf("Excepted %d container, %d found", expected, len(outs))
<add>// }
<add>// return outs
<add>// }
<add>
<add>// func testContainerStart(t *testing.T, id string) {
<add>// _, _, err := call("POST", "/containers/"+id+"/start", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// }
<add>
<add>// func testContainerRestart(t *testing.T, id string) {
<add>// _, _, err := call("POST", "/containers/"+id+"/restart?t=1", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// }
<add>
<add>// func testContainerStop(t *testing.T, id string) {
<add>// _, _, err := call("POST", "/containers/"+id+"/stop?t=1", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// }
<add>
<add>// func testContainerKill(t *testing.T, id string) {
<add>// _, _, err := call("POST", "/containers/"+id+"/kill", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// }
<add>
<add>// func testContainerWait(t *testing.T, id string) {
<add>// _, _, err := call("POST", "/containers/"+id+"/wait", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// }
<add>
<add>// func testDeleteContainer(t *testing.T, id string) {
<add>// _, _, err := call("DELETE", "/containers/"+id, nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// }
<add>
<add>// func testContainerChanges(t *testing.T, id string) {
<add>// _, _, err := call("GET", "/containers/"+id+"/changes", nil)
<add>// if err != nil {
<add>// t.Fatal(err)
<add>// }
<add>// } | 1 |
PHP | PHP | move consoleerrorhandler to error | ae4bf8ec4153985400691795b528cdb5a5f2a68b | <ide><path>src/Console/ConsoleErrorHandler.php
<ide> <?php
<ide> declare(strict_types=1);
<ide>
<del>/**
<del> * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
<del> * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<del> *
<del> * Licensed under The MIT License
<del> * For full copyright and license information, please see the LICENSE.txt
<del> * Redistributions of files must retain the above copyright notice.
<del> *
<del> * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<del> * @link https://cakephp.org CakePHP(tm) Project
<del> * @since 2.0.0
<del> * @license https://opensource.org/licenses/mit-license.php MIT License
<del> */
<del>namespace Cake\Console;
<del>
<del>use Cake\Error\BaseErrorHandler;
<del>use Cake\Error\FatalErrorException;
<del>use Throwable;
<del>
<del>/**
<del> * Error Handler for Cake console. Does simple printing of the
<del> * exception that occurred and the stack trace of the error.
<del> */
<del>class ConsoleErrorHandler extends BaseErrorHandler
<del>{
<del> /**
<del> * Standard error stream.
<del> *
<del> * @var \Cake\Console\ConsoleOutput
<del> */
<del> protected $_stderr;
<del>
<del> /**
<del> * Constructor
<del> *
<del> * @param array $config Config options for the error handler.
<del> */
<del> public function __construct(array $config = [])
<del> {
<del> $config += [
<del> 'stderr' => new ConsoleOutput('php://stderr'),
<del> 'log' => false,
<del> ];
<del>
<del> $this->setConfig($config);
<del> $this->_stderr = $this->_config['stderr'];
<del> }
<del>
<del> /**
<del> * Handle errors in the console environment. Writes errors to stderr,
<del> * and logs messages if Configure::read('debug') is false.
<del> *
<del> * @param \Throwable $exception Exception instance.
<del> * @return void
<del> * @throws \Exception When renderer class not found
<del> * @see https://secure.php.net/manual/en/function.set-exception-handler.php
<del> */
<del> public function handleException(Throwable $exception): void
<del> {
<del> $this->_displayException($exception);
<del> $this->logException($exception);
<del> $code = $exception->getCode();
<del> $code = $code && is_int($code) ? $code : 1;
<del> $this->_stop($code);
<del> }
<del>
<del> /**
<del> * Prints an exception to stderr.
<del> *
<del> * @param \Throwable $exception The exception to handle
<del> * @return void
<del> */
<del> protected function _displayException(Throwable $exception): void
<del> {
<del> $errorName = 'Exception:';
<del> if ($exception instanceof FatalErrorException) {
<del> $errorName = 'Fatal Error:';
<del> }
<del>
<del> $message = sprintf(
<del> '<error>%s</error> %s in [%s, line %s]',
<del> $errorName,
<del> $exception->getMessage(),
<del> $exception->getFile(),
<del> $exception->getLine()
<del> );
<del> $this->_stderr->write($message);
<del> }
<del>
<del> /**
<del> * Prints an error to stderr.
<del> *
<del> * Template method of BaseErrorHandler.
<del> *
<del> * @param array $error An array of error data.
<del> * @param bool $debug Whether or not the app is in debug mode.
<del> * @return void
<del> */
<del> protected function _displayError(array $error, bool $debug): void
<del> {
<del> $message = sprintf(
<del> '%s in [%s, line %s]',
<del> $error['description'],
<del> $error['file'],
<del> $error['line']
<del> );
<del> $message = sprintf(
<del> "<error>%s Error:</error> %s\n",
<del> $error['error'],
<del> $message
<del> );
<del> $this->_stderr->write($message);
<del> }
<del>
<del> /**
<del> * Stop the execution and set the exit code for the process.
<del> *
<del> * @param int $code The exit code.
<del> * @return void
<del> */
<del> protected function _stop(int $code): void
<del> {
<del> exit($code);
<del> }
<del>}
<add>class_alias(
<add> 'Cake\Error\ConsoleErrorHandler',
<add> 'Cake\Console\ConsoleErrorHandler'
<add>);
<add>deprecationWarning(
<add> 'Use Cake\Error\ConsoleErrorHandler instead of Cake\Console\ConsoleErrorHandler.'
<add>);
<ide><path>src/Error/ConsoleErrorHandler.php
<add><?php
<add>declare(strict_types=1);
<add>
<add>/**
<add> * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
<add> * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<add> *
<add> * Licensed under The MIT License
<add> * For full copyright and license information, please see the LICENSE.txt
<add> * Redistributions of files must retain the above copyright notice.
<add> *
<add> * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
<add> * @link https://cakephp.org CakePHP(tm) Project
<add> * @since 2.0.0
<add> * @license https://opensource.org/licenses/mit-license.php MIT License
<add> */
<add>namespace Cake\Error;
<add>
<add>use Cake\Console\ConsoleOutput;
<add>use Throwable;
<add>
<add>/**
<add> * Error Handler for Cake console. Does simple printing of the
<add> * exception that occurred and the stack trace of the error.
<add> */
<add>class ConsoleErrorHandler extends BaseErrorHandler
<add>{
<add> /**
<add> * Standard error stream.
<add> *
<add> * @var \Cake\Console\ConsoleOutput
<add> */
<add> protected $_stderr;
<add>
<add> /**
<add> * Constructor
<add> *
<add> * @param array $config Config options for the error handler.
<add> */
<add> public function __construct(array $config = [])
<add> {
<add> $config += [
<add> 'stderr' => new ConsoleOutput('php://stderr'),
<add> 'log' => false,
<add> ];
<add>
<add> $this->setConfig($config);
<add> $this->_stderr = $this->_config['stderr'];
<add> }
<add>
<add> /**
<add> * Handle errors in the console environment. Writes errors to stderr,
<add> * and logs messages if Configure::read('debug') is false.
<add> *
<add> * @param \Throwable $exception Exception instance.
<add> * @return void
<add> * @throws \Exception When renderer class not found
<add> * @see https://secure.php.net/manual/en/function.set-exception-handler.php
<add> */
<add> public function handleException(Throwable $exception): void
<add> {
<add> $this->_displayException($exception);
<add> $this->logException($exception);
<add> $code = $exception->getCode();
<add> $code = $code && is_int($code) ? $code : 1;
<add> $this->_stop($code);
<add> }
<add>
<add> /**
<add> * Prints an exception to stderr.
<add> *
<add> * @param \Throwable $exception The exception to handle
<add> * @return void
<add> */
<add> protected function _displayException(Throwable $exception): void
<add> {
<add> $errorName = 'Exception:';
<add> if ($exception instanceof FatalErrorException) {
<add> $errorName = 'Fatal Error:';
<add> }
<add>
<add> $message = sprintf(
<add> '<error>%s</error> %s in [%s, line %s]',
<add> $errorName,
<add> $exception->getMessage(),
<add> $exception->getFile(),
<add> $exception->getLine()
<add> );
<add> $this->_stderr->write($message);
<add> }
<add>
<add> /**
<add> * Prints an error to stderr.
<add> *
<add> * Template method of BaseErrorHandler.
<add> *
<add> * @param array $error An array of error data.
<add> * @param bool $debug Whether or not the app is in debug mode.
<add> * @return void
<add> */
<add> protected function _displayError(array $error, bool $debug): void
<add> {
<add> $message = sprintf(
<add> '%s in [%s, line %s]',
<add> $error['description'],
<add> $error['file'],
<add> $error['line']
<add> );
<add> $message = sprintf(
<add> "<error>%s Error:</error> %s\n",
<add> $error['error'],
<add> $message
<add> );
<add> $this->_stderr->write($message);
<add> }
<add>
<add> /**
<add> * Stop the execution and set the exit code for the process.
<add> *
<add> * @param int $code The exit code.
<add> * @return void
<add> */
<add> protected function _stop(int $code): void
<add> {
<add> exit($code);
<add> }
<add>}
<add><path>tests/TestCase/Error/ConsoleErrorHandlerTest.php
<del><path>tests/TestCase/Console/ConsoleErrorHandlerTest.php
<ide> * @since 2.0.0
<ide> * @license https://opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Test\TestCase\Console;
<add>namespace Cake\Test\TestCase\Error;
<ide>
<ide> use Cake\Controller\Exception\MissingActionException;
<ide> use Cake\Core\Exception\Exception;
<ide> public function setUp(): void
<ide> $this->stderr = $this->getMockBuilder('Cake\Console\ConsoleOutput')
<ide> ->disableOriginalConstructor()
<ide> ->getMock();
<del> $this->Error = $this->getMockBuilder('Cake\Console\ConsoleErrorHandler')
<add> $this->Error = $this->getMockBuilder('Cake\Error\ConsoleErrorHandler')
<ide> ->setMethods(['_stop'])
<ide> ->setConstructorArgs([['stderr' => $this->stderr]])
<ide> ->getMock(); | 3 |
Python | Python | remove unsupported instance types | b0ce8d8cecc7ce604969978c75306553db5aa80e | <ide><path>libcloud/compute/drivers/ec2.py
<ide> def GiB(value):
<ide> 'm4.2xlarge',
<ide> 'm4.4xlarge',
<ide> 'm4.10xlarge',
<del> 'hs1.8xlarge',
<ide> 'i2.xlarge',
<ide> 'i2.2xlarge',
<ide> 'i2.4xlarge', | 1 |
Ruby | Ruby | remove old comment | 743d07ea2c3303b0f400f145f45686848e4bb762 | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
<ide> def rename_index(table_name, old_name, new_name)
<ide> end
<ide>
<ide> def index_name(table_name, options) #:nodoc:
<del> if Hash === options # legacy support
<add> if Hash === options
<ide> if options[:column]
<ide> "index_#{table_name}_on_#{Array(options[:column]) * '_and_'}"
<ide> elsif options[:name] | 1 |
Ruby | Ruby | tell people what command will remove keg | 8908dc51d610f2ce3b2c086b25e04cb9322a66d1 | <ide><path>Library/Homebrew/keg.rb
<ide> def uninstall
<ide> remove_old_aliases
<ide> remove_oldname_opt_record
<ide> rescue Errno::ENOTEMPTY
<del> ofail "Could not remove #{path}! Check its permissions."
<add> odie <<~EOS
<add> Could not remove #{name} keg! Do so manually:
<add> sudo rm -rf #{path}
<add> EOS
<ide> end
<ide>
<ide> def unlink(mode = OpenStruct.new) | 1 |
Mixed | Javascript | truncate decimal values | a7c66b6aaeb8132540abee12ffa9ac1c1fa2f373 | <ide><path>doc/api/timers.md
<ide> added: v0.0.1
<ide> Schedules repeated execution of `callback` every `delay` milliseconds.
<ide>
<ide> When `delay` is larger than `2147483647` or less than `1`, the `delay` will be
<del>set to `1`.
<add>set to `1`. Non-integer delays are truncated to an integer.
<ide>
<ide> If `callback` is not a function, a [`TypeError`][] will be thrown.
<ide>
<ide> nor of their ordering. The callback will be called as close as possible to the
<ide> time specified.
<ide>
<ide> When `delay` is larger than `2147483647` or less than `1`, the `delay`
<del>will be set to `1`.
<add>will be set to `1`. Non-integer delays are truncated to an integer.
<ide>
<ide> If `callback` is not a function, a [`TypeError`][] will be thrown.
<ide>
<ide><path>lib/timers.js
<ide> exports._unrefActive = function(item) {
<ide> // Appends a timer onto the end of an existing timers list, or creates a new
<ide> // list if one does not already exist for the specified timeout duration.
<ide> function insert(item, refed, start) {
<del> const msecs = item._idleTimeout;
<add> let msecs = item._idleTimeout;
<ide> if (msecs < 0 || msecs === undefined)
<ide> return;
<ide>
<add> // Truncate so that accuracy of sub-milisecond timers is not assumed.
<add> msecs = Math.trunc(msecs);
<add>
<ide> item._idleStart = start;
<ide>
<ide> // Use an existing list if there is one, otherwise we need to make a new one.
<ide> function unenroll(item) {
<ide> // clearTimeout that makes it clear that the list should not be deleted.
<ide> // That function could then be used by http and other similar modules.
<ide> if (item[kRefed]) {
<del> const list = lists[item._idleTimeout];
<add> // Compliment truncation during insert().
<add> const msecs = Math.trunc(item._idleTimeout);
<add> const list = lists[msecs];
<ide> if (list !== undefined && L.isEmpty(list)) {
<ide> debug('unenroll: list empty');
<ide> queue.removeAt(list.priorityQueuePosition);
<ide><path>test/parallel/test-timers-non-integer-delay.js
<ide>
<ide> 'use strict';
<ide> const common = require('../common');
<add>const assert = require('assert');
<ide>
<ide> /*
<ide> * This test makes sure that non-integer timer delays do not make the process
<ide> const interval = setInterval(common.mustCall(() => {
<ide> process.exit(0);
<ide> }
<ide> }, N), TIMEOUT_DELAY);
<add>
<add>// Test non-integer delay ordering
<add>{
<add> const ordering = [];
<add>
<add> setTimeout(common.mustCall(() => {
<add> ordering.push(1);
<add> }), 1);
<add>
<add> setTimeout(common.mustCall(() => {
<add> ordering.push(2);
<add> }), 1.8);
<add>
<add> setTimeout(common.mustCall(() => {
<add> ordering.push(3);
<add> }), 1.1);
<add>
<add> setTimeout(common.mustCall(() => {
<add> ordering.push(4);
<add> }), 1);
<add>
<add> setTimeout(common.mustCall(() => {
<add> const expected = [1, 2, 3, 4];
<add>
<add> assert.deepStrictEqual(
<add> ordering,
<add> expected,
<add> `Non-integer delay ordering should be ${expected}, but got ${ordering}`
<add> );
<add>
<add> // 2 should always be last of these delays due to ordering guarentees by
<add> // the implementation.
<add> }), 2);
<add>} | 3 |
Python | Python | remove a double-decref in _import_umath (fixes ) | 5b4964b395f7c7c032a1d87f98b3f82c6ff8510c | <ide><path>numpy/core/code_generators/generate_ufunc_api.py
<ide> }
<ide> PyUFunc_API = (void **)PyCObject_AsVoidPtr(c_api);
<ide> Py_DECREF(c_api);
<del> Py_DECREF(numpy);
<ide> if (PyUFunc_API == NULL) {
<ide> PyErr_SetString(PyExc_RuntimeError, "_UFUNC_API is NULL pointer");
<ide> return -1; | 1 |
PHP | PHP | bind resource path | a208d72f60f829a598bed6a94c89beee9d35b358 | <ide><path>src/Illuminate/Foundation/Application.php
<ide> protected function bindPathsInContainer()
<ide> {
<ide> $this->instance('path', $this->path());
<ide> $this->instance('path.base', $this->basePath());
<del> $this->instance('path.resources', $this->resourcesPath());
<ide> $this->instance('path.lang', $this->langPath());
<ide> $this->instance('path.config', $this->configPath());
<ide> $this->instance('path.public', $this->publicPath());
<ide> $this->instance('path.storage', $this->storagePath());
<ide> $this->instance('path.database', $this->databasePath());
<add> $this->instance('path.resources', $this->resourcePath());
<ide> $this->instance('path.bootstrap', $this->bootstrapPath());
<ide> }
<ide>
<ide> public function useDatabasePath($path)
<ide> return $this;
<ide> }
<ide>
<del> /**
<del> * Get the path to the resources folder.
<del> *
<del> * @return string
<del> */
<del> public function resourcesPath()
<del> {
<del> return $this->basePath.DIRECTORY_SEPARATOR.'resources';
<del> }
<del>
<ide> /**
<ide> * Get the path to the language files.
<ide> *
<ide> * @return string
<ide> */
<ide> public function langPath()
<ide> {
<del> return $this->resourcesPath().DIRECTORY_SEPARATOR.'lang';
<add> return $this->resourcePath().DIRECTORY_SEPARATOR.'lang';
<ide> }
<ide>
<ide> /**
<ide> public function useStoragePath($path)
<ide> return $this;
<ide> }
<ide>
<add> /**
<add> * Get the path to the resources directory.
<add> *
<add> * @return string
<add> */
<add> public function resourcePath()
<add> {
<add> return $this->basePath.DIRECTORY_SEPARATOR.'resources';
<add> }
<add>
<ide> /**
<ide> * Get the path to the environment file directory.
<ide> * | 1 |
PHP | PHP | apply fixes from styleci | 15c81645788be437fd7079e50e97e90b7972fd40 | <ide><path>src/Illuminate/Routing/Route.php
<ide> protected function runController()
<ide> */
<ide> public function getController()
<ide> {
<del> if (! $this->controller) {
<add> if (! $this->controller) {
<ide> $class = $this->parseControllerCallback()[0];
<del>
<add>
<ide> $this->controller = $this->container->make($class);
<ide> }
<ide> | 1 |
Javascript | Javascript | add test for transition.selectall | f577542effb586f670f171a9b34d6026724838f0 | <ide><path>test/core/transition-test-selectAll.js
<add>require("../env");
<add>require("../../d3");
<add>
<add>var assert = require("assert");
<add>
<add>module.exports = {
<add> topic: function() {
<add> var s = d3.select("body").append("div").selectAll("div")
<add> .data(["one", "two", "three", "four"])
<add> .enter().append("div")
<add> .attr("class", String);
<add>
<add> s.filter(function(d, i) { return i > 0; }).append("span");
<add> s.filter(function(d, i) { return i > 1; }).append("span");
<add> s[0][3] = null;
<add>
<add> return s.transition()
<add> .delay(function(d, i) { return i * 13; })
<add> .duration(function(d, i) { return i * 21; });
<add> },
<add>
<add> "selects all matching elements": function(transition) {
<add> var t = transition.selectAll("span");
<add> assert.domEqual(t[1][0].node.parentNode, transition[0][1].node);
<add> assert.domEqual(t[2][0].node.parentNode, transition[0][2].node);
<add> assert.domEqual(t[2][1].node.parentNode, transition[0][2].node);
<add> },
<add> "ignores null elements": function(transition) {
<add> var t = transition.selectAll("span");
<add> assert.equal(t.length, 3);
<add> },
<add> "propagates delay to the selected elements": function(transition) {
<add> var t = transition.selectAll("span");
<add> assert.domEqual(t[1][0].delay, 13);
<add> assert.domEqual(t[2][0].delay, 26);
<add> assert.domEqual(t[2][1].delay, 26);
<add> },
<add> "propagates duration to the selected elements": function(transition) {
<add> var t = transition.selectAll("span");
<add> assert.domEqual(t[1][0].duration, 21);
<add> assert.domEqual(t[2][0].duration, 42);
<add> assert.domEqual(t[2][1].duration, 42);
<add> },
<add> "returns empty if no match is found": function(transition) {
<add> var t = transition.selectAll("span");
<add> assert.isEmpty(t[0]);
<add> }
<add>};
<ide><path>test/core/transition-test.js
<ide> suite.addBatch({
<ide>
<ide> // Subtransitions
<ide> "select": require("./transition-test-select"),
<del> // selectAll
<add> "selectAll": require("./transition-test-selectAll"),
<ide>
<ide> // Content
<ide> "attr": require("./transition-test-attr"), | 2 |
Text | Text | specify dataset used for crossvalidation | d8c26ed1391a4df5a67aa7fbabc0c0789818515f | <ide><path>model_cards/deepset/roberta-base-squad2-covid/README.md
<ide> **Language model:** deepset/roberta-base-squad2
<ide> **Language:** English
<ide> **Downstream-task:** Extractive QA
<del>**Training data:** [SQuAD-style CORD-19 annotations](https://github.com/deepset-ai/COVID-QA/tree/master/data/question-answering)
<add>**Training data:** [SQuAD-style CORD-19 annotations from 23rd April](https://github.com/deepset-ai/COVID-QA/blob/master/data/question-answering/200423_covidQA.json)
<ide> **Code:** See [example](https://github.com/deepset-ai/FARM/blob/master/examples/question_answering_crossvalidation.py) in [FARM](https://github.com/deepset-ai/FARM)
<ide> **Infrastructure**: Tesla v100
<ide> | 1 |
Python | Python | add documentation for as_strided | f7e64cc699567124114e41ad7f518d6825807cc3 | <ide><path>numpy/lib/stride_tricks.py
<ide> def _maybe_view_as_subclass(original_array, new_array):
<ide> return new_array
<ide>
<ide>
<del>def as_strided(x, shape=None, strides=None, subok=False):
<del> """ Make an ndarray from the given array with the given shape and strides.
<add>def as_strided(x, shape=None, strides=None, subok=False, writeable=True):
<add> """
<add> Create a view into the array with the given shape and strides.
<add>
<add> .. warning:: This function has to be used with extreme care, see notes.
<add>
<add> Parameters
<add> ----------
<add> x : ndarray
<add> Array to create a new.
<add> shape : sequence of int, optional
<add> The shape of the new array. Defaults to ``x.shape``.
<add> strides : sequence of int, optional
<add> The strides of the new array. Defaults to ``x.strides``.
<add> subok : bool, optional
<add> .. versionadded:: 1.10
<add>
<add> If True, subclasses are preserved.
<add> writeable : bool, optional
<add> .. versionadded:: 1.12
<add>
<add> If set to False, the returned array will always be readonly.
<add> Otherwise it will be writable if the original array was. It
<add> is advisable to set this to False if possible (see Notes).
<add>
<add> Returns
<add> -------
<add> view : ndarray
<add>
<add> See also
<add> --------
<add> broadcast_to: broadcast an array to a given shape.
<add> reshape : reshape an array.
<add>
<add> Notes
<add> -----
<add> ``as_strided`` creates a view into the array given the exact strides
<add> and shape. This means it manipulates the internal data structure of
<add> ndarray and, if done incorrectly, the array elements can point to
<add> invalid memory and can corrupt results or crash your program.
<add> It is advisable to always use the original ``x.strides`` when
<add> calculating new strides to avoid reliance on a contiguous memory
<add> layout.
<add>
<add> Furthermore, arrays created with this function often contain self
<add> overlapping memory, so that two elements are identical.
<add> Vectorized write operations on such arrays will typically be
<add> unpredictable. They may even give different results for small, large,
<add> or transposed arrays.
<add> Since writing to these arrays has to be tested and done with great
<add> care, you may want to use ``writeable=False`` to avoid accidental write
<add> operations.
<add>
<add> For these reasons it is advisable to avoid ``as_strided`` when
<add> possible.
<ide> """
<ide> # first convert input to array, possibly keeping subclass
<ide> x = np.array(x, copy=False, subok=subok)
<ide> def as_strided(x, shape=None, strides=None, subok=False):
<ide> interface['shape'] = tuple(shape)
<ide> if strides is not None:
<ide> interface['strides'] = tuple(strides)
<add>
<ide> array = np.asarray(DummyArray(interface, base=x))
<ide>
<ide> if array.dtype.fields is None and x.dtype.fields is not None:
<ide> # This should only happen if x.dtype is [('', 'Vx')]
<ide> array.dtype = x.dtype
<ide>
<del> return _maybe_view_as_subclass(x, array)
<add> view = _maybe_view_as_subclass(x, array)
<add>
<add> if view.flags.writeable and not writeable:
<add> view.flags.writeable = False
<add>
<add> return view
<ide>
<ide>
<ide> def _broadcast_to(array, shape, subok, readonly):
<ide><path>numpy/lib/tests/test_stride_tricks.py
<ide> def test_as_strided():
<ide> a_view = as_strided(a, shape=(3, 4), strides=(0, a.itemsize))
<ide> assert_equal(a.dtype, a_view.dtype)
<ide>
<add>def as_strided_writeable():
<add> arr = np.ones(10)
<add> view = as_strided(arr, writeable=False)
<add> assert_(not view.flags.writeable)
<add>
<add> # Check that writeable also is fine:
<add> view = as_strided(arr, writeable=True)
<add> assert_(view.flags.writeable)
<add> view[...] = 3
<add> assert_array_equal(arr, np.full_like(arr, 3))
<add>
<add> # Test that things do not break down for readonly:
<add> arr.flags.writeable = False
<add> view = as_strided(arr, writeable=False)
<add> view = as_strided(arr, writeable=True)
<add> assert_(not view.flags.writeable)
<add>
<ide>
<ide> class VerySimpleSubClass(np.ndarray):
<ide> def __new__(cls, *args, **kwargs): | 2 |
Python | Python | remove beta tag again, branch ready to merge | bd17a3fa52cf51310eb9553baaf71fd36d3b3105 | <ide><path>libcloud/drivers/linode.py
<ide> def __repr__(self):
<ide> return "<LinodeException code %u '%s'>" % (self.code, self.message)
<ide>
<ide> # For beta accounts, change this to "beta.linode.com".
<del>LINODE_API = "beta.linode.com"
<add>LINODE_API = "api.linode.com"
<ide>
<ide> # For beta accounts, change this to "/api/".
<del>LINODE_ROOT = "/api/"
<add>LINODE_ROOT = "/"
<ide>
<ide>
<ide> class LinodeResponse(Response): | 1 |
Text | Text | fix some syntax error | 915c5fbfb6de04c0497f9a28aa45864a95795c0d | <ide><path>guide/chinese/javascript/es6/arrow-functions/index.md
<ide> ---
<ide> title: Arrow Functions
<del>localeTitle: 箭头功能
<add>localeTitle: 箭头函数
<ide> ---
<del>## 箭头功能
<add>## 箭头函数
<ide>
<del>ES6中的功能发生了一些变化。我的意思是语法。
<add>ES6中的函数新增了一种语法(箭头函数)。
<ide>
<ide> ```javascript
<del>// Old Syntax
<add>// 老语法
<ide> function oldOne() {
<ide> console.log("Hello World..!");
<ide> }
<ide>
<del> // New Syntax
<add> // 新语法
<ide> var newOne = () => {
<ide> console.log("Hello World..!");
<ide> }
<ide> ```
<ide>
<del>新语法可能会让人感到困惑。但我会尝试解释语法。 语法分为两部分。
<add>新语法可能会让人感到困惑。但我会尝试解释它。 语法分为两部分。
<ide>
<ide> 1. var newOne =()
<ide> 2. \=> {}
<ide>
<del>第一部分是声明一个变量并将函数(即)()分配给它。它只是说变量实际上是一个函数。
<add>第一部分是声明一个变量并将函数()分配给它。它只是说变量实际上是一个函数。
<ide>
<del>然后第二部分声明函数的正文部分。带有花括号的箭头部分定义了身体部位。
<add>然后第二部分声明函数的正文部分。带有花括号的箭头部分定义了函数主体。
<ide>
<del>参数的另一个例子:
<add>参数传递:
<ide>
<ide> ```javascript
<ide> let NewOneWithParameters = (a, b) => {
<ide> let newOneWithOneParam = a => {
<ide> }
<ide> ```
<ide>
<del>箭头功能的一个令人难以置信的优点是你不能重新绑定箭头功能。它将始终使用定义它的上下文进行调用。只需使用正常功能。
<add>箭头函数最大的特点在于不能重复绑定,函数的上下文(`this`)指向的是定义函数时函数所在的上下文,类似于继承`this`
<ide>
<ide> ```javascript
<del>// Old Syntax
<add>// 老语法
<ide> axios.get(url).then(function(response) {
<ide> this.data = response.data;
<ide> }).bind(this);
<ide>
<del> // New Syntax
<add> // 新语法
<ide> axios.get(url).then(response => {
<ide> this.data = response.data;
<ide> });
<ide> ```
<ide>
<del>我认为我不需要对此作出解释。这很简单。
<ide>\ No newline at end of file
<add>该特性可以很好的解决开发过程中this指向导致的问题。 | 1 |
Python | Python | add kwarg to disable auto options on add_url_rule | 011b129b6bc615c7a24de626dd63b6a311fa6ce6 | <ide><path>flask/app.py
<ide> def index():
<ide>
<ide> # starting with Flask 0.8 the view_func object can disable and
<ide> # force-enable the automatic options handling.
<del> provide_automatic_options = getattr(view_func,
<del> 'provide_automatic_options', None)
<add> provide_automatic_options = options.pop(
<add> 'provide_automatic_options', getattr(view_func,
<add> 'provide_automatic_options', None))
<add>
<ide>
<ide> if provide_automatic_options is None:
<ide> if 'OPTIONS' not in methods:
<ide><path>tests/test_basic.py
<ide> def run_simple_mock(hostname, port, application, *args, **kwargs):
<ide> hostname, port = 'localhost', 8000
<ide> app.run(hostname, port, debug=True)
<ide> assert rv['result'] == 'running on %s:%s ...' % (hostname, port)
<add>
<add>
<add>def test_disable_automatic_options():
<add> # Issue 1488: Add support for a kwarg to add_url_rule to disable the auto OPTIONS response
<add> app = flask.Flask(__name__)
<add>
<add> def index():
<add> return flask.request.method
<add>
<add> def more():
<add> return flask.request.method
<add>
<add> app.add_url_rule('/', 'index', index, provide_automatic_options=False)
<add> app.add_url_rule('/more', 'more', more, methods=['GET', 'POST'], provide_automatic_options=False)
<add>
<add> c = app.test_client()
<add> assert c.get('/').data == b'GET'
<add> rv = c.post('/')
<add> assert rv.status_code == 405
<add> assert sorted(rv.allow) == ['GET', 'HEAD']
<add> # Older versions of Werkzeug.test.Client don't have an options method
<add> if hasattr(c, 'options'):
<add> rv = c.options('/')
<add> else:
<add> rv = c.open('/', method='OPTIONS')
<add> assert rv.status_code == 405
<add>
<add> rv = c.head('/')
<add> assert rv.status_code == 200
<add> assert not rv.data # head truncates
<add> assert c.post('/more').data == b'POST'
<add> assert c.get('/more').data == b'GET'
<add> rv = c.delete('/more')
<add> assert rv.status_code == 405
<add> assert sorted(rv.allow) == ['GET', 'HEAD', 'POST']
<add> # Older versions of Werkzeug.test.Client don't have an options method
<add> if hasattr(c, 'options'):
<add> rv = c.options('/more')
<add> else:
<add> rv = c.open('/more', method='OPTIONS')
<add> assert rv.status_code == 405 | 2 |
Python | Python | add function to make morphologizer model | e6dde97295022efe299bfa65a73c8d9b96eba8c4 | <ide><path>spacy/_ml.py
<ide> def finish_update(grad__BO, sgd=None):
<ide> return output__BO, finish_update
<ide>
<ide>
<del>def build_tagger_model(class_nums, **cfg):
<add>def build_tagger_model(nr_class, **cfg):
<add> embed_size = util.env_opt('embed_size', 7000)
<add> if 'token_vector_width' in cfg:
<add> token_vector_width = cfg['token_vector_width']
<add> else:
<add> token_vector_width = util.env_opt('token_vector_width', 128)
<add> pretrained_vectors = cfg.get('pretrained_vectors')
<add> subword_features = cfg.get('subword_features', True)
<add> with Model.define_operators({'>>': chain, '+': add}):
<add> if 'tok2vec' in cfg:
<add> tok2vec = cfg['tok2vec']
<add> else:
<add> tok2vec = Tok2Vec(token_vector_width, embed_size,
<add> subword_features=subword_features,
<add> pretrained_vectors=pretrained_vectors)
<add> softmax = with_flatten(
<add> Softmax(nr_class, token_vector_width))
<add> model = (
<add> tok2vec
<add> >> softmax
<add> )
<add> model.nI = None
<add> model.tok2vec = tok2vec
<add> model.softmax = softmax
<add> return model
<add>
<add>def build_morphologizer_model(class_nums, **cfg):
<ide> embed_size = util.env_opt('embed_size', 7000)
<ide> if 'token_vector_width' in cfg:
<ide> token_vector_width = cfg['token_vector_width'] | 1 |
Python | Python | fix serializer.data when provided invalid 'data' | daba5e9ba5cea03d56e76baa4bf05d67b7ac6cea | <ide><path>rest_framework/serializers.py
<ide> def get_validators(self):
<ide>
<ide> def get_initial(self):
<ide> if hasattr(self, 'initial_data'):
<add> # initial_data may not be a valid type
<add> if not isinstance(self.initial_data, Mapping):
<add> return OrderedDict()
<add>
<ide> return OrderedDict([
<ide> (field_name, field.get_value(self.initial_data))
<ide> for field_name, field in self.fields.items()
<ide><path>tests/browsable_api/test_form_rendering.py
<ide> class Meta:
<ide> fields = '__all__'
<ide>
<ide>
<add>class StandardPostView(generics.CreateAPIView):
<add> serializer_class = BasicSerializer
<add>
<add>
<ide> class ManyPostView(generics.GenericAPIView):
<ide> queryset = BasicModel.objects.all()
<ide> serializer_class = BasicSerializer
<ide> def post(self, request, *args, **kwargs):
<ide> return Response(serializer.data, status.HTTP_200_OK)
<ide>
<ide>
<add>class TestPostingListData(TestCase):
<add> """
<add> POSTing a list of data to a regular view should not cause the browsable
<add> API to fail during rendering.
<add>
<add> Regression test for https://github.com/encode/django-rest-framework/issues/5637
<add> """
<add>
<add> def test_json_response(self):
<add> # sanity check for non-browsable API responses
<add> view = StandardPostView.as_view()
<add> request = factory.post('/', [{}], format='json')
<add> response = view(request).render()
<add>
<add> self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
<add> self.assertTrue('non_field_errors' in response.data)
<add>
<add> def test_browsable_api(self):
<add> view = StandardPostView.as_view()
<add> request = factory.post('/?format=api', [{}], format='json')
<add> response = view(request).render()
<add>
<add> self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
<add> self.assertTrue('non_field_errors' in response.data)
<add>
<add>
<ide> class TestManyPostView(TestCase):
<ide> def setUp(self):
<ide> """
<ide><path>tests/test_serializer.py
<ide> def test_valid_serializer(self):
<ide> serializer = self.Serializer(data={'char': 'abc', 'integer': 123})
<ide> assert serializer.is_valid()
<ide> assert serializer.validated_data == {'char': 'abc', 'integer': 123}
<add> assert serializer.data == {'char': 'abc', 'integer': 123}
<ide> assert serializer.errors == {}
<ide>
<ide> def test_invalid_serializer(self):
<ide> serializer = self.Serializer(data={'char': 'abc'})
<ide> assert not serializer.is_valid()
<ide> assert serializer.validated_data == {}
<add> assert serializer.data == {'char': 'abc'}
<ide> assert serializer.errors == {'integer': ['This field is required.']}
<ide>
<add> def test_invalid_datatype(self):
<add> serializer = self.Serializer(data=[{'char': 'abc'}])
<add> assert not serializer.is_valid()
<add> assert serializer.validated_data == {}
<add> assert serializer.data == {}
<add> assert serializer.errors == {'non_field_errors': ['Invalid data. Expected a dictionary, but got list.']}
<add>
<ide> def test_partial_validation(self):
<ide> serializer = self.Serializer(data={'char': 'abc'}, partial=True)
<ide> assert serializer.is_valid() | 3 |
Javascript | Javascript | fix the regression at 6073a03 | 3b136d26ff638b3a7603478459ef808e877874f5 | <ide><path>fonts.js
<ide> var Font = (function () {
<ide> }
<ide>
<ide> Fonts[name] = {
<del> data: file,
<add> data: data,
<ide> properties: properties,
<ide> loading: true,
<ide> cache: Object.create(null) | 1 |
Text | Text | remove extra block for `assert_changes` [ci skip] | e40c7031844d81379dd7fb530e52156b97df0f9c | <ide><path>guides/source/testing.md
<ide> Rails adds some custom assertions of its own to the `minitest` framework:
<ide> | --------------------------------------------------------------------------------- | ------- |
<ide> | [`assert_difference(expressions, difference = 1, message = nil) {...}`](http://api.rubyonrails.org/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_difference) | Test numeric difference between the return value of an expression as a result of what is evaluated in the yielded block.|
<ide> | [`assert_no_difference(expressions, message = nil, &block)`](http://api.rubyonrails.org/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_difference) | Asserts that the numeric result of evaluating an expression is not changed before and after invoking the passed in block.|
<del>| [`assert_changes(expressions, message = nil, from:, to:, &block) {...}`](http://api.rubyonrails.org/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes) | Test that the result of evaluating an expression is changed after invoking the passed in block.|
<add>| [`assert_changes(expressions, message = nil, from:, to:, &block)`](http://api.rubyonrails.org/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes) | Test that the result of evaluating an expression is changed after invoking the passed in block.|
<ide> | [`assert_no_changes(expressions, message = nil, &block)`](http://api.rubyonrails.org/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_changes) | Test the result of evaluating an expression is not changed after invoking the passed in block.|
<ide> | [`assert_nothing_raised { block }`](http://api.rubyonrails.org/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_nothing_raised) | Ensures that the given block doesn't raise any exceptions.|
<ide> | [`assert_recognizes(expected_options, path, extras={}, message=nil)`](http://api.rubyonrails.org/classes/ActionDispatch/Assertions/RoutingAssertions.html#method-i-assert_recognizes) | Asserts that the routing of the given path was handled correctly and that the parsed options (given in the expected_options hash) match path. Basically, it asserts that Rails recognizes the route given by expected_options.| | 1 |
Text | Text | fix broken link in `@next/font` docs | bbe7fddf3950122e7d9d116570e52766cd48c1e9 | <ide><path>docs/api-reference/next/font.md
<ide> import { greatVibes, sourceCodePro400 } from '@/fonts';
<ide> ## Next Steps
<ide>
<ide> <div class="card">
<del> <a href="/docs/optimizing/fonts.md">
<add> <a href="/docs/basic-features/font-optimization.md">
<ide> <b>Font Optmization</b>
<ide> <small>Learn how to optimize fonts with the Font module.</small>
<ide> </a> | 1 |
Text | Text | fix typo in builder.mb .dockerignore example | 9086c16f4283e330361ec9621781f6315fe3467f | <ide><path>docs/reference/builder.md
<ide> The following is an example `.dockerignore` file:
<ide> */*/temp*
<ide> temp?
<ide> *.md
<del> !LICENCSE.md
<add> !LICENSE.md
<ide> ```
<ide>
<ide> This file causes the following build behavior: | 1 |
Javascript | Javascript | add simple scrollview example to ui explorer | 169da2a1b7cedb0ab22a0f2c921c46cd0a86a3a3 | <ide><path>Examples/UIExplorer/ScrollViewSimpleExample.js
<add>/**
<add> * The examples provided by Facebook are for non-commercial testing and
<add> * evaluation purposes only.
<add> *
<add> * Facebook reserves all rights not expressly granted.
<add> *
<add> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
<add> * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
<add> * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
<add> * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
<add> * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
<add> * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<add> *
<add> * @flow
<add> */
<add>'use strict';
<add>
<add>var React = require('react-native');
<add>var {
<add> ScrollView,
<add> StyleSheet,
<add> Text,
<add> TouchableOpacity
<add>} = React;
<add>
<add>var NUM_ITEMS = 20;
<add>
<add>var ScrollViewSimpleExample = React.createClass({
<add> statics: {
<add> title: '<ScrollView>',
<add> description: 'Component that enables scrolling through child components.'
<add> },
<add> makeItems: function(nItems, styles) {
<add> var items = [];
<add> for (var i = 0; i < nItems; i++) {
<add> items[i] = (
<add> <TouchableOpacity key={i} style={styles}>
<add> <Text>{'Item ' + i}</Text>
<add> </TouchableOpacity>
<add> );
<add> }
<add> return items;
<add> },
<add>
<add> render: function() {
<add> // One of the items is a horizontal scroll view
<add> var items = this.makeItems(NUM_ITEMS, styles.itemWrapper);
<add> items[4] = (
<add> <ScrollView key={'scrollView'} horizontal={true}>
<add> {this.makeItems(NUM_ITEMS, [styles.itemWrapper, styles.horizontalItemWrapper])}
<add> </ScrollView>
<add> );
<add>
<add> var verticalScrollView = (
<add> <ScrollView style={styles.verticalScrollView}>
<add> {items}
<add> </ScrollView>
<add> );
<add>
<add> return verticalScrollView;
<add> }
<add>});
<add>
<add>var styles = StyleSheet.create({
<add> verticalScrollView: {
<add> margin: 10,
<add> },
<add> itemWrapper: {
<add> backgroundColor: '#dddddd',
<add> alignItems: 'center',
<add> borderRadius: 5,
<add> borderWidth: 5,
<add> borderColor: '#a52a2a',
<add> padding: 30,
<add> margin: 5,
<add> },
<add> horizontalItemWrapper: {
<add> padding: 50
<add> }
<add>});
<add>
<add>module.exports = ScrollViewSimpleExample; | 1 |
Python | Python | use var_list argument in tfoptimizer wrapper | 4185cbb50bfcae9cc30b0fc7b67e81d67a50a8ac | <ide><path>keras/optimizers.py
<ide> def __init__(self, optimizer):
<ide>
<ide> @interfaces.legacy_get_updates_support
<ide> def get_updates(self, loss, params):
<del> grads = self.optimizer.compute_gradients(loss, params)
<add> grads = self.optimizer.compute_gradients(loss, var_list=params)
<ide> self.updates = [K.update_add(self.iterations, 1)]
<ide> opt_update = self.optimizer.apply_gradients(
<ide> grads, global_step=self.iterations)
<ide><path>tests/keras/optimizers_test.py
<ide> def test_tfoptimizer():
<ide> optimizer.from_config(None)
<ide>
<ide>
<add>@pytest.mark.skipif((K.backend() != 'tensorflow'),
<add> reason='Requires TensorFlow backend')
<add>def test_tfoptimizer_pass_correct_named_params_to_native_tensorflow_optimizer():
<add> from keras import constraints
<add> from tensorflow import train
<add>
<add> class MyTfOptimizer(train.Optimizer):
<add> wrapping_optimizer = train.AdamOptimizer()
<add>
<add> def compute_gradients(self, loss, **kwargs):
<add> return super(MyTfOptimizer, self).compute_gradients(loss, **kwargs)
<add>
<add> def apply_gradients(self, grads_and_vars, **kwargs):
<add> return self.wrapping_optimizer.apply_gradients(grads_and_vars,
<add> **kwargs)
<add> my_tf_optimizer = MyTfOptimizer(use_locking=False, name='MyTfOptimizer')
<add> optimizer = optimizers.TFOptimizer(my_tf_optimizer)
<add> model = Sequential()
<add> model.add(Dense(num_classes, input_shape=(3,),
<add> kernel_constraint=constraints.MaxNorm(1)))
<add> model.compile(loss='mean_squared_error', optimizer=optimizer)
<add> model.fit(np.random.random((5, 3)), np.random.random((5, num_classes)),
<add> epochs=1, batch_size=5, verbose=0)
<add>
<add>
<ide> if __name__ == '__main__':
<ide> pytest.main([__file__]) | 2 |
Java | Java | remove unused methodmetadata#getmethodreturntype | 6d84f06d8c5f54422b797a8b434f3ca8ee7a91bd | <ide><path>org.springframework.core/src/main/java/org/springframework/core/type/MethodMetadata.java
<ide> public interface MethodMetadata {
<ide> */
<ide> String getMethodName();
<ide>
<del> /**
<del> * Return the fully-qualified name of the return type of the method.
<del> */
<del> String getMethodReturnType();
<del>
<ide> /**
<ide> * Return the fully-qualified name of the class that declares this method.
<ide> */
<ide><path>org.springframework.core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java
<ide> public final Method getIntrospectedMethod() {
<ide> public String getMethodName() {
<ide> return this.introspectedMethod.getName();
<ide> }
<del>
<del> public String getMethodReturnType() {
<del> return this.introspectedMethod.getReturnType().getName();
<del> }
<del>
<add>
<ide> public String getDeclaringClassName() {
<ide> return this.introspectedMethod.getDeclaringClass().getName();
<ide> }
<ide><path>org.springframework.core/src/main/java/org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor.java
<ide> public AnnotationMetadataReadingVisitor(ClassLoader classLoader) {
<ide>
<ide> @Override
<ide> public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
<del> return new MethodMetadataReadingVisitor(name, getReturnTypeFromAsmMethodDescriptor(desc), access, this.getClassName(), this.classLoader, this.methodMetadataMap);
<add> return new MethodMetadataReadingVisitor(name, access, this.getClassName(), this.classLoader, this.methodMetadataMap);
<ide> }
<ide>
<ide> @Override
<ide> public Set<MethodMetadata> getAnnotatedMethods(String annotationType) {
<ide> annotatedMethods.addAll(list);
<ide> return annotatedMethods;
<ide> }
<del>
<del> /**
<del> * Convert a type descriptor to a classname suitable for classloading with
<del> * Class.forName().
<del> *
<del> * @param typeDescriptor see ASM guide section 2.1.3
<del> */
<del> private static String convertAsmTypeDescriptorToClassName(String typeDescriptor) {
<del> final String internalName; // See ASM guide section 2.1.2
<del>
<del> if ("V".equals(typeDescriptor))
<del> return Void.class.getName();
<del> if ("I".equals(typeDescriptor))
<del> return Integer.class.getName();
<del> if ("Z".equals(typeDescriptor))
<del> return Boolean.class.getName();
<del>
<del> // strip the leading array/object/primitive identifier
<del> if (typeDescriptor.startsWith("[["))
<del> internalName = typeDescriptor.substring(3);
<del> else if (typeDescriptor.startsWith("["))
<del> internalName = typeDescriptor.substring(2);
<del> else
<del> internalName = typeDescriptor.substring(1);
<del>
<del> // convert slashes to dots
<del> String className = internalName.replace('/', '.');
<del>
<del> // and strip trailing semicolon (if present)
<del> if (className.endsWith(";"))
<del> className = className.substring(0, internalName.length() - 1);
<del>
<del> return className;
<del> }
<del>
<del> /**
<del> * @param methodDescriptor see ASM guide section 2.1.4
<del> */
<del> private static String getReturnTypeFromAsmMethodDescriptor(String methodDescriptor) {
<del> String returnTypeDescriptor = methodDescriptor.substring(methodDescriptor.indexOf(')') + 1);
<del> return convertAsmTypeDescriptorToClassName(returnTypeDescriptor);
<del> }
<del>
<ide> }
<ide><path>org.springframework.core/src/main/java/org/springframework/core/type/classreading/MethodMetadataReadingVisitor.java
<ide> final class MethodMetadataReadingVisitor extends MethodAdapter implements Method
<ide>
<ide> private final int access;
<ide>
<del> private String returnType;
<del>
<ide> private String declaringClassName;
<ide>
<ide> private final ClassLoader classLoader;
<ide> final class MethodMetadataReadingVisitor extends MethodAdapter implements Method
<ide>
<ide> private final Map<String, Map<String, Object>> attributeMap = new LinkedHashMap<String, Map<String, Object>>(2);
<ide>
<del> public MethodMetadataReadingVisitor(String name, String returnType, int access, String declaringClassName, ClassLoader classLoader,
<add> public MethodMetadataReadingVisitor(String name, int access, String declaringClassName, ClassLoader classLoader,
<ide> MultiValueMap<String, MethodMetadata> methodMetadataMap) {
<ide> super(new EmptyVisitor());
<ide> this.name = name;
<del> this.returnType = returnType;
<ide> this.access = access;
<ide> this.declaringClassName = declaringClassName;
<ide> this.classLoader = classLoader;
<ide> public String getMethodName() {
<ide> return this.name;
<ide> }
<ide>
<del> public String getMethodReturnType() {
<del> return this.returnType;
<del> }
<del>
<ide> public boolean isStatic() {
<ide> return ((this.access & Opcodes.ACC_STATIC) != 0);
<ide> } | 4 |
Python | Python | add batchnorm layer | bd27aa70ab64666ee7eb5901c81a08161e7135d7 | <ide><path>research/object_detection/models/faster_rcnn_resnet_v1_fpn_keras_feature_extractor.py
<ide> def get_box_classifier_feature_extractor_model(self, name=None):
<ide> feature_extractor_model = tf.keras.models.Sequential([
<ide> tf.keras.layers.Flatten(),
<ide> tf.keras.layers.Dense(units=1024, activation='relu'),
<add> self._conv_hyperparams.build_batch_norm(
<add> training=(self._is_training and not self._freeze_batchnorm)),
<ide> tf.keras.layers.Dense(units=1024, activation='relu'),
<ide> tf.keras.layers.Reshape((1, 1, 1024))
<ide> ]) | 1 |
Java | Java | restore use of flux-based encode method in http | df706f4c7cc2c577f44ddf02019dca98fccf5a72 | <ide><path>spring-core/src/main/java/org/springframework/core/codec/Decoder.java
<ide> /*
<del> * Copyright 2002-2019 the original author or authors.
<add> * Copyright 2002-2020 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this file except in compliance with the License.
<ide> Mono<T> decodeToMono(Publisher<DataBuffer> inputStream, ResolvableType elementTy
<ide> @Nullable MimeType mimeType, @Nullable Map<String, Object> hints);
<ide>
<ide> /**
<del> * Decode a data buffer to an Object of type T. This is useful when the input
<del> * stream consists of discrete messages (or events) and the content for each
<del> * can be decoded on its own.
<add> * Decode a data buffer to an Object of type T. This is useful for scenarios,
<add> * that distinct messages (or events) are decoded and handled individually,
<add> * in fully aggregated form.
<ide> * @param buffer the {@code DataBuffer} to decode
<ide> * @param targetType the expected output type
<ide> * @param mimeType the MIME type associated with the data
<ide><path>spring-core/src/main/java/org/springframework/core/codec/Encoder.java
<ide> /*
<del> * Copyright 2002-2018 the original author or authors.
<add> * Copyright 2002-2020 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this file except in compliance with the License.
<ide> Flux<DataBuffer> encode(Publisher<? extends T> inputStream, DataBufferFactory bu
<ide> ResolvableType elementType, @Nullable MimeType mimeType, @Nullable Map<String, Object> hints);
<ide>
<ide> /**
<del> * Encode an Object of type T to a data buffer. This is useful for scenarios
<del> * that produce a stream of discrete messages (or events) and the
<del> * content for each is encoded individually.
<add> * Encode an Object of type T to a data buffer. This is useful for scenarios,
<add> * that distinct messages (or events) are encoded and handled individually,
<add> * in fully aggregated form.
<ide> * <p>By default this method raises {@link UnsupportedOperationException}
<ide> * and it is expected that some encoders cannot produce a single buffer or
<ide> * cannot do so synchronously (e.g. encoding a {@code Resource}).
<ide><path>spring-web/src/main/java/org/springframework/http/codec/EncoderHttpMessageWriter.java
<ide> /*
<del> * Copyright 2002-2019 the original author or authors.
<add> * Copyright 2002-2020 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this file except in compliance with the License.
<ide> import org.springframework.core.codec.Encoder;
<ide> import org.springframework.core.codec.Hints;
<ide> import org.springframework.core.io.buffer.DataBuffer;
<del>import org.springframework.core.io.buffer.DataBufferFactory;
<ide> import org.springframework.core.io.buffer.PooledDataBuffer;
<ide> import org.springframework.http.HttpLogging;
<ide> import org.springframework.http.MediaType;
<ide> public Mono<Void> write(Publisher<? extends T> inputStream, ResolvableType eleme
<ide>
<ide> MediaType contentType = updateContentType(message, mediaType);
<ide>
<add> Flux<DataBuffer> body = this.encoder.encode(
<add> inputStream, message.bufferFactory(), elementType, contentType, hints);
<add>
<ide> if (inputStream instanceof Mono) {
<del> return Mono.from(inputStream)
<add> return body
<add> .singleOrEmpty()
<ide> .switchIfEmpty(Mono.defer(() -> {
<ide> message.getHeaders().setContentLength(0);
<ide> return message.setComplete().then(Mono.empty());
<ide> }))
<del> .flatMap(value -> {
<del> DataBufferFactory factory = message.bufferFactory();
<del> DataBuffer buffer = this.encoder.encodeValue(value, factory, elementType, contentType, hints);
<add> .flatMap(buffer -> {
<ide> message.getHeaders().setContentLength(buffer.readableByteCount());
<ide> return message.writeWith(Mono.just(buffer)
<ide> .doOnDiscard(PooledDataBuffer.class, PooledDataBuffer::release));
<ide> });
<ide> }
<ide>
<del> Flux<DataBuffer> body = this.encoder.encode(
<del> inputStream, message.bufferFactory(), elementType, contentType, hints);
<del>
<ide> if (isStreamingMediaType(contentType)) {
<ide> return message.writeAndFlushWith(body.map(buffer ->
<ide> Mono.just(buffer).doOnDiscard(PooledDataBuffer.class, PooledDataBuffer::release)));
<ide><path>spring-web/src/main/java/org/springframework/http/codec/ServerSentEventHttpMessageWriter.java
<ide> /*
<del> * Copyright 2002-2019 the original author or authors.
<add> * Copyright 2002-2020 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this file except in compliance with the License.
<ide>
<ide> import java.nio.charset.StandardCharsets;
<ide> import java.time.Duration;
<del>import java.util.ArrayList;
<add>import java.util.Arrays;
<ide> import java.util.Collections;
<ide> import java.util.List;
<ide> import java.util.Map;
<ide> public Mono<Void> write(Publisher<?> input, ResolvableType elementType, @Nullabl
<ide> }
<ide>
<ide> private Flux<Publisher<DataBuffer>> encode(Publisher<?> input, ResolvableType elementType,
<del> MediaType mediaType, DataBufferFactory bufferFactory, Map<String, Object> hints) {
<add> MediaType mediaType, DataBufferFactory factory, Map<String, Object> hints) {
<ide>
<ide> ResolvableType dataType = (ServerSentEvent.class.isAssignableFrom(elementType.toClass()) ?
<ide> elementType.getGeneric() : elementType);
<ide> private Flux<Publisher<DataBuffer>> encode(Publisher<?> input, ResolvableType el
<ide> sb.append("data:");
<ide> }
<ide>
<del> Mono<DataBuffer> bufferMono = Mono.fromCallable(() ->
<del> bufferFactory.join(encodeEvent(sb, data, dataType, mediaType, bufferFactory, hints)));
<add> Flux<DataBuffer> result;
<add> if (data == null) {
<add> result = Flux.just(encodeText(sb + "\n", mediaType, factory));
<add> }
<add> else if (data instanceof String) {
<add> data = StringUtils.replace((String) data, "\n", "\ndata:");
<add> result = Flux.just(encodeText(sb + (String) data + "\n\n", mediaType, factory));
<add> }
<add> else {
<add> result = encodeEvent(sb.toString(), data, dataType, mediaType, factory, hints);
<add> }
<ide>
<del> return bufferMono.doOnDiscard(PooledDataBuffer.class, DataBufferUtils::release);
<add> return result.doOnDiscard(PooledDataBuffer.class, DataBufferUtils::release);
<ide> });
<ide> }
<ide>
<add> @SuppressWarnings("unchecked")
<add> private <T> Flux<DataBuffer> encodeEvent(String eventContent, T data, ResolvableType dataType,
<add> MediaType mediaType, DataBufferFactory factory, Map<String, Object> hints) {
<add>
<add> if (this.encoder == null) {
<add> throw new CodecException("No SSE encoder configured and the data is not String.");
<add> }
<add> return Flux.just(factory.join(Arrays.asList(
<add> encodeText(eventContent, mediaType, factory),
<add> ((Encoder<T>) this.encoder).encodeValue(data, factory, dataType, mediaType, hints),
<add> encodeText("\n\n", mediaType, factory))));
<add> }
<add>
<ide> private void writeField(String fieldName, Object fieldValue, StringBuilder sb) {
<ide> sb.append(fieldName);
<ide> sb.append(':');
<ide> sb.append(fieldValue.toString());
<ide> sb.append("\n");
<ide> }
<ide>
<del> @SuppressWarnings("unchecked")
<del> private <T> List<DataBuffer> encodeEvent(CharSequence markup, @Nullable T data, ResolvableType dataType,
<del> MediaType mediaType, DataBufferFactory factory, Map<String, Object> hints) {
<del>
<del> List<DataBuffer> result = new ArrayList<>(4);
<del> result.add(encodeText(markup, mediaType, factory));
<del> if (data != null) {
<del> if (data instanceof String) {
<del> String dataLine = StringUtils.replace((String) data, "\n", "\ndata:") + "\n";
<del> result.add(encodeText(dataLine, mediaType, factory));
<del> }
<del> else if (this.encoder == null) {
<del> throw new CodecException("No SSE encoder configured and the data is not String.");
<del> }
<del> else {
<del> result.add(((Encoder<T>) this.encoder).encodeValue(data, factory, dataType, mediaType, hints));
<del> result.add(encodeText("\n", mediaType, factory));
<del> }
<del> }
<del> result.add(encodeText("\n", mediaType, factory));
<del> return result;
<del> }
<del>
<ide> private DataBuffer encodeText(CharSequence text, MediaType mediaType, DataBufferFactory bufferFactory) {
<ide> Assert.notNull(mediaType.getCharset(), "Expected MediaType with charset");
<ide> byte[] bytes = text.toString().getBytes(mediaType.getCharset());
<ide><path>spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java
<ide> /*
<del> * Copyright 2002-2019 the original author or authors.
<add> * Copyright 2002-2020 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this file except in compliance with the License.
<ide> void useHttpOutputMessageMediaType() {
<ide> void setContentLengthForMonoBody() {
<ide> DefaultDataBufferFactory factory = new DefaultDataBufferFactory();
<ide> DataBuffer buffer = factory.wrap("body".getBytes(StandardCharsets.UTF_8));
<del> configureEncoder(buffer, MimeTypeUtils.TEXT_PLAIN);
<add> configureEncoder(Flux.just(buffer), MimeTypeUtils.TEXT_PLAIN);
<ide> HttpMessageWriter<String> writer = new EncoderHttpMessageWriter<>(this.encoder);
<ide> writer.write(Mono.just("body"), forClass(String.class), TEXT_PLAIN, this.response, NO_HINTS).block();
<ide> | 5 |
PHP | PHP | apply fixes from styleci | 972e4928a9eec8be4f45bc9257ac8ebe1e2c5400 | <ide><path>src/Illuminate/Database/DatabaseManager.php
<ide> public function extend($name, callable $resolver)
<ide> */
<ide> public function forgetExtension($name)
<ide> {
<del> unset($this->extensions[$name]);
<add> unset($this->extensions[$name]);
<ide> }
<ide>
<ide> /** | 1 |
PHP | PHP | fix docblocks in collectiontrait | 2ccd417c7d5da0b1d9d040997f3671335b85e4da | <ide><path>src/Collection/CollectionTrait.php
<ide> public function reduce(callable $c, $zero) {
<ide> * ['Mark', 'Renan']
<ide> * }}}
<ide> *
<del> * @param string $path a dot separated string symbolizing the path to follow
<add> * @param string $matcher a dot separated string symbolizing the path to follow
<ide> * inside the hierarchy of each value so that the column can be extracted.
<ide> * @return \Cake\Collection\Iterator\ExtractIterator
<ide> */
<ide> public function extract($matcher) {
<ide> * echo $max->name;
<ide> * }}}
<ide> *
<del> * @param callable|string the callback or column name to use for sorting
<add> * @param callable|string $callback the callback or column name to use for sorting
<ide> * @param integer $type the type of comparison to perform, either SORT_STRING
<ide> * SORT_NUMERIC or SORT_NATURAL
<ide> * @see \Cake\Collection\Collection::sortBy()
<ide> public function max($callback, $type = SORT_NUMERIC) {
<ide> * }}}
<ide> *
<ide> *
<del> * @param callable|string the callback or column name to use for sorting
<add> * @param callable|string $callback the callback or column name to use for sorting
<ide> * @param integer $type the type of comparison to perform, either SORT_STRING
<ide> * SORT_NUMERIC or SORT_NATURAL
<ide> * @see \Cake\Collection\Collection::sortBy()
<ide> public function min($callback, $type = SORT_NUMERIC) {
<ide> * }
<ide> * }}}
<ide> *
<del> * @param callable|string the callback or column name to use for sorting
<add> * @param callable|string $callback the callback or column name to use for sorting
<ide> * @param integer $dir either SORT_DESC or SORT_ASC
<ide> * @param integer $type the type of comparison to perform, either SORT_STRING
<ide> * SORT_NUMERIC or SORT_NATURAL
<ide> public function sortBy($callback, $dir = SORT_DESC, $type = SORT_NUMERIC) {
<ide> * ];
<ide> * }}}
<ide> *
<del> * @param callable|string the callback or column name to use for grouping
<add> * @param callable|string $callback the callback or column name to use for grouping
<ide> * or a function returning the grouping key out of the provided element
<ide> * @return \Cake\Collection\Collection
<ide> */
<ide> public function groupBy($callback) {
<ide> * ];
<ide> * }}}
<ide> *
<del> * @param callable|string the callback or column name to use for indexing
<add> * @param callable|string $callback the callback or column name to use for indexing
<ide> * or a function returning the indexing key out of the provided element
<ide> * @return \Cake\Collection\Collection
<ide> */
<ide> public function indexBy($callback) {
<ide> * ];
<ide> * }}}
<ide> *
<del> * @param callable|string the callback or column name to use for indexing
<add> * @param callable|string $callback the callback or column name to use for indexing
<ide> * or a function returning the indexing key out of the provided element
<ide> * @return \Cake\Collection\Collection
<ide> */
<ide> public function first() {
<ide> * Returns a new collection as the result of concatenating the list of elements
<ide> * in this collection with the passed list of elements
<ide> *
<del> * @param array|\Traversable
<add> * @param array|\Traversable $items
<ide> * @return \Cake\Collection\Collection
<ide> */
<ide> public function append($items) { | 1 |
Ruby | Ruby | use update_columns to implemente the update_column | da84ccb6f04080d0f18f9bce35f773f193b1770b | <ide><path>activerecord/lib/active_record/persistence.rb
<ide> def becomes(klass)
<ide> became
<ide> end
<ide>
<del> # Updates a single attribute of an object, without calling save.
<del> #
<del> # * Validation is skipped.
<del> # * Callbacks are skipped.
<del> # * updated_at/updated_on column is not updated if that column is available.
<del> #
<del> # Raises an +ActiveRecordError+ when called on new objects, or when the +name+
<del> # attribute is marked as readonly.
<del> def update_column(name, value)
<del> name = name.to_s
<del> verify_readonly_attribute(name)
<del> raise ActiveRecordError, "can not update on a new record object" unless persisted?
<del> raw_write_attribute(name, value)
<del> self.class.where(self.class.primary_key => id).update_all(name => value) == 1
<del> end
<del>
<ide> # Updates the attributes of the model from the passed-in hash and saves the
<ide> # record, all wrapped in a transaction. If the object is invalid, the saving
<ide> # will fail and false will be returned.
<ide> def update_attributes!(attributes, options = {})
<ide> end
<ide> end
<ide>
<add> # Updates a single attribute of an object, without calling save.
<add> #
<add> # * Validation is skipped.
<add> # * Callbacks are skipped.
<add> # * updated_at/updated_on column is not updated if that column is available.
<add> #
<add> # Raises an +ActiveRecordError+ when called on new objects, or when the +name+
<add> # attribute is marked as readonly.
<add> def update_column(name, value)
<add> update_columns(name => value)
<add> end
<add>
<ide> # Updates the attributes from the passed-in hash, without calling save.
<ide> #
<ide> # * Validation is skipped.
<ide> def update_attributes!(attributes, options = {})
<ide> # one of the attributes is marked as readonly.
<ide> def update_columns(attributes)
<ide> raise ActiveRecordError, "can not update on a new record object" unless persisted?
<del> attributes.each_key {|key| raise ActiveRecordError, "#{key.to_s} is marked as readonly" if self.class.readonly_attributes.include?(key.to_s) }
<add>
<add> attributes.each_key do |key|
<add> raise ActiveRecordError, "#{key.to_s} is marked as readonly" if self.class.readonly_attributes.include?(key.to_s)
<add> end
<add>
<ide> attributes.each do |k,v|
<ide> raw_write_attribute(k,v)
<ide> end
<add>
<ide> self.class.where(self.class.primary_key => id).update_all(attributes) == 1
<ide> end
<ide>
<ide><path>activerecord/test/cases/persistence_test.rb
<ide> def test_update_columns
<ide> assert_equal "Sebastian Topic", topic.title
<ide> end
<ide>
<add> def test_update_columns_should_not_use_setter_method
<add> dev = Developer.find(1)
<add> dev.instance_eval { def salary=(value); write_attribute(:salary, value * 2); end }
<add>
<add> dev.update_columns(salary: 80000)
<add> assert_equal 80000, dev.salary
<add>
<add> dev.reload
<add> assert_equal 80000, dev.salary
<add> end
<add>
<ide> def test_update_columns_should_raise_exception_if_new_record
<ide> topic = Topic.new
<ide> assert_raises(ActiveRecord::ActiveRecordError) { topic.update_columns({ approved: false }) }
<ide> def test_update_columns_should_not_leave_the_object_dirty
<ide> assert_equal [], topic.changed
<ide> end
<ide>
<add> def test_update_columns_with_model_having_primary_key_other_than_id
<add> minivan = Minivan.find('m1')
<add> new_name = 'sebavan'
<add>
<add> minivan.update_columns(name: new_name)
<add> assert_equal new_name, minivan.name
<add> end
<add>
<ide> def test_update_columns_with_one_readonly_attribute
<ide> minivan = Minivan.find('m1')
<ide> prev_color = minivan.color
<ide> def test_update_columns_should_not_modify_updated_at
<ide> developer = Developer.find(1)
<ide> prev_month = Time.now.prev_month
<ide>
<del> developer.update_column(:updated_at, prev_month)
<add> developer.update_columns(updated_at: prev_month)
<ide> assert_equal prev_month, developer.updated_at
<ide>
<del> developer.update_columns({ salary: 80000 })
<add> developer.update_columns(salary: 80000)
<ide> assert_equal prev_month, developer.updated_at
<ide> assert_equal 80000, developer.salary
<ide>
<ide> def test_update_columns_should_not_modify_updated_at
<ide> assert_equal 80000, developer.salary
<ide> end
<ide>
<add> def test_update_columns_with_one_changed_and_one_updated
<add> t = Topic.order('id').limit(1).first
<add> author_name = t.author_name
<add> t.author_name = 'John'
<add> t.update_columns(title: 'super_title')
<add> assert_equal 'John', t.author_name
<add> assert_equal 'super_title', t.title
<add> assert t.changed?, "topic should have changed"
<add> assert t.author_name_changed?, "author_name should have changed"
<add>
<add> t.reload
<add> assert_equal author_name, t.author_name
<add> assert_equal 'super_title', t.title
<add> end
<add>
<ide> def test_update_attributes
<ide> topic = Topic.find(1)
<ide> assert !topic.approved? | 2 |
Text | Text | remove child selector from name attribute test | d9213b38cd15aba71d3eed06872be4e8b4a349a7 | <ide><path>curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-set-of-radio-buttons.english.md
<ide> tests:
<ide> - text: Your page should have two radio button elements.
<ide> testString: assert($('input[type="radio"]').length > 1, 'Your page should have two radio button elements.');
<ide> - text: Give your radio buttons the <code>name</code> attribute of <code>indoor-outdoor</code>.
<del> testString: assert($('label > input[type="radio"]').filter("[name='indoor-outdoor']").length > 1, 'Give your radio buttons the <code>name</code> attribute of <code>indoor-outdoor</code>.');
<add> testString: assert($('input[type="radio"]').filter("[name='indoor-outdoor']").length > 1, 'Give your radio buttons the <code>name</code> attribute of <code>indoor-outdoor</code>.');
<ide> - text: Each of your two radio button elements should be nested in its own <code>label</code> element.
<ide> testString: assert($('label > input[type="radio"]:only-child').length > 1, 'Each of your two radio button elements should be nested in its own <code>label</code> element.');
<ide> - text: Make sure each of your <code>label</code> elements has a closing tag. | 1 |
Python | Python | remove an unused import | 06ec0ec8dadf9e0e9f7518c9817b95f14df9d7be | <ide><path>numpy/array_api/__init__.py
<ide>
<ide> """
<ide>
<del>import sys
<del>
<ide> import warnings
<ide>
<ide> warnings.warn( | 1 |
PHP | PHP | add missing method documentation | 47ab01c0101d4bda3e11fe3699a9107a026dc2b5 | <ide><path>src/Illuminate/Support/Facades/Mail.php
<ide> * @method static void alwaysReplyTo(string $address, string|null $name = null)
<ide> * @method static void alwaysReturnPath(string $address)
<ide> * @method static void alwaysTo(string $address, string|null $name = null)
<add> * @method static \Illuminate\Mail\PendingMail cc($users)
<ide> * @method static \Illuminate\Mail\PendingMail bcc($users)
<ide> * @method static \Illuminate\Mail\PendingMail to($users)
<ide> * @method static \Illuminate\Support\Collection queued(string $mailable, \Closure|string $callback = null) | 1 |
Javascript | Javascript | use absolute public path in test | 68bdabea01f03e1d474e13d4d139eee64de2a9f5 | <ide><path>test/configCases/asset-url/target-node3/index.js
<ide> it("should handle import.meta.url in URL()", () => {
<del> const {href} = new URL("./index.css", import.meta.url);
<add> const { href } = new URL("./index.css", import.meta.url);
<ide>
<del> expect(href).toBe(
<del> process.platform === "win32"
<del> ? "file:///C:/index.css"
<del> : "file:///index.css"
<del> );
<add> expect(href).toBe("https://example.com/index.css");
<ide> });
<ide><path>test/configCases/asset-url/target-node3/webpack.config.js
<ide> module.exports = {
<ide> devtool: false,
<ide> output: {
<ide> assetModuleFilename: "[name][ext]",
<del> publicPath: "/"
<add> publicPath: "https://example.com/"
<ide> },
<ide> experiments: {
<ide> asset: true | 2 |
Ruby | Ruby | improve audit for `livecheck` in casks | 92b58666efaa469628fe72b4dbe5a8d741b74e51 | <ide><path>Library/Homebrew/cask/audit.rb
<ide> def run!
<ide> check_single_uninstall_zap
<ide> check_untrusted_pkg
<ide> check_hosting_with_appcast
<add> check_appcast_and_livecheck
<ide> check_latest_with_appcast_or_livecheck
<ide> check_latest_with_auto_updates
<ide> check_stanza_requires_uninstall
<ide> def check_sha256_invalid
<ide> add_error "cannot use the sha256 for an empty string: #{empty_sha256}"
<ide> end
<ide>
<add> def check_appcast_and_livecheck
<add> return unless cask.appcast
<add>
<add> add_error "Cask has a `livecheck`, the `appcast` should be removed." if cask.livecheckable?
<add> end
<add>
<ide> def check_latest_with_appcast_or_livecheck
<ide> return unless cask.version.latest?
<ide>
<del> add_error "Casks with an appcast should not use version :latest" if cask.appcast
<del> add_error "Casks with a livecheck should not use version :latest" if cask.livecheckable?
<add> add_error "Casks with an `appcast` should not use `version :latest`." if cask.appcast
<add> add_error "Casks with a `livecheck` should not use `version :latest`." if cask.livecheckable?
<ide> end
<ide>
<ide> def check_latest_with_auto_updates
<ide> return unless cask.version.latest?
<ide> return unless cask.auto_updates
<ide>
<del> add_error "Casks with `version :latest` should not use `auto_updates`"
<add> add_error "Casks with `version :latest` should not use `auto_updates`."
<ide> end
<ide>
<ide> def check_hosting_with_appcast
<ide><path>Library/Homebrew/test/cask/audit_spec.rb
<ide> def tmp_cask(name, text)
<ide> end
<ide>
<ide> describe "latest with appcast checks" do
<del> let(:message) { "Casks with an appcast should not use version :latest" }
<add> let(:message) { "Casks with an `appcast` should not use `version :latest`." }
<ide>
<ide> context "when the Cask is :latest and does not have an appcast" do
<ide> let(:cask_token) { "version-latest" }
<ide> def tmp_cask(name, text)
<ide> end
<ide>
<ide> describe "latest with auto_updates checks" do
<del> let(:message) { "Casks with `version :latest` should not use `auto_updates`" }
<add> let(:message) { "Casks with `version :latest` should not use `auto_updates`." }
<ide>
<ide> context "when the Cask is :latest and does not have auto_updates" do
<ide> let(:cask_token) { "version-latest" } | 2 |
Javascript | Javascript | use mustcall() in pummel test | 3b130327fa96cda42fed581df7c763acbf706a13 | <ide><path>test/pummel/test-net-connect-econnrefused.js
<ide> function pummel() {
<ide> }
<ide>
<ide> function check() {
<del> setTimeout(function() {
<add> setTimeout(common.mustCall(function() {
<ide> assert.strictEqual(process._getActiveRequests().length, 0);
<ide> const activeHandles = process._getActiveHandles();
<ide> assert.ok(activeHandles.every((val) => val.constructor.name !== 'Socket'));
<del> check_called = true;
<del> }, 0);
<add> }), 0);
<ide> }
<del>let check_called = false;
<ide>
<ide> process.on('exit', function() {
<ide> assert.strictEqual(rounds, ROUNDS);
<ide> assert.strictEqual(reqs, ROUNDS * ATTEMPTS_PER_ROUND);
<del> assert(check_called);
<ide> }); | 1 |
Python | Python | fix issue with c compiler args containing spaces | 7dcf62379f41407d8f9583d1c2016e3d8ec48384 | <ide><path>numpy/distutils/unixccompiler.py
<ide> import os
<ide> import sys
<ide> import subprocess
<add>import shlex
<ide>
<ide> from distutils.errors import CompileError, DistutilsExecError, LibError
<ide> from distutils.unixccompiler import UnixCCompiler
<ide> def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts
<ide> if 'OPT' in os.environ:
<ide> # XXX who uses this?
<ide> from sysconfig import get_config_vars
<del> opt = " ".join(os.environ['OPT'].split())
<del> gcv_opt = " ".join(get_config_vars('OPT')[0].split())
<del> ccomp_s = " ".join(self.compiler_so)
<add> opt = shlex.join(shlex.split(os.environ['OPT']))
<add> gcv_opt = shlex.join(shlex.split(get_config_vars('OPT')[0]))
<add> ccomp_s = shlex.join(self.compiler_so)
<ide> if opt not in ccomp_s:
<ide> ccomp_s = ccomp_s.replace(gcv_opt, opt)
<del> self.compiler_so = ccomp_s.split()
<del> llink_s = " ".join(self.linker_so)
<add> self.compiler_so = shlex.split(ccomp_s)
<add> llink_s = shlex.join(self.linker_so)
<ide> if opt not in llink_s:
<del> self.linker_so = llink_s.split() + opt.split()
<add> self.linker_so = self.linker_so + shlex.split(opt)
<ide>
<ide> display = '%s: %s' % (os.path.basename(self.compiler_so[0]), src)
<ide> | 1 |
Javascript | Javascript | update meshopt_decoder module to latest | 3e7149ad244e5a5045f279d19661e21085da3aff | <ide><path>examples/js/libs/meshopt_decoder.js
<ide> // This file is part of meshoptimizer library and is distributed under the terms of MIT License.
<del>// Copyright (C) 2016-2020, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
<add>// Copyright (C) 2016-2022, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
<ide> var MeshoptDecoder = (function() {
<ide> "use strict";
<ide>
<del> // Built with clang version 11.0.0 (https://github.com/llvm/llvm-project.git 0160ad802e899c2922bc9b29564080c22eb0908c)
<del> // Built from meshoptimizer 0.14
<del> var wasm_base = "B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9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rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB";
<add> // Built with clang version 14.0.4
<add> // Built from meshoptimizer 0.18
<add> var wasm_base = "b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb";
<add> var wasm_simd = "b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbb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adfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb";
<ide>
<del> // Uses bulk-memory and simd extensions
<ide> var detector = new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]);
<del>
<del> // Used to unpack wasm
<del> var wasmpack = new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);
<add> var wasmpack = new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);
<ide>
<ide> if (typeof WebAssembly !== 'object') {
<del> // This module requires WebAssembly to function
<ide> return {
<ide> supported: false,
<ide> };
<ide> }
<ide>
<del> var wasm = wasm_base;
<del>
<del> if (WebAssembly.validate(detector)) {
<del> wasm = wasm_simd;
<del> console.log("Warning: meshopt_decoder is using experimental SIMD support");
<del> }
<add> var wasm = WebAssembly.validate(detector) ? wasm_simd : wasm_base;
<ide>
<ide> var instance;
<ide>
<del> var promise =
<add> var ready =
<ide> WebAssembly.instantiate(unpack(wasm), {})
<ide> .then(function(result) {
<ide> instance = result.instance;
<ide> var MeshoptDecoder = (function() {
<ide> var result = new Uint8Array(data.length);
<ide> for (var i = 0; i < data.length; ++i) {
<ide> var ch = data.charCodeAt(i);
<del> result[i] = ch > 96 ? ch - 71 : ch > 64 ? ch - 65 : ch > 47 ? ch + 4 : ch > 46 ? 63 : 62;
<add> result[i] = ch > 96 ? ch - 97 : ch > 64 ? ch - 39 : ch + 4;
<ide> }
<ide> var write = 0;
<ide> for (var i = 0; i < data.length; ++i) {
<ide> var MeshoptDecoder = (function() {
<ide>
<ide> function decode(fun, target, count, size, source, filter) {
<ide> var sbrk = instance.exports.sbrk;
<del> var count4 = (count + 3) & ~3; // pad for SIMD filter
<add> var count4 = (count + 3) & ~3;
<ide> var tp = sbrk(count4 * size);
<ide> var sp = sbrk(source.length);
<ide> var heap = new Uint8Array(instance.exports.memory.buffer);
<ide> var MeshoptDecoder = (function() {
<ide> if (res != 0) {
<ide> throw new Error("Malformed buffer data: " + res);
<ide> }
<del> };
<add> }
<ide>
<ide> var filters = {
<del> // legacy index-based enums for glTF
<del> 0: "",
<del> 1: "meshopt_decodeFilterOct",
<del> 2: "meshopt_decodeFilterQuat",
<del> 3: "meshopt_decodeFilterExp",
<del> // string-based enums for glTF
<ide> NONE: "",
<ide> OCTAHEDRAL: "meshopt_decodeFilterOct",
<ide> QUATERNION: "meshopt_decodeFilterQuat",
<ide> EXPONENTIAL: "meshopt_decodeFilterExp",
<ide> };
<ide>
<ide> var decoders = {
<del> // legacy index-based enums for glTF
<del> 0: "meshopt_decodeVertexBuffer",
<del> 1: "meshopt_decodeIndexBuffer",
<del> 2: "meshopt_decodeIndexSequence",
<del> // string-based enums for glTF
<ide> ATTRIBUTES: "meshopt_decodeVertexBuffer",
<ide> TRIANGLES: "meshopt_decodeIndexBuffer",
<ide> INDICES: "meshopt_decodeIndexSequence",
<ide> };
<ide>
<add> var workers = [];
<add> var requestId = 0;
<add>
<add> function createWorker(url) {
<add> var worker = {
<add> object: new Worker(url),
<add> pending: 0,
<add> requests: {}
<add> };
<add>
<add> worker.object.onmessage = function(event) {
<add> var data = event.data;
<add>
<add> worker.pending -= data.count;
<add> worker.requests[data.id][data.action](data.value);
<add>
<add> delete worker.requests[data.id];
<add> };
<add>
<add> return worker;
<add> }
<add>
<add> function initWorkers(count) {
<add> var source =
<add> "var instance; var ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(unpack(wasm)) + "]), {})" +
<add> ".then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });" +
<add> "self.onmessage = workerProcess;" +
<add> decode.toString() + workerProcess.toString();
<add>
<add> var blob = new Blob([source], {type: 'text/javascript'});
<add> var url = URL.createObjectURL(blob);
<add>
<add> for (var i = 0; i < count; ++i) {
<add> workers[i] = createWorker(url);
<add> }
<add>
<add> URL.revokeObjectURL(url);
<add> }
<add>
<add> function decodeWorker(count, size, source, mode, filter) {
<add> var worker = workers[0];
<add>
<add> for (var i = 1; i < workers.length; ++i) {
<add> if (workers[i].pending < worker.pending) {
<add> worker = workers[i];
<add> }
<add> }
<add>
<add> return new Promise(function (resolve, reject) {
<add> var data = new Uint8Array(source);
<add> var id = requestId++;
<add>
<add> worker.pending += count;
<add> worker.requests[id] = { resolve: resolve, reject: reject };
<add> worker.object.postMessage({ id: id, count: count, size: size, source: data, mode: mode, filter: filter }, [ data.buffer ]);
<add> });
<add> }
<add>
<add> function workerProcess(event) {
<add> ready.then(function() {
<add> var data = event.data;
<add> try {
<add> var target = new Uint8Array(data.count * data.size);
<add> decode(instance.exports[data.mode], target, data.count, data.size, data.source, instance.exports[data.filter]);
<add> self.postMessage({ id: data.id, count: data.count, action: "resolve", value: target }, [ target.buffer ]);
<add> } catch (error) {
<add> self.postMessage({ id: data.id, count: data.count, action: "reject", value: error });
<add> }
<add> });
<add> }
<add>
<ide> return {
<del> ready: promise,
<add> ready: ready,
<ide> supported: true,
<add> useWorkers: function(count) {
<add> initWorkers(count);
<add> },
<ide> decodeVertexBuffer: function(target, count, size, source, filter) {
<ide> decode(instance.exports.meshopt_decodeVertexBuffer, target, count, size, source, instance.exports[filters[filter]]);
<ide> },
<ide> var MeshoptDecoder = (function() {
<ide> },
<ide> decodeGltfBuffer: function(target, count, size, source, mode, filter) {
<ide> decode(instance.exports[decoders[mode]], target, count, size, source, instance.exports[filters[filter]]);
<add> },
<add> decodeGltfBufferAsync: function(count, size, source, mode, filter) {
<add> if (workers.length > 0) {
<add> return decodeWorker(count, size, source, decoders[mode], filters[filter]);
<add> }
<add>
<add> return ready.then(function() {
<add> var target = new Uint8Array(count * size);
<add> decode(instance.exports[decoders[mode]], target, count, size, source, instance.exports[filters[filter]]);
<add> return target;
<add> });
<ide> }
<ide> };
<ide> })();
<ide>
<add>// UMD-style export
<ide> if (typeof exports === 'object' && typeof module === 'object')
<ide> module.exports = MeshoptDecoder;
<ide> else if (typeof define === 'function' && define['amd'])
<ide><path>examples/jsm/libs/meshopt_decoder.module.js
<ide> // This file is part of meshoptimizer library and is distributed under the terms of MIT License.
<del>// Copyright (C) 2016-2020, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
<add>// Copyright (C) 2016-2022, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
<ide> var MeshoptDecoder = (function() {
<ide> "use strict";
<ide>
<del> // Built with clang version 11.0.0 (https://github.com/llvm/llvm-project.git 0160ad802e899c2922bc9b29564080c22eb0908c)
<del> // Built from meshoptimizer 0.14
<del> var wasm_base = "B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJA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RIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB";
<add> // Built with clang version 14.0.4
<add> // Built from meshoptimizer 0.18
<add> var wasm_base = "b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb";
<add> var wasm_simd = "b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAci6hHalhOaAcefgohAaoclSmdxekkcbhlaHceGmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb";
<ide>
<del> // Uses bulk-memory and simd extensions
<ide> var detector = new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]);
<del>
<del> // Used to unpack wasm
<del> var wasmpack = new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);
<add> var wasmpack = new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);
<ide>
<ide> if (typeof WebAssembly !== 'object') {
<del> // This module requires WebAssembly to function
<ide> return {
<ide> supported: false,
<ide> };
<ide> }
<ide>
<del> var wasm = wasm_base;
<del>
<del> if (WebAssembly.validate(detector)) {
<del> wasm = wasm_simd;
<del> console.log("Warning: meshopt_decoder is using experimental SIMD support");
<del> }
<add> var wasm = WebAssembly.validate(detector) ? wasm_simd : wasm_base;
<ide>
<ide> var instance;
<ide>
<del> var promise =
<add> var ready =
<ide> WebAssembly.instantiate(unpack(wasm), {})
<ide> .then(function(result) {
<ide> instance = result.instance;
<ide> var MeshoptDecoder = (function() {
<ide> var result = new Uint8Array(data.length);
<ide> for (var i = 0; i < data.length; ++i) {
<ide> var ch = data.charCodeAt(i);
<del> result[i] = ch > 96 ? ch - 71 : ch > 64 ? ch - 65 : ch > 47 ? ch + 4 : ch > 46 ? 63 : 62;
<add> result[i] = ch > 96 ? ch - 97 : ch > 64 ? ch - 39 : ch + 4;
<ide> }
<ide> var write = 0;
<ide> for (var i = 0; i < data.length; ++i) {
<ide> var MeshoptDecoder = (function() {
<ide>
<ide> function decode(fun, target, count, size, source, filter) {
<ide> var sbrk = instance.exports.sbrk;
<del> var count4 = (count + 3) & ~3; // pad for SIMD filter
<add> var count4 = (count + 3) & ~3;
<ide> var tp = sbrk(count4 * size);
<ide> var sp = sbrk(source.length);
<ide> var heap = new Uint8Array(instance.exports.memory.buffer);
<ide> var MeshoptDecoder = (function() {
<ide> if (res != 0) {
<ide> throw new Error("Malformed buffer data: " + res);
<ide> }
<del> };
<add> }
<ide>
<ide> var filters = {
<del> // legacy index-based enums for glTF
<del> 0: "",
<del> 1: "meshopt_decodeFilterOct",
<del> 2: "meshopt_decodeFilterQuat",
<del> 3: "meshopt_decodeFilterExp",
<del> // string-based enums for glTF
<ide> NONE: "",
<ide> OCTAHEDRAL: "meshopt_decodeFilterOct",
<ide> QUATERNION: "meshopt_decodeFilterQuat",
<ide> EXPONENTIAL: "meshopt_decodeFilterExp",
<ide> };
<ide>
<ide> var decoders = {
<del> // legacy index-based enums for glTF
<del> 0: "meshopt_decodeVertexBuffer",
<del> 1: "meshopt_decodeIndexBuffer",
<del> 2: "meshopt_decodeIndexSequence",
<del> // string-based enums for glTF
<ide> ATTRIBUTES: "meshopt_decodeVertexBuffer",
<ide> TRIANGLES: "meshopt_decodeIndexBuffer",
<ide> INDICES: "meshopt_decodeIndexSequence",
<ide> };
<ide>
<add> var workers = [];
<add> var requestId = 0;
<add>
<add> function createWorker(url) {
<add> var worker = {
<add> object: new Worker(url),
<add> pending: 0,
<add> requests: {}
<add> };
<add>
<add> worker.object.onmessage = function(event) {
<add> var data = event.data;
<add>
<add> worker.pending -= data.count;
<add> worker.requests[data.id][data.action](data.value);
<add>
<add> delete worker.requests[data.id];
<add> };
<add>
<add> return worker;
<add> }
<add>
<add> function initWorkers(count) {
<add> var source =
<add> "var instance; var ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(unpack(wasm)) + "]), {})" +
<add> ".then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });" +
<add> "self.onmessage = workerProcess;" +
<add> decode.toString() + workerProcess.toString();
<add>
<add> var blob = new Blob([source], {type: 'text/javascript'});
<add> var url = URL.createObjectURL(blob);
<add>
<add> for (var i = 0; i < count; ++i) {
<add> workers[i] = createWorker(url);
<add> }
<add>
<add> URL.revokeObjectURL(url);
<add> }
<add>
<add> function decodeWorker(count, size, source, mode, filter) {
<add> var worker = workers[0];
<add>
<add> for (var i = 1; i < workers.length; ++i) {
<add> if (workers[i].pending < worker.pending) {
<add> worker = workers[i];
<add> }
<add> }
<add>
<add> return new Promise(function (resolve, reject) {
<add> var data = new Uint8Array(source);
<add> var id = requestId++;
<add>
<add> worker.pending += count;
<add> worker.requests[id] = { resolve: resolve, reject: reject };
<add> worker.object.postMessage({ id: id, count: count, size: size, source: data, mode: mode, filter: filter }, [ data.buffer ]);
<add> });
<add> }
<add>
<add> function workerProcess(event) {
<add> ready.then(function() {
<add> var data = event.data;
<add> try {
<add> var target = new Uint8Array(data.count * data.size);
<add> decode(instance.exports[data.mode], target, data.count, data.size, data.source, instance.exports[data.filter]);
<add> self.postMessage({ id: data.id, count: data.count, action: "resolve", value: target }, [ target.buffer ]);
<add> } catch (error) {
<add> self.postMessage({ id: data.id, count: data.count, action: "reject", value: error });
<add> }
<add> });
<add> }
<add>
<ide> return {
<del> ready: promise,
<add> ready: ready,
<ide> supported: true,
<add> useWorkers: function(count) {
<add> initWorkers(count);
<add> },
<ide> decodeVertexBuffer: function(target, count, size, source, filter) {
<ide> decode(instance.exports.meshopt_decodeVertexBuffer, target, count, size, source, instance.exports[filters[filter]]);
<ide> },
<ide> var MeshoptDecoder = (function() {
<ide> },
<ide> decodeGltfBuffer: function(target, count, size, source, mode, filter) {
<ide> decode(instance.exports[decoders[mode]], target, count, size, source, instance.exports[filters[filter]]);
<add> },
<add> decodeGltfBufferAsync: function(count, size, source, mode, filter) {
<add> if (workers.length > 0) {
<add> return decodeWorker(count, size, source, decoders[mode], filters[filter]);
<add> }
<add>
<add> return ready.then(function() {
<add> var target = new Uint8Array(count * size);
<add> decode(instance.exports[decoders[mode]], target, count, size, source, instance.exports[filters[filter]]);
<add> return target;
<add> });
<ide> }
<ide> };
<ide> })(); | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.