Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft's license banner in transition/indes.js file #8013

Open
tborychowski opened this issue Nov 10, 2022 · 3 comments · Fixed by #8015
Open

Microsoft's license banner in transition/indes.js file #8013

tborychowski opened this issue Nov 10, 2022 · 3 comments · Fixed by #8015

Comments

@tborychowski
Copy link

tborychowski commented Nov 10, 2022

Describe the bug

I'd like to know why there is a Microsoft's license banner/comment in svelte/transition code (prod version available in npm registry).

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var easing = require('../easing/index.js');
var internal = require('../internal/index.js');

/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

...

Reproduction

  1. Open node_modules/svelte/transition/index.js
  2. See

Logs

No response

System Info

Irrelevant

Severity

annoyance

@gtm-nayan
Copy link
Contributor

If you look at the code that follows, that's coming from
https://github.com/microsoft/tslib/blob/8acd4b30d375be8c43144b9ee0b3c98599e7a9a1/tslib.js#L85

because we're using ... here which is not supported in older javascript engines, so typescript transpiles it to a function call to __rest.

The next version of tslib makes the comment omittable.

@Conduitry
Copy link
Member

Bumping tslib doesn't seem to have worked @gtm-nayan - I see the comment is now no longer marked as required (https://unpkg.com/svelte@3.52.0/transition/index.js vs https://unpkg.com/svelte@3.53.0/transition/index.js - and this actually changed in the previous released version of Svelte, not the one that included your #8015), but it's still there in the bundle.

@Conduitry Conduitry reopened this Nov 10, 2022
@gtm-nayan
Copy link
Contributor

Ahh, right, is it some rollup thing then that keeps the comments or looks for the word Copyright in there?

As long as it's not marked with a /*! then any decent minifier would remove it in production builds, and if it doesn't affect the bundle size the comment being there doesn't really hurt anyone. So I think we can close it either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants