Skip to content

Commit

Permalink
18.0.0 (#1395)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Mar 28, 2023
1 parent b4ce145 commit 069ea9a
Show file tree
Hide file tree
Showing 37 changed files with 2,112 additions and 14,868 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: CI

on: [push, pull_request]
on:
pull_request:
branches:
- latest
push:
branches:
- latest
tags:
- '*'

jobs:
build:
Expand All @@ -16,15 +24,14 @@ jobs:
- name: Build
run: |
npm ci
npm run bootstrap
npm run build
npx lerna run ensure-no-project-compile-errors
npm run --workspaces build
npm run --workspaces --if-present ensure-no-project-compile-errors
- name: Test
run: |
npx lerna run test:ci
npx lerna run test:ts-versions
npm run --workspaces --if-present test:ci
npm run --workspaces --if-present test:ts-versions
- name: Deno Test
run: deno test --allow-read deno
- name: Code Verification
run: |
npx lerna run code-verification
npm run --workspaces --if-present code-verification
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"prettier.enable": false
"prettier.enable": false,
"deno.enablePaths": [
"deno",
"packages/bootstrap/scripts/",
"packages/common/scripts/",
"packages/scripts/",
"packages/ts-morph/scripts/"
]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017-2022 David Sherret
Copyright (c) 2017-2023 David Sherret

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion deno/basic_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "https://deno.land/std@0.140.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.181.0/testing/asserts.ts";
import { Project } from "./mod.ts";

// todo: Eventually all tests run for the node package should also be run for Deno
Expand Down
2 changes: 1 addition & 1 deletion deno/bootstrap/basic_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "https://deno.land/std@0.140.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.181.0/testing/asserts.ts";
import { createProjectSync } from "./mod.ts";

// todo: Eventually all tests run for the node package should also be run for Deno
Expand Down
2 changes: 1 addition & 1 deletion deno/bootstrap/ts_morph_bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class Project {
fileGlobs = [fileGlobs];
const sourceFilePromises = [];
const sourceFiles = [];
for await (const filePath of this._fileSystemWrapper.glob(fileGlobs)) {
for (const filePath of await this._fileSystemWrapper.glob(fileGlobs)) {
sourceFilePromises.push(this.addSourceFileAtPathIfExists(filePath).then(sourceFile => {
if (sourceFile != null)
sourceFiles.push(sourceFile);
Expand Down
9 changes: 6 additions & 3 deletions deno/common/DenoRuntime.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { ensureDir, ensureDirSync } from "https://deno.land/std@0.140.0/fs/ensure_dir.ts";
import { expandGlob, expandGlobSync } from "https://deno.land/std@0.140.0/fs/expand_glob.ts";
import * as stdPath from "https://deno.land/std@0.140.0/path/mod.ts";
import { ensureDir, ensureDirSync } from "https://deno.land/std@0.181.0/fs/ensure_dir.ts";
import { expandGlob, expandGlobSync } from "https://deno.land/std@0.181.0/fs/expand_glob.ts";
import * as stdPath from "https://deno.land/std@0.181.0/path/mod.ts";

// deno-lint-ignore no-explicit-any

export class DenoRuntime {
fs = new DenoRuntimeFileSystem();
Expand Down Expand Up @@ -100,6 +102,7 @@ class DenoRuntimeFileSystem {
return this._toStat(stat);
}

// deno-lint-ignore no-explicit-any
private _toStat(stat: any) {
return {
isFile() {
Expand Down
2 changes: 1 addition & 1 deletion deno/common/ts_morph_common.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ export declare class TransactionalFileSystem {
readFile(filePath: StandardizedFilePath, encoding: string | undefined): Promise<string>;
private _verifyCanReadFile;
readDirSync(dirPath: StandardizedFilePath): DirEntry[];
glob(patterns: ReadonlyArray<string>): AsyncGenerator<StandardizedFilePath, void, unknown>;
glob(patterns: ReadonlyArray<string>): Promise<StandardizedFilePath[]>;
globSync(patterns: ReadonlyArray<string>): Generator<StandardizedFilePath, void, unknown>;
getFileSystem(): FileSystemHost;
getCurrentDirectory(): StandardizedFilePath;
Expand Down
10 changes: 4 additions & 6 deletions deno/common/ts_morph_common.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions deno/ts_morph.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { errors, SyntaxKind, ts, NewLineKind, EmitHint, ScriptTarget, ScriptKind, SettingsContainer, KeyValueCache, getCompilerOptionsFromTsConfig as getCompilerOptionsFromTsConfig$1, StringUtils, getSyntaxKindName, ArrayUtils, nameof, ObjectUtils, EventContainer, FileUtils, libFolderInMemoryPath, Memoize, SymbolFlags, TypeFormatFlags, getEmitModuleResolutionKind, createHosts, ObjectFlags, TypeFlags, matchGlobs, ModuleResolutionKind, SortedKeyValueArray, LocaleStringComparer, WeakCache, DocumentRegistry, createModuleResolutionHost, TransactionalFileSystem, TsConfigResolver, CompilerOptionsContainer, InMemoryFileSystemHost, RealFileSystemHost, IterableUtils, runtime } from './common/mod.ts';
export { CompilerOptionsContainer, DiagnosticCategory, EmitHint, InMemoryFileSystemHost, LanguageVariant, ModuleKind, ModuleResolutionKind, NewLineKind, NodeFlags, ObjectFlags, ResolutionHosts, ScriptKind, ScriptTarget, SettingsContainer, SymbolFlags, SyntaxKind, TypeFlags, TypeFormatFlags, ts } from './common/mod.ts';
import CodeBlockWriter from 'https://deno.land/x/code_block_writer@11.0.3/mod.ts';
export { default as CodeBlockWriter } from 'https://deno.land/x/code_block_writer@11.0.3/mod.ts';
import CodeBlockWriter from 'https://deno.land/x/code_block_writer@12.0.0/mod.ts';
export { default as CodeBlockWriter } from 'https://deno.land/x/code_block_writer@12.0.0/mod.ts';

class AdvancedIterator {
constructor(iterator) {
Expand Down Expand Up @@ -10097,8 +10097,8 @@ function TypedNode(Base) {
});
return this;
function getInsertPosWhenNoType(node) {
var _a;
let identifier = (_a = node.getFirstChildByKind(SyntaxKind.Identifier)) !== null && _a !== void 0 ? _a : node.getFirstChildIfKindOrThrow(SyntaxKind.ObjectBindingPattern, "A first child of the kind Identifier or ObjectBindingPattern was expected.");
var _a, _b;
let identifier = (_b = (_a = node.getFirstChildByKind(SyntaxKind.Identifier)) !== null && _a !== void 0 ? _a : node.getFirstChildByKind(SyntaxKind.ArrayBindingPattern)) !== null && _b !== void 0 ? _b : node.getFirstChildIfKindOrThrow(SyntaxKind.ObjectBindingPattern, "A first child of the kind Identifier, ArrayBindingPattern, or ObjectBindingPattern was expected.");
const nextSibling = identifier.getNextSibling();
const insertAfterNode = isQuestionOrExclamation(nextSibling) ? nextSibling : identifier;
return insertAfterNode.getEnd();
Expand Down
2 changes: 1 addition & 1 deletion dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"typescript": {
"useBraces": "preferNone"
},
"includes": ["**/*.{ts,tsx,js,jsx,json,md}"],
"includes": ["**/*.{ts,tsx,js,jsx,json,md,mjs}"],
"excludes": [
"**/node_modules",
"**/*-lock.json",
Expand Down
12 changes: 0 additions & 12 deletions lerna.json

This file was deleted.

0 comments on commit 069ea9a

Please sign in to comment.