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

Collection of small fixes #2994

Merged
merged 7 commits into from
Jun 16, 2019
Merged

Collection of small fixes #2994

merged 7 commits into from
Jun 16, 2019

Conversation

mrkishi
Copy link
Member

@mrkishi mrkishi commented Jun 10, 2019

I've been opening too many little PRs and these would have to be another 7... Instead, let me know if any of these are undesirable and I'll rebase them out!

  • Removed some files that slipped in and got committed when they shouldn't, 219dd13.

  • Removed long unused (and broken!) .flowconfig file, 6034df7.

  • Pinned @types/node: it was at v10, even though we support v8, 43f5680.

  • Pointed the types field to declaration files, 616e1eb. Typescript expects it to be a file and doesn't treat it as an entrypoint for .d.ts files, instead resorting to normal module resolution:

    master> npx typescript --traceResolution
      ======== Resolving module 'svelte' from '/tests/svelte/template/src/main.ts'. ========
      Explicitly specified module resolution kind: 'NodeJs'.
      Loading module 'svelte' from 'node_modules' folder, target file type 'TypeScript'.
      Directory '/tests/svelte/template/src/node_modules' does not exist, skipping all lookups in it.
      Found 'package.json' at '/tests/svelte/template/node_modules/svelte/package.json'.
      'package.json' does not have a 'typesVersions' field.
      File '/tests/svelte/template/node_modules/svelte.ts' does not exist.
      File '/tests/svelte/template/node_modules/svelte.tsx' does not exist.
      File '/tests/svelte/template/node_modules/svelte.d.ts' does not exist.
      'package.json' does not have a 'typings' field.
      'package.json' has 'types' field 'types/runtime' that references '/tests/svelte/template/node_modules/svelte/types/runtime'.
      File '/tests/svelte/template/node_modules/svelte/types/runtime' does not exist.
      Loading module as file / folder, candidate module location '/tests/svelte/template/node_modules/svelte/types/runtime', target file type 'TypeScript'.
      File '/tests/svelte/template/node_modules/svelte/types/runtime.ts' does not exist.
      File '/tests/svelte/template/node_modules/svelte/types/runtime.tsx' does not exist.
      File '/tests/svelte/template/node_modules/svelte/types/runtime.d.ts' does not exist.
      File '/tests/svelte/template/node_modules/svelte/types/runtime/index.ts' does not exist.
      File '/tests/svelte/template/node_modules/svelte/types/runtime/index.tsx' does not exist.
      File '/tests/svelte/template/node_modules/svelte/types/runtime/index.d.ts' exist - use it as a name resolution result.
      Resolving real path for '/tests/svelte/template/node_modules/svelte/types/runtime/index.d.ts', result '/tests/svelte/template/node_modules/svelte/types/runtime/index.d.ts'.
      ======== Module name 'svelte' was successfully resolved to '/tests/svelte/template/node_modules/svelte/types/runtime/index.d.ts' with Package ID 'svelte/types/runtime/index.d.ts@3.5.1'. ========
      -
      ======== Resolving module 'svelte/motion' from '/tests/svelte/template/src/main.ts'. ========
      Explicitly specified module resolution kind: 'NodeJs'.
      Loading module 'svelte/motion' from 'node_modules' folder, target file type 'TypeScript'.
      Directory '/tests/svelte/template/src/node_modules' does not exist, skipping all lookups in it.
      Found 'package.json' at '/tests/svelte/template/node_modules/svelte/motion/package.json'.
      'package.json' does not have a 'typesVersions' field.
      File '/tests/svelte/template/node_modules/svelte/motion.ts' does not exist.
      File '/tests/svelte/template/node_modules/svelte/motion.tsx' does not exist.
      File '/tests/svelte/template/node_modules/svelte/motion.d.ts' does not exist.
      'package.json' does not have a 'typings' field.
      'package.json' does not have a 'types' field.
      'package.json' has 'main' field './index' that references '/tests/svelte/template/node_modules/svelte/motion/index'.
      File '/tests/svelte/template/node_modules/svelte/motion/index' does not exist.
      Loading module as file / folder, candidate module location '/tests/svelte/template/node_modules/svelte/motion/index', target file type 'TypeScript'.
      File '/tests/svelte/template/node_modules/svelte/motion/index.ts' does not exist.
      File '/tests/svelte/template/node_modules/svelte/motion/index.tsx' does not exist.
      File '/tests/svelte/template/node_modules/svelte/motion/index.d.ts' exist - use it as a name resolution result.
      Resolving real path for '/tests/svelte/template/node_modules/svelte/motion/index.d.ts', result '/tests/svelte/template/node_modules/svelte/motion/index.d.ts'.
      ======== Module name 'svelte/motion' was successfully resolved to '/tests/svelte/template/node_modules/svelte/motion/index.d.ts'. ========
      
    pr> npx typescript --traceResolution
      ======== Resolving module 'svelte' from '/tests/svelte/template/src/main.ts'. ========
      Explicitly specified module resolution kind: 'NodeJs'.
      Loading module 'svelte' from 'node_modules' folder, target file type 'TypeScript'.
      Directory '/tests/svelte/template/src/node_modules' does not exist, skipping all lookups in it.
      Found 'package.json' at '/tests/svelte/template/node_modules/svelte/package.json'.
      'package.json' does not have a 'typesVersions' field.
      File '/tests/svelte/template/node_modules/svelte.ts' does not exist.
      File '/tests/svelte/template/node_modules/svelte.tsx' does not exist.
      File '/tests/svelte/template/node_modules/svelte.d.ts' does not exist.
      'package.json' does not have a 'typings' field.
      'package.json' has 'types' field 'types/runtime/index.d.ts' that references '/tests/svelte/template/node_modules/svelte/types/runtime/index.d.ts'.
      File '/tests/svelte/template/node_modules/svelte/types/runtime/index.d.ts' exist - use it as a name resolution result.
      Resolving real path for '/tests/svelte/template/node_modules/svelte/types/runtime/index.d.ts', result '/tests/svelte/template/node_modules/svelte/types/runtime/index.d.ts'.
      ======== Module name 'svelte' was successfully resolved to '/tests/svelte/template/node_modules/svelte/types/runtime/index.d.ts' with Package ID 'svelte/types/runtime/index.d.ts@3.5.1'. ========
      -
      ======== Resolving module 'svelte/motion' from '/tests/svelte/template/src/main.ts'. ========
      Explicitly specified module resolution kind: 'NodeJs'.
      Loading module 'svelte/motion' from 'node_modules' folder, target file type 'TypeScript'.
      Directory '/tests/svelte/template/src/node_modules' does not exist, skipping all lookups in it.
      Found 'package.json' at '/tests/svelte/template/node_modules/svelte/motion/package.json'.
      'package.json' does not have a 'typesVersions' field.
      File '/tests/svelte/template/node_modules/svelte/motion.ts' does not exist.
      File '/tests/svelte/template/node_modules/svelte/motion.tsx' does not exist.
      File '/tests/svelte/template/node_modules/svelte/motion.d.ts' does not exist.
      'package.json' does not have a 'typings' field.
      'package.json' has 'types' field './index.d.ts' that references '/tests/svelte/template/node_modules/svelte/motion/index.d.ts'.
      File '/tests/svelte/template/node_modules/svelte/motion/index.d.ts' exist - use it as a name resolution result.
      Resolving real path for '/tests/svelte/template/node_modules/svelte/motion/index.d.ts', result '/tests/svelte/template/node_modules/svelte/motion/index.d.ts'.
      ======== Module name 'svelte/motion' was successfully resolved to '/tests/svelte/template/node_modules/svelte/motion/index.d.ts'. ========
      
  • Moved the sub-packages stub creation to build as per @Conduitry's plead, 2695d76.

  • Split tsconfig.json into multiple projects: compiler, runtime and test. Each of these have different libraries and environments, so we can be more selective in what typescript provides them, 29b5218.

  • Forced git to use unix line endings since tests fail on Windows otherwise, see Test suite passes on Mac, fails on Windows #2817, a08576f.

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@paulocoghi
Copy link
Contributor

👏 👏 👏

@mrkishi mrkishi force-pushed the cleanup branch 2 times, most recently from 336cd34 to 36cae1f Compare June 13, 2019 07:01
rollup.config.js Show resolved Hide resolved
@Conduitry
Copy link
Member

create-stubs.js has also been updated on master in the meantime. I think that change is reflected in whatever your corresponding mechanism is for that in this PR, but please make sure.

@mrkishi
Copy link
Member Author

mrkishi commented Jun 16, 2019

Yeah, the create-stubs is reflected, but I need to rebase 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 this pull request may close these issues.

3 participants